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: 9845203 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 E616760392 for ; Mon, 17 Jul 2017 14:02:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D763727D0C for ; Mon, 17 Jul 2017 14:02:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA0CA28497; Mon, 17 Jul 2017 14:02:53 +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=-1.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 066AF27D0C for ; Mon, 17 Jul 2017 14:02:53 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 38C35266EB9; Mon, 17 Jul 2017 16:02:43 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id B9F0E266EB8; Mon, 17 Jul 2017 16:02:39 +0200 (CEST) Received: from mail-it0-f44.google.com (mail-it0-f44.google.com [209.85.214.44]) by alsa0.perex.cz (Postfix) with ESMTP id 31A7F266EB4 for ; Mon, 17 Jul 2017 16:02:36 +0200 (CEST) Received: by mail-it0-f44.google.com with SMTP id v202so50177511itb.0 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=s5WEJRGA3hhRKT6+8qvTtMeW7lAGwmnH4wLSONN9i2ENdkAdtxAZ61fubcy5VWppue qCCrq/tvoEhoPqqGM2EyhTC2+eBxJYlX1In5igrNR9k88QHqTXYgoPFtmhJUkQTWqJxx 8oNV+bPC+guwNWw2nD8Swe59+0gf3znYfLU7kSCRtLiv53wTX358ZnhE7Z/PXZwfndv2 Y5M76QHx6oQhoLf7FfI3mg712+nejAY3mbhq7GHQjnl6D0WKCOm3GXnXXCe6lSuZmcdy QSh+0dTRgV3RdyDqBUyMCxx5NgshGfZ2RArnhupioI3/MXaCk9MW3B1V960yQd1b6Iit mOAg== X-Gm-Message-State: AIVw110DdSvm90nPHZHbpSjLftjGObACW1v6M2fyCCZkwfunbAc/Shh1 yc6pBPsWEmIrpMA7 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 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> Cc: Archit Taneja , David Airlie , linux-kernel@vger.kernel.org, Liam Girdwood , dri-devel@lists.freedesktop.org, Takashi Iwai , Andrzej Hajda , Srinivas Kandagatla Subject: [alsa-devel] [PATCH 1/2] ASoC: hdmi-codec: Allow drivers to restrict sample sizes. X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org 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++; }