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: 107964 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp4603104obm; Mon, 17 Jul 2017 07:02:43 -0700 (PDT) X-Received: by 10.99.44.8 with SMTP id s8mr29674035pgs.84.1500300163749; Mon, 17 Jul 2017 07:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500300163; cv=none; d=google.com; s=arc-20160816; b=RzPwfFNRWCxv5nSYONL9GT8SwQbk4DIuQvM01YuoPxN1yl36wLPNQZuq9wbI4Szdfk SFpEcq5HokyTJbshADyBy7Jqsr0ovs0UrqLH0VNdOmz7bnUahRL1CZPmWqkOeYqpkwKu Be8C6kAi7i1lVvMVuHRo0kfPHOJkZIoJdBYIy2RQsY9cWosW1OgYmp4o6oVbAuSvRwpX LiTNGBfeBlkMzMZWQyhMbqU1uCTKDLxgTxcX0ShSUK0TDJX92uFAg9XZYZmQVPrGSxuo qKYQUNGf1HqFylKGfunH1SawFtV3hO6GRFwYICbfMxCf0EX4BupAIYroY9G1YLHQ8TRS 1bmg== 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=Z/3NK9f2ybQJH7GK8pzdcSPjSo4Kkv9JDwNzut/Bxhs=; b=k/WHZhMoCT9AlOuljSkOGc5FA6sb1jVuR/T9sJNV1oxCIRNx5GTGBhnnvpdIjM1c9s 2UiLq9kHBq9lkKhRmQNHl0rfkjywIn1d2bSXQbw7t9YbPe/Vmdz8Ibj4tn8sWbiJCovc wTwxJxb8F60z8HECugJi5BtxQQjBTYArmKAxSMsXLdlHF5Ii3PrBIMKzp3pOAiPM3uyf 8qXeFqYgtDOBSy9Cr99Tq/HoY7y3NlTOEjZ0ENDduP+5pstQUtk/MMSWBRyw0klF/8eQ 9eCcfzjB3qpPA9sYKJXIganCulbNIpqGNVKlzyfo9ACEBgRZiXPXDjhLM3TGNupP71VD QAFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=GXf04Wnb; 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.43; Mon, 17 Jul 2017 07:02:43 -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=GXf04Wnb; 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 S1751402AbdGQOCk (ORCPT + 25 others); Mon, 17 Jul 2017 10:02:40 -0400 Received: from mail-it0-f46.google.com ([209.85.214.46]:35790 "EHLO mail-it0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751278AbdGQOCh (ORCPT ); Mon, 17 Jul 2017 10:02:37 -0400 Received: by mail-it0-f46.google.com with SMTP id v202so50177526itb.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=JgNg3JcLSBi0FQ2hlVmfIrFjDy6gidfnW3KYrqoRB38DMDI5ZUaGHzj2v7anK9piQq bMB1hjvqPTNPpvamAwN6PXjBIricB+SewA9ZNHo9CrqGNW4gOM1c5tbRDpPA3jS7P4op CGfT6sN0PXyatT6oZ9BkxZDFR0iZPteENC7+ar2xP43HK/pn7DAyHWGyv32+bh6VjXYF ZJOt1f5EPDbBUfU2k/GXr3z1gk1t7Fs0njpWUmcXDBbLMzQrt4Sqy89lt52rgf1Q6RUM d/fHux6YQxDHGN3QDthO8rULBBvjROfddlX6bWPM49qMGLxclWS2gcKPxM8lYfrLtyDG 4mRA== X-Gm-Message-State: AIVw1132mp1GGjVgPbrs9CvyB60AV273CeQKxoGpLFgai5S58fSspMPb FNGLak+/wkjY4Alp 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 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 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- include/sound/hdmi-codec.h | 1 + sound/soc/codecs/hdmi-codec.c | 3 +++ 2 files changed, 4 insertions(+) -- 2.11.0 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++; }