Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10370067ybi; Thu, 11 Jul 2019 04:13:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTiLgYQo3fh0k6v+p+Yei7i5OtmsW5kWGQAlFoStTrULQLFuvhxhulFSHqz64RmZE4LZEm X-Received: by 2002:a17:902:7288:: with SMTP id d8mr4031716pll.133.1562843620680; Thu, 11 Jul 2019 04:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562843620; cv=none; d=google.com; s=arc-20160816; b=bGdZ5jlwk6PGu5mfSqNb8CYVbZib/p2eutc38BKpzPtdXvyfk0SpA41KiWii9mR6qt 7RxN17YEOQ9x35GwaTsfy6DKymxgvm6WEFVGMmFhyo2woUQtEtEh7fzxopwufPMOH9DE lwfJBYd99jjRn1LFAjfsQmXTz/WIMnMXoGtknElXsw3IHaQ4auc+Bfmtm115cpzaMYou DoRFkFoEhsUVsfVP3DTsMQc0yib+ddvwId3N8i5F/1F8Obp8z7cP1mCwsns22mrq+Qzd DFeeWMOyp0+sDXBYmZnNJWQ1s1ycKteMA65FZd2WyfaURA+/v28CKen1qGSDS4IQZgf8 WkPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:to:subject :dkim-signature; bh=IoJeqBXj9O3mqMI6W2UF1gfj+W7lgmJc4UiGpPN5+u4=; b=oIztlq6uzrQv0ybeSc+cM0s6uxlJ70ZkgYKwq6gzv/8raV8Lb68Mj3qN9HuFfpB1Gm lVZL2ZoFZSsJDVF2hZJk/j/+j4iE/87CNr3zx3H19JMAgqHgQ+pPR6Q55Q+Weuzan87w IQGqMUdR0ZrPCdU9x1qIVrK4j2syMpFsIiqzlXSNI2kYXM5Oxve0v6Gka3OrjUuznpzu 9I4AHc58WH8cJxLGNx+IPxgCzo+cDh+gWjgmFYmwnzUzKYIZJsu9a32jEQugiy1H2/A4 /sGdhC5izDcKvkZKsMYBalBK/Hr4KgWRDED4jMjxLVqKFBSEL07MTHpYPyh+nKe9C3/F 2VkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=nOgoKvrS; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p12si4904398pgj.437.2019.07.11.04.13.24; Thu, 11 Jul 2019 04:13:40 -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=@ti.com header.s=ti-com-17Q1 header.b=nOgoKvrS; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728341AbfGKLJx (ORCPT + 99 others); Thu, 11 Jul 2019 07:09:53 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:53646 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727865AbfGKLJw (ORCPT ); Thu, 11 Jul 2019 07:09:52 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x6BB9MDe053453; Thu, 11 Jul 2019 06:09:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1562843362; bh=IoJeqBXj9O3mqMI6W2UF1gfj+W7lgmJc4UiGpPN5+u4=; h=Subject:To:References:From:Date:In-Reply-To; b=nOgoKvrSe+uHjxrCkk95CFF2l6/dhuMPR3CsO4o6Zme7QJ31G5mV10Vin12IL3hee a5SQ0qzQVah6xiHP7wtImKfwB3DSO8l7Dn28PkzjtXG0u6IGOqiByosd1OT0XX2qCd HFBLVPPytS13qAcJJagDF0E3x2uAthYbr/uvuhIE= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x6BB9MJc085551 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 11 Jul 2019 06:09:22 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 11 Jul 2019 06:09:21 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 11 Jul 2019 06:09:21 -0500 Received: from [10.1.3.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x6BB9Ie6040787; Thu, 11 Jul 2019 06:09:19 -0500 Subject: Re: [PATCH] drm/bridge: sii902x: add audio graph card support To: Olivier Moysan , , , , , , , , , , , , , References: <1562141052-26221-1-git-send-email-olivier.moysan@st.com> From: Jyri Sarha Openpgp: preference=signencrypt Autocrypt: addr=jsarha@ti.com; prefer-encrypt=mutual; keydata= mQINBFbdWt8BEADnCIkQrHIvAmuDcDzp1h2pO9s22nacEffl0ZyzIS//ruiwjMfSnuzhhB33 fNEWzMjm7eqoUBi1BUAQIReS6won0cXIEXFg9nD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fRAA5K/z9DXVEl2kkuMuIWkgtuuLQ7ZwqgxGP3dMA5z3Iv/N+VNRGbaw oxf+ZkTbJHEE/dWclj1TDtpET/t6BJNLaldLtJ1PborQH+0jTmGbsquemKPgaHeSU8vYLCdc GV/Rz+3FN0/fRdmoq2+bIHght4T6KZJ6jsrnBhm7y6gzjMOiftH6M5GXPjU0/FsU09qsk/af jbwLETaea0mlWMrLd9FC2KfVITA/f/YG2gqtUUF9WlizidyctWJqSTZn08MdzaoPItIkRUTv 6Bv6rmFn0daWkHt23BLd0ZP7e7pON1rqNVljWjWQ/b/E/SzeETrehgiyDr8pP+CLlC+vSQxi XtjhWjt1ItFLXxb4/HLZbb/L4gYX7zbZ3NwkON6Ifn3VU7UwqxGLmKfUwu/mFV+DXif1cKSS v6vWkVQ6Go9jPsSMFxMXPA5317sZZk/v18TAkIiwFqda3/SSjwc3e8Y76/DwPvUQd36lEbva uBrUXDDhCoiZnjQaNz/J+o9iYjuMTpY1Wp+igjIretYr9+kLvGsoPo/kTPWyiuh/WiFU2d6J PMCGFGhodTS5qmQA6IOuazek1qSZIl475u3E2uG98AEX/kRhSzgpsbvADPEUPaz75uvlmOCX tv+Sye9QT4Z1QCh3lV/Zh4GlY5lt4MwYnqFCxroK/1LpkLgdyQ4rRVw= Message-ID: <129ffc9a-0bfc-354e-c4a1-9043260832c0@ti.com> Date: Thu, 11 Jul 2019 14:09:17 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: <1562141052-26221-1-git-send-email-olivier.moysan@st.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-GB Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/07/2019 11:04, Olivier Moysan wrote: > Implement get_dai_id callback of audio HDMI codec > to support ASoC audio graph card. > HDMI audio output has to be connected to sii902x port 3. > get_dai_id callback maps this port to ASoC DAI index 0. > > Signed-off-by: Olivier Moysan I have not used audio graph binding, but compared to the other get_dai_id() implementations, this looks identical. So: Reviewed-by: Jyri Sarha > --- > drivers/gpu/drm/bridge/sii902x.c | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c > index dd7aa466b280..daf9ef3cd817 100644 > --- a/drivers/gpu/drm/bridge/sii902x.c > +++ b/drivers/gpu/drm/bridge/sii902x.c > @@ -158,6 +158,8 @@ > > #define SII902X_I2C_BUS_ACQUISITION_TIMEOUT_MS 500 > > +#define SII902X_AUDIO_PORT_INDEX 3 > + > struct sii902x { > struct i2c_client *i2c; > struct regmap *regmap; > @@ -690,11 +692,32 @@ static int sii902x_audio_get_eld(struct device *dev, void *data, > return 0; > } > > +static int sii902x_audio_get_dai_id(struct snd_soc_component *component, > + struct device_node *endpoint) > +{ > + struct of_endpoint of_ep; > + int ret; > + > + ret = of_graph_parse_endpoint(endpoint, &of_ep); > + if (ret < 0) > + return ret; > + > + /* > + * HDMI sound should be located at reg = <3> > + * Return expected DAI index 0. > + */ > + if (of_ep.port == SII902X_AUDIO_PORT_INDEX) > + return 0; > + > + return -EINVAL; > +} > + > static const struct hdmi_codec_ops sii902x_audio_codec_ops = { > .hw_params = sii902x_audio_hw_params, > .audio_shutdown = sii902x_audio_shutdown, > .digital_mute = sii902x_audio_digital_mute, > .get_eld = sii902x_audio_get_eld, > + .get_dai_id = sii902x_audio_get_dai_id, > }; > > static int sii902x_audio_codec_init(struct sii902x *sii902x, > -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki