From patchwork Mon Jul 31 22:49:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 9873229 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 4EA0F6037D for ; Mon, 31 Jul 2017 22:50:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 383DD28564 for ; Mon, 31 Jul 2017 22:50:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CF2C285DE; Mon, 31 Jul 2017 22:50:01 +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 ED5F528564 for ; Mon, 31 Jul 2017 22:50:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5068B6E8FC; Mon, 31 Jul 2017 22:50:00 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) by gabe.freedesktop.org (Postfix) with ESMTPS id D9A356E8FA for ; Mon, 31 Jul 2017 22:49:56 +0000 (UTC) Received: by mail-it0-x234.google.com with SMTP id v127so2439625itd.0 for ; Mon, 31 Jul 2017 15:49:56 -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=cXnIwjvo4teH0eb/+hPqgPUvwhbuMdeEvia9AhOQiX/PJ5vX5ixW5fkcb9a+C+rRIh waHzOP5kif8EQ5ZA2V/XblOgFyaqCbc7hXnFQIRkbE02EnAdbML8nfq9EKO3nV+kcNHQ pYX7r6/07ENerHIcMQZfvCsseYgDWMsLczthE= 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=mW19qE6/MlP/Fsv4DnXt631yww4rjmtT9mXxS2w5lHHN2NV8K4jmMbO/UxitXOc88v HFq3s+JuAqUgBzfw80d3ZOhmfxyhOV3ea1mnms3oYKVc5HKHDJL69gv/oMw6GhL+wgtm Tx9LBG0tDYbr1iZCZ0PEGtWafLxhihcrTOCC/y0cdXQNBTmrISzTsls9oefL4bredSVi 2awRelx2Nj3KRGyciXUEnEs7bD2rspSRmn3O/BQdCybqlAi69+eCkuwWM5ik/ofQUiFs lSxrisfKsV1Z5+cXjXVOyHbYFxSv8uN7tIR8+76pqynai0WxA3RvGypXQjTUiKnekcIu 8RYg== X-Gm-Message-State: AIVw1139d6HvPj0ZUiYSMVEf52HzjpboUwZsd3LPV7z7GMCg+h0iTZyn cm7pCpwRxV+BCvgq X-Received: by 10.36.213.4 with SMTP id a4mr20243200itg.127.1501541396089; Mon, 31 Jul 2017 15:49:56 -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 l197sm5988574itl.15.2017.07.31.15.49.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Jul 2017 15:49:55 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: Jyri Sarha , Mark Brown , alsa-devel@alsa-project.org Subject: [PATCH v2 2/2] drm/bridge: adv7511: restrict audio sample sizes Date: Tue, 1 Aug 2017 00:49:44 +0200 Message-Id: <20170731224944.9986-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170731224944.9986-1-srinivas.kandagatla@linaro.org> References: <20170731224944.9986-1-srinivas.kandagatla@linaro.org> 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 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)