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: 107965 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp4603331obm; Mon, 17 Jul 2017 07:02:53 -0700 (PDT) X-Received: by 10.84.138.3 with SMTP id 3mr31521138plo.101.1500300173701; Mon, 17 Jul 2017 07:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500300173; cv=none; d=google.com; s=arc-20160816; b=MY3xmiLZPSTXv8+cGd+ofBkZe3BNhTAJzktmrQm5+ewQ+Xf9b/v+azynB2p+OTHvoZ u7orCjnsyDTVu0rbq7MpLIGZoZ4SvKLBzuAa022wLW+8jLBrPbiPvXr8cW7e/5zpI7II 85N+nGib8VeAjLMuQXt4/MvxCuEEe1mur33Vn7hi2aI5/FU4HSYEZb45IHV5Rx5d9iYh aj37arzsOlquhg74ayPFYgGnMjhHcF3ZQFpKnRYrxa0Y8txEsxPRCsfb8eTvNmj0wf4o WNUDZWjAYVZ7Z2zeufjIWmtxCB2bsVa4sp0jZ/VQKurSrFJjDpLD50XLWdknwf73m5tB 4ZPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=dlovniiQGTFRW2WEmt+maiPv3aHzqpbbHTWqk2VTrgI=; b=yaSRtaMvIGHS/D9b87JF3hD64Zm193igwoyizaRub54/hrQ4Y9x+JQ2u5cjWRLjApH q0N2qyFcKnGDXk+1XXTDeAKJuSvQnBQLq/7qKKiUb3PhzNoY4CHn+rB4tnRHtq4WDxXw dewmjtuyqtKaQGBu3Nqck8J0a7lSrSlp10QUA+a1MvHFIC3g24XqZ0DlkQo5vZ1GnWmp ZBmAl29TyfJ6c7a2ZgEuoFSazo8jmkQ60FX9Byw/qwVEjU+PzXal3IEfFCy1Dcf8Uien RsF+9sEMRyNRmsm1g/x8kGWl51YXmEJUGo8BhGN2SLMFp+LLVBgXFoldCwgojEa5zLlq g3NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=h1uaAvQX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x32si13363017pld.1.2017.07.17.07.02.53; Mon, 17 Jul 2017 07:02:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=h1uaAvQX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751417AbdGQOCv (ORCPT + 25 others); Mon, 17 Jul 2017 10:02:51 -0400 Received: from mail-it0-f54.google.com ([209.85.214.54]:36709 "EHLO mail-it0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332AbdGQOCj (ORCPT ); Mon, 17 Jul 2017 10:02:39 -0400 Received: by mail-it0-f54.google.com with SMTP id a62so4215108itd.1 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=N8E+1bRUf/gqFQwuoPgqQZM9wegbJoRlvmOQDjgaJsJS/6JKmw4UdNCUufv+x+RV5e ehNSuJ2B4arR0p5yiOb0lkq+WkGdFkYGhUNZYnDPNGZ2M0evLhV3ubbIzIfi86p/ne5s m8k770VXQ94w+lQFmNU2VLk7+nFnhCIyku88FwxDmSnTBh4xmNDqwhfqQrq6iPmhLXE/ s2kC7I4ko58THonQ3xYCP4vNLDBky28qSgFpiqke8159KutQH3+9Lr131Y9ywM7Ggl3Y AkPy6993BWCaTnxs6iogEiaoD7g0CMpg/QNa7jypedgZW+laEVLnshcZN00wqMw82557 cKRA== X-Gm-Message-State: AIVw113/3f1UqlZpYM0P141G9HGRixZIGVq11aoEvP1SCawJv8qMzMkT dHucx9LqXX48+XS1 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 Cc: Archit Taneja , Andrzej Hajda , David Airlie , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 2/2] drm/bridge: adv7511: restrict audio sample sizes 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 2.11.0 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)