linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jyri Sarha <jsarha@ti.com>
To: Olivier Moysan <olivier.moysan@st.com>, <a.hajda@samsung.com>,
	<narmstrong@baylibre.com>, <Laurent.pinchart@ideasonboard.com>,
	<jonas@kwiboo.se>, <jernej.skrabec@siol.net>, <airlied@linux.ie>,
	<daniel@ffwll.ch>, <dri-devel@lists.freedesktop.org>,
	<linux-kernel@vger.kernel.org>, <benjamin.gaignard@st.com>,
	<alexandre.torgue@st.com>, <linux-arm-kernel@lists.infradead.org>,
	<linux-stm32@st-md-mailman.stormreply.com>
Subject: Re: [PATCH] drm/bridge: sii902x: add audio graph card support
Date: Thu, 11 Jul 2019 14:09:17 +0300	[thread overview]
Message-ID: <129ffc9a-0bfc-354e-c4a1-9043260832c0@ti.com> (raw)
In-Reply-To: <1562141052-26221-1-git-send-email-olivier.moysan@st.com>

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 <olivier.moysan@st.com>

I have not used audio graph binding, but compared to the other
get_dai_id() implementations, this looks identical. So:

Reviewed-by: Jyri Sarha <jsarha@ti.com>

> ---
>  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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-07-11 11:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03  8:04 [PATCH] drm/bridge: sii902x: add audio graph card support Olivier Moysan
2019-07-05 12:41 ` Philippe CORNU
2019-07-10 15:27   ` Daniel Vetter
2019-07-11  9:27     ` Philippe CORNU
2019-07-11 10:25       ` Daniel Vetter
2019-07-11 10:55       ` Andrzej Hajda
2019-07-11 11:09 ` Jyri Sarha [this message]
2019-07-25 12:31   ` Benjamin Gaignard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=129ffc9a-0bfc-354e-c4a1-9043260832c0@ti.com \
    --to=jsarha@ti.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=alexandre.torgue@st.com \
    --cc=benjamin.gaignard@st.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=narmstrong@baylibre.com \
    --cc=olivier.moysan@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).