linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: sii902x: add audio graph card support
@ 2019-07-03  8:04 Olivier Moysan
  2019-07-05 12:41 ` Philippe CORNU
  2019-07-11 11:09 ` Jyri Sarha
  0 siblings, 2 replies; 8+ messages in thread
From: Olivier Moysan @ 2019-07-03  8:04 UTC (permalink / raw)
  To: a.hajda, narmstrong, Laurent.pinchart, jonas, jernej.skrabec,
	airlied, daniel, dri-devel, linux-kernel, benjamin.gaignard,
	alexandre.torgue, linux-arm-kernel, linux-stm32, olivier.moysan,
	jsarha

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/bridge: sii902x: add audio graph card support
  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 11:09 ` Jyri Sarha
  1 sibling, 1 reply; 8+ messages in thread
From: Philippe CORNU @ 2019-07-05 12:41 UTC (permalink / raw)
  To: Olivier MOYSAN, a.hajda, narmstrong, Laurent.pinchart, jonas,
	jernej.skrabec, airlied, daniel, dri-devel, linux-kernel,
	Benjamin GAIGNARD, Alexandre TORGUE, linux-arm-kernel,
	linux-stm32, jsarha

Hi Olivier,
and many thanks for your patch.
Good to have the audio graph card support, looks ok.
Reviewed-by: Philippe Cornu <philippe.cornu@st.com>
Philippe :-)

On 7/3/19 10:04 AM, 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>
> ---
>   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,
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/bridge: sii902x: add audio graph card support
  2019-07-05 12:41 ` Philippe CORNU
@ 2019-07-10 15:27   ` Daniel Vetter
  2019-07-11  9:27     ` Philippe CORNU
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Vetter @ 2019-07-10 15:27 UTC (permalink / raw)
  To: Philippe CORNU
  Cc: Olivier MOYSAN, a.hajda, narmstrong, Laurent.pinchart, jonas,
	jernej.skrabec, airlied, daniel, dri-devel, linux-kernel,
	Benjamin GAIGNARD, Alexandre TORGUE, linux-arm-kernel,
	linux-stm32, jsarha

On Fri, Jul 05, 2019 at 12:41:03PM +0000, Philippe CORNU wrote:
> Hi Olivier,
> and many thanks for your patch.
> Good to have the audio graph card support, looks ok.
> Reviewed-by: Philippe Cornu <philippe.cornu@st.com>

Since you have drm-misc commit rights I'm assuming you're going to push
this too. Correct?
-Daniel

> Philippe :-)
> 
> On 7/3/19 10:04 AM, 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>
> > ---
> >   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,
> > 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/bridge: sii902x: add audio graph card support
  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
  0 siblings, 2 replies; 8+ messages in thread
From: Philippe CORNU @ 2019-07-11  9:27 UTC (permalink / raw)
  To: Olivier MOYSAN, a.hajda, narmstrong, Laurent.pinchart, jonas,
	jernej.skrabec, airlied, dri-devel, linux-kernel,
	Benjamin GAIGNARD, Alexandre TORGUE, linux-arm-kernel,
	linux-stm32, jsarha

Hi Daniel,


On 7/10/19 5:27 PM, Daniel Vetter wrote:
> On Fri, Jul 05, 2019 at 12:41:03PM +0000, Philippe CORNU wrote:
>> Hi Olivier,
>> and many thanks for your patch.
>> Good to have the audio graph card support, looks ok.
>> Reviewed-by: Philippe Cornu <philippe.cornu@st.com>
> 
> Since you have drm-misc commit rights I'm assuming you're going to push
> this too. Correct?
> -Daniel

Regarding this patch in particular, there is still missing an acked-by 
from a "bridge" maintainer. Also it could be nice to wait for the 
reviewed-by from Jiry as it knows well this sii driver and sent recently 
good patches on it (already merged).

With that, Benjamin or I (or a bridge maintainer) can push this patch + 
the serie named "drm/bridge: sii902x: fix audio mclk management" as I 
think it is better to push this serie *before* this patch.

Thanks,
Philippe :-)


>> Philippe :-)
>>
>> On 7/3/19 10:04 AM, 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>
>>> ---
>>>    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,
>>>
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/bridge: sii902x: add audio graph card support
  2019-07-11  9:27     ` Philippe CORNU
@ 2019-07-11 10:25       ` Daniel Vetter
  2019-07-11 10:55       ` Andrzej Hajda
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel Vetter @ 2019-07-11 10:25 UTC (permalink / raw)
  To: Philippe CORNU
  Cc: Olivier MOYSAN, a.hajda, narmstrong, Laurent.pinchart, jonas,
	jernej.skrabec, airlied, dri-devel, linux-kernel,
	Benjamin GAIGNARD, Alexandre TORGUE, linux-arm-kernel,
	linux-stm32, jsarha

On Thu, Jul 11, 2019 at 09:27:30AM +0000, Philippe CORNU wrote:
> Hi Daniel,
> 
> 
> On 7/10/19 5:27 PM, Daniel Vetter wrote:
> > On Fri, Jul 05, 2019 at 12:41:03PM +0000, Philippe CORNU wrote:
> >> Hi Olivier,
> >> and many thanks for your patch.
> >> Good to have the audio graph card support, looks ok.
> >> Reviewed-by: Philippe Cornu <philippe.cornu@st.com>
> > 
> > Since you have drm-misc commit rights I'm assuming you're going to push
> > this too. Correct?
> 
> Regarding this patch in particular, there is still missing an acked-by 
> from a "bridge" maintainer. Also it could be nice to wait for the 
> reviewed-by from Jiry as it knows well this sii driver and sent recently 
> good patches on it (already merged).

The bridge maintainer is looking for new bridge maintainers (atm we have
only one, defacto), so for bridge driver patches I really don't think it's
a good idea to gate on that single bottle-neck. Infrastructure is a bit a
different thing.

> With that, Benjamin or I (or a bridge maintainer) can push this patch + 
> the serie named "drm/bridge: sii902x: fix audio mclk management" as I 
> think it is better to push this serie *before* this patch.

Wahtever you feel like, just wanted to make sure you're not stuck
twiddling thumbs. The entire point of drm-misc is to facility mesh review
and maintainership, because the strict hierarchy just doesn't work for
smaller things. Exactly because you're always blocked on a bottleneck
somewhere.
-Daniel

> 
> Thanks,
> Philippe :-)
> 
> 
> >> Philippe :-)
> >>
> >> On 7/3/19 10:04 AM, 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>
> >>> ---
> >>>    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,
> >>>
> > 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/bridge: sii902x: add audio graph card support
  2019-07-11  9:27     ` Philippe CORNU
  2019-07-11 10:25       ` Daniel Vetter
@ 2019-07-11 10:55       ` Andrzej Hajda
  1 sibling, 0 replies; 8+ messages in thread
From: Andrzej Hajda @ 2019-07-11 10:55 UTC (permalink / raw)
  To: Philippe CORNU, Olivier MOYSAN, narmstrong, Laurent.pinchart,
	jonas, jernej.skrabec, airlied, dri-devel, linux-kernel,
	Benjamin GAIGNARD, Alexandre TORGUE, linux-arm-kernel,
	linux-stm32, jsarha

On 11.07.2019 11:27, Philippe CORNU wrote:
> Hi Daniel,
>
>
> On 7/10/19 5:27 PM, Daniel Vetter wrote:
>> On Fri, Jul 05, 2019 at 12:41:03PM +0000, Philippe CORNU wrote:
>>> Hi Olivier,
>>> and many thanks for your patch.
>>> Good to have the audio graph card support, looks ok.
>>> Reviewed-by: Philippe Cornu <philippe.cornu@st.com>
>> Since you have drm-misc commit rights I'm assuming you're going to push
>> this too. Correct?
>> -Daniel
> Regarding this patch in particular, there is still missing an acked-by 
> from a "bridge" maintainer. Also it could be nice to wait for the 
> reviewed-by from Jiry as it knows well this sii driver and sent recently 
> good patches on it (already merged).
>
> With that, Benjamin or I (or a bridge maintainer) can push this patch + 
> the serie named "drm/bridge: sii902x: fix audio mclk management" as I 
> think it is better to push this serie *before* this patch.
>
> Thanks,
> Philippe :-)


Acked-by: Andrzej Hajda <a.hajda@samsung.com>

 --
Regards
Andrzej


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/bridge: sii902x: add audio graph card support
  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-11 11:09 ` Jyri Sarha
  2019-07-25 12:31   ` Benjamin Gaignard
  1 sibling, 1 reply; 8+ messages in thread
From: Jyri Sarha @ 2019-07-11 11:09 UTC (permalink / raw)
  To: Olivier Moysan, a.hajda, narmstrong, Laurent.pinchart, jonas,
	jernej.skrabec, airlied, daniel, dri-devel, linux-kernel,
	benjamin.gaignard, alexandre.torgue, linux-arm-kernel,
	linux-stm32

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/bridge: sii902x: add audio graph card support
  2019-07-11 11:09 ` Jyri Sarha
@ 2019-07-25 12:31   ` Benjamin Gaignard
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Gaignard @ 2019-07-25 12:31 UTC (permalink / raw)
  To: Jyri Sarha
  Cc: Olivier Moysan, Andrzej Hajda, Neil Armstrong, Laurent Pinchart,
	Jonas Karlman, jernej.skrabec, David Airlie, Daniel Vetter,
	ML dri-devel, Linux Kernel Mailing List, Benjamin GAIGNARD,
	Alexandre Torgue, Linux ARM, linux-stm32

Le jeu. 11 juil. 2019 à 13:09, Jyri Sarha <jsarha@ti.com> a écrit :
>
> 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>

Applied on drm-misc-next,
Thanks,
Benjamin

>
> > ---
> >  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
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-07-25 12:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2019-07-25 12:31   ` Benjamin Gaignard

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