From patchwork Mon Jul 17 14:02:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 9846063 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 32A0360386 for ; Mon, 17 Jul 2017 20:26:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5785028503 for ; Mon, 17 Jul 2017 20:26:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C6E428509; Mon, 17 Jul 2017 20:26:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EC0EA28503 for ; Mon, 17 Jul 2017 20:26:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D9CD46E28A; Mon, 17 Jul 2017 20:26:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) by gabe.freedesktop.org (Postfix) with ESMTPS id C5A4F6E234 for ; Mon, 17 Jul 2017 14:02:36 +0000 (UTC) Received: by mail-it0-x236.google.com with SMTP id a62so4214401itd.1 for ; Mon, 17 Jul 2017 07:02:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Z/3NK9f2ybQJH7GK8pzdcSPjSo4Kkv9JDwNzut/Bxhs=; b=GXf04WnbWGWRLgioQKAXQN4b2ErYdxVlz75Jg7WH3AHJR0IydB4j7x8Mb55DlOc8zF FFacgeUWUifHu8CNE9Pvm6Rxk/IjwsQH4qDz29txGzcaVndSTZfjqyCsUmnS01WyAcHU dykc/S9RTDqHqYbpEHyRXbjcPV08762eUGpsI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Z/3NK9f2ybQJH7GK8pzdcSPjSo4Kkv9JDwNzut/Bxhs=; b=Dky2+wbABbYq6JM3Ocw/NcJArxg0p5jphqq4VRzhCBT/yVQ3acZk1orlbaetbT1UAK kezyYLjVN3l8XM82aT+c1Yc3u//jbDYS+SLz1n1OujjXwzR3RKDU2gL6L2+cxGYdiysL gkzIE6TD7X3qMT6oyfUVpp9nRPYFoURDzskKm8chGW1wZ01TFQgvBxpItuVebFsBm3if exP++nO9Hc/pV2JAXZS1H7oNUCnRhCUR50syRckOe+qdio9L740y1R2kqhYaLhUeHYAo llN8tv4jjf1KeT2TAjynY5+mEHZA41z1XzLzycSuIeEmY/p62f2RkCraOFuVwfYwBV0z LLwA== X-Gm-Message-State: AIVw113Y6f84t0s7cvEketJqY50OHe3p/0vrIPg6Ig0WB5MSsTD1WyOC Sj4H0croHH84pnWk X-Received: by 10.36.46.19 with SMTP id i19mr5411409ita.124.1500300156101; Mon, 17 Jul 2017 07:02:36 -0700 (PDT) Received: from localhost.localdomain (static.8.26.4.46.clients.your-server.de. [46.4.26.8]) by smtp.gmail.com with ESMTPSA id s14sm2709483ita.2.2017.07.17.07.02.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Jul 2017 07:02:35 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: Jyri Sarha , Mark Brown , alsa-devel@alsa-project.org Subject: [PATCH 1/2] ASoC: hdmi-codec: Allow drivers to restrict sample sizes. Date: Mon, 17 Jul 2017 16:02:26 +0200 Message-Id: <20170717140227.17312-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170717140227.17312-1-srinivas.kandagatla@linaro.org> References: <20170717140227.17312-1-srinivas.kandagatla@linaro.org> X-Mailman-Approved-At: Mon, 17 Jul 2017 20:26:09 +0000 Cc: linux-kernel@vger.kernel.org, Liam Girdwood , dri-devel@lists.freedesktop.org, Takashi Iwai , Srinivas Kandagatla , Jaroslav Kysela X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Srinivas Kandagatla Currently hdmi client drivers does have means to limit the sample sizes that it can only support. Having formats parameter option would solve this. This issue was noticed on DB410c board when adv7511 hdmi codec driver failed to play a 32 bits audio samples, as it does not support them. Signed-off-by: Srinivas Kandagatla Reviewed-by: Jyri Sarha --- include/sound/hdmi-codec.h | 1 + sound/soc/codecs/hdmi-codec.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/sound/hdmi-codec.h b/include/sound/hdmi-codec.h index 9483c55f871b..89fc4cce5785 100644 --- a/include/sound/hdmi-codec.h +++ b/include/sound/hdmi-codec.h @@ -104,6 +104,7 @@ struct hdmi_codec_pdata { uint i2s:1; uint spdif:1; int max_i2s_channels; + u64 formats; void *data; }; diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index 22ed0dc88f0a..1ece73f4be92 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -780,6 +780,9 @@ static int hdmi_codec_probe(struct platform_device *pdev) hcp->daidrv[i] = hdmi_i2s_dai; hcp->daidrv[i].playback.channels_max = hcd->max_i2s_channels; + + if (hcd->formats) + hcp->daidrv[i].playback.formats = hcd->formats; i++; }