From patchwork Mon Jul 17 14:02:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 9845207 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 9CB1660392 for ; Mon, 17 Jul 2017 14:03:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E72627D0C for ; Mon, 17 Jul 2017 14:03:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8307428497; Mon, 17 Jul 2017 14:03:11 +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 C198E27D0C for ; Mon, 17 Jul 2017 14:03:10 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id BFA17266EB4; Mon, 17 Jul 2017 16:02:44 +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 D83D9266EC4; Mon, 17 Jul 2017 16:02:43 +0200 (CEST) Received: from mail-it0-f48.google.com (mail-it0-f48.google.com [209.85.214.48]) by alsa0.perex.cz (Postfix) with ESMTP id 688B5266EB4 for ; Mon, 17 Jul 2017 16:02:39 +0200 (CEST) Received: by mail-it0-f48.google.com with SMTP id 188so13310074itx.0 for ; Mon, 17 Jul 2017 07:02:39 -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=dlovniiQGTFRW2WEmt+maiPv3aHzqpbbHTWqk2VTrgI=; b=h1uaAvQX1XP/c+PZKqgbCHBKoOJU2ju1oKleRmr+A16kLB3TGB4TF08mzpXIOjUsR6 5Sj477TnvTx4ClF+KNXMRt185+x4rCdi5u7vLoZ/VKaj4skLGy+uOaIPFESUcoLhFPZn 3iu46IkZG7XIdlvSyfaHMeM056n7diVzZR0gk= 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=dlovniiQGTFRW2WEmt+maiPv3aHzqpbbHTWqk2VTrgI=; b=uMd9Fp48il6Vho0HOtvmpwNadU7njb/LpXWLwLIpV1MOPmHM5QeZja0WYPDJP53I2d Yh/dklNBazRfuwuX1FuUA8pv0ZnBUg2QzNmopLKzyYHL67rgV+jtGzOqC6KbyGLgXl5/ p9Av2qrcaXN0U+mSEZ7xb91ex0rkouxHokcVXIu1NBrmgpglc4QBQeGp2E+oZ1fTxck1 9WrnHc7MXaY1BXFVLz7OhPu9NP1UT3pYmryVrTkYjeCCoT3ZDqR30fwJswyuiIetdBS1 izYnb0Y9uFDBtj1cDguAGtSW8ATvudWwmqjv3R0Wb6oNEhIfR9HgFZnrQk8DwrVtjRPh 0VRQ== X-Gm-Message-State: AIVw113tycg+gkZzvZGbUo6uO6XNOV0iE5XZTLGM3Gy1TVGQLqmAvBV4 Ex7276pvMnRYGyH4 X-Received: by 10.36.80.201 with SMTP id m192mr5347326itb.31.1500300158489; Mon, 17 Jul 2017 07:02:38 -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.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Jul 2017 07:02:38 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: Jyri Sarha , Mark Brown , alsa-devel@alsa-project.org Date: Mon, 17 Jul 2017 16:02:27 +0200 Message-Id: <20170717140227.17312-3-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 2/2] drm/bridge: adv7511: restrict audio 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 ADV7533 only supports audio samples word width from 16-24 bits. This patch restricts the audio sample sizes to the supported ones, so that sound card does not report wrong list of supported hwparms. Without this patch aplay would fail when playing a 32 bit audio. Signed-off-by: Srinivas Kandagatla --- drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c index 67469c26bae8..d01d0aa0eef7 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c @@ -214,6 +214,8 @@ static struct hdmi_codec_pdata codec_data = { .ops = &adv7511_codec_ops, .max_i2s_channels = 2, .i2s = 1, + .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE | + SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S24_BE), }; int adv7511_audio_init(struct device *dev, struct adv7511 *adv7511)