All of lore.kernel.org
 help / color / mirror / Atom feed
* exynos drm hdmi audio: how to recieve audio parameters (sf, bps, channel count)
@ 2012-07-17  6:12 RAHUL SHARMA
  2012-07-19 12:22 ` Rob Clark
  0 siblings, 1 reply; 6+ messages in thread
From: RAHUL SHARMA @ 2012-07-17  6:12 UTC (permalink / raw)
  To: dri-devel, SUNIL JOSHI, prashanth.g, prathyush.k, padma.v,
	rcsekar, s.shirish, fahad.k, sunilm, jy0922.shim, sw0312.kim

hi,

I am adding support for hdmi audio, inside exynos drm hdmi driver. Hdmi audio is initialized with default parameters. I want to implement the mechanism to update hdmi registers, whenever audio properties got changed (i2s/spdif). raedon/r600 drm dirver is polling the audio ip every 100 ms and reconfigure the hdmi audio block. This is not possible with exynos as all information cannot be collected from i2s tx registers. It is directly set on wm8994 connected through i2c. 
Possible solution:
1) drm driver exposing ioctl for setting audio parameters.
2) alsa driver notifying the change in audio parameters through kernel notifiers. drm hdmi driver subscribed for the same.

Please suggest me a good way to implement this.

regards,
Rahul Sharma.

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

* Re: exynos drm hdmi audio: how to recieve audio parameters (sf, bps, channel count)
  2012-07-17  6:12 RAHUL SHARMA
@ 2012-07-19 12:22 ` Rob Clark
  2012-07-19 13:42   ` Lars-Peter Clausen
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Clark @ 2012-07-19 12:22 UTC (permalink / raw)
  To: rahul.sharma
  Cc: sunilm, prathyush.k, rcsekar, padma.v, sw0312.kim, SUNIL JOSHI,
	dri-devel, fahad.k, prashanth.g, s.shirish

On Tue, Jul 17, 2012 at 1:12 AM, RAHUL SHARMA <rahul.sharma@samsung.com> wrote:
> hi,
>
> I am adding support for hdmi audio, inside exynos drm hdmi driver. Hdmi audio is initialized with default parameters. I want to implement the mechanism to update hdmi registers, whenever audio properties got changed (i2s/spdif). raedon/r600 drm dirver is polling the audio ip every 100 ms and reconfigure the hdmi audio block. This is not possible with exynos as all information cannot be collected from i2s tx registers. It is directly set on wm8994 connected through i2c.
> Possible solution:
> 1) drm driver exposing ioctl for setting audio parameters.
> 2) alsa driver notifying the change in audio parameters through kernel notifiers. drm hdmi driver subscribed for the same.

I am certainly not an audio expert, but I am pretty sure something
along the lines of solution #2 would be better.  I don't think
userspace would want to know about some exynos drm specific ioctls in
order to make audio work.

BR,
-R

> Please suggest me a good way to implement this.
>
> regards,
> Rahul Sharma.
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: exynos drm hdmi audio: how to recieve audio parameters (sf, bps, channel count)
  2012-07-19 12:22 ` Rob Clark
@ 2012-07-19 13:42   ` Lars-Peter Clausen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars-Peter Clausen @ 2012-07-19 13:42 UTC (permalink / raw)
  To: rahul.sharma
  Cc: padma.v, sunilm, s.shirish, rcsekar, prathyush.k, sw0312.kim,
	SUNIL JOSHI, dri-devel, Rob Clark, fahad.k, prashanth.g

On 07/19/2012 02:22 PM, Rob Clark wrote:
> On Tue, Jul 17, 2012 at 1:12 AM, RAHUL SHARMA <rahul.sharma@samsung.com> wrote:
>> hi,
>>
>> I am adding support for hdmi audio, inside exynos drm hdmi driver. Hdmi audio is initialized with default parameters. I want to implement the mechanism to update hdmi registers, whenever audio properties got changed (i2s/spdif). raedon/r600 drm dirver is polling the audio ip every 100 ms and reconfigure the hdmi audio block. This is not possible with exynos as all information cannot be collected from i2s tx registers. It is directly set on wm8994 connected through i2c.
>> Possible solution:
>> 1) drm driver exposing ioctl for setting audio parameters.
>> 2) alsa driver notifying the change in audio parameters through kernel notifiers. drm hdmi driver subscribed for the same.
> 
> I am certainly not an audio expert, but I am pretty sure something
> along the lines of solution #2 would be better.  I don't think
> userspace would want to know about some exynos drm specific ioctls in
> order to make audio work.
> 
> BR,
> -R


I don't know how the audio setup for exynos HDMI hardware looks like, so
this might not be applicable in this case. But what I did for HDMI
transmitter I was working on, is to register a ASoC codec device as a
subdevice to the HDMI transmitter. All access to the sound registers is done
from that subdevice and you don't need any special notifier hooks, since you
can use the normal alsa driver callbacks.

It might be a good idea if you could describe how your setup looks exactly.
E.g. which components does the audio stream pass through, where does it
originate and how the different components related to each other.

- Lars

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

* RE: exynos drm hdmi audio: how to recieve audio parameters (sf, bps, channel count)
       [not found] <0M7E0082BJMPC170@ms10.samsung.com>
@ 2012-07-20  5:55 ` Kyungmin Park
  0 siblings, 0 replies; 6+ messages in thread
From: Kyungmin Park @ 2012-07-20  5:55 UTC (permalink / raw)
  To: rahul.sharma, dri-devel, 'SUNIL JOSHI',
	'PRASHANTH GODREHAL', 'Prathyush Kalashwaram',
	'PADMAVATHI VENNA', 'CHANDRASEKAR RAMAKRISHNAN',
	'SHIRISH S', 'FAHAD KUNNATHADI',
	'SUNIL M', 'Joonyoung Shim',
	'Seung-Woo Kim', inki.dae


[-- Attachment #1.1.1: Type: text/plain, Size: 1765 bytes --]

Hi, 

 

I bet 1st option. And configure it at user space. IOW set the proper ALSA
kcontrol. And set the proper DRM audio config by IOCTL..

Any other opinions?

Thank you,
Kyungmin Park

From: RAHUL SHARMA [mailto:rahul.sharma@samsung.com] 
Sent: Thursday, July 19, 2012 6:57 PM
To: dri-devel@lists.freedesktop.org; SUNIL JOSHI; PRASHANTH GODREHAL;
Prathyush Kalashwaram; PADMAVATHI VENNA; CHANDRASEKAR RAMAKRISHNAN; SHIRISH
S; FAHAD KUNNATHADI; SUNIL M; Joonyoung Shim; Seung-Woo Kim;
inki.dae@samsung.com; kyungmin.park@samsung.com
Subject: Fwd: exynos drm hdmi audio: how to recieve audio parameters (sf,
bps, channel count)

 

Hi Inki,

 

Please suggest me a solution for this problem.

 

regards,

Rahul Sharma

 

------- Original Message -------

Sender : RAHUL SHARMA<rahul.sharma@samsung.com> ./Technical
Manager/SISO-Solution 1/Samsung Electronics

Date : Jul 17, 2012 11:42 (GMT+05:30)

Title : exynos drm hdmi audio: how to recieve audio parameters (sf, bps,
channel count)

 

hi,

I am adding support for hdmi audio, inside exynos drm hdmi driver. Hdmi
audio is initialized with default parameters. I want to implement the
mechanism to update hdmi registers, whenever audio properties got changed
(i2s/spdif). raedon/r600 drm dirver is polling the audio ip every 100 ms and
reconfigure the hdmi audio block. This is not possible with exynos as all
information cannot be collected from i2s tx registers. It is directly set on
wm8994 connected through i2c. 
Possible solution:
1) drm driver exposing ioctl for setting audio parameters.
2) alsa driver notifying the change in audio parameters through kernel
notifiers. drm hdmi driver subscribed for the same.

Please suggest me a good way to implement this.

regards,
Rahul Sharma. 

 

 

 




 


[-- Attachment #1.1.2: Type: text/html, Size: 6577 bytes --]

[-- Attachment #1.2: image001.jpg --]
[-- Type: image/jpeg, Size: 72722 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: RE: exynos drm hdmi audio: how to recieve audio parameters (sf, bps, channel count)
@ 2012-07-20 11:44 RAHUL SHARMA
  2012-07-20 14:05 ` Lars-Peter Clausen
  0 siblings, 1 reply; 6+ messages in thread
From: RAHUL SHARMA @ 2012-07-20 11:44 UTC (permalink / raw)
  To: Kyungmin Park, dri-devel@lists.freedesktop.org, SUNIL JOSHI,
	PRASHANTH GODREHAL, Prathyush Kalashwaram, PADMAVATHI VENNA,
	CHANDRASEKAR RAMAKRISHNAN, SHIRISH S, FAHAD KUNNATHADI, SUNIL M,
	Joonyoung Shim, Seung-Woo Kim, In-Ki Dae


On Fri, Jul 20, 2012 at 11:40 AM, RAHUL SHARMA <rahul.sharma@samsung.com> wrote:
>
>
> ------- Original Message -------
> Sender : Lars-Peter Clausen<lars@metafoo.de>
> Date : Jul 19, 2012 19:12 (GMT+05:30)
> Title : Re: exynos drm hdmi audio: how to recieve audio parameters (sf, bps, channel count)
>
> On 07/19/2012 02:22 PM, Rob Clark wrote:
>> On Tue, Jul 17, 2012 at 1:12 AM, RAHUL SHARMA wrote:
>>> hi,
>>>
>>> I am adding support for hdmi audio, inside exynos drm hdmi driver. Hdmi audio is initialized with default parameters. I want to implement the mechanism to update hdmi registers, whenever audio properties got changed (i2s/spdif). raedon/r600 drm dirver is polling the audio ip every 100 ms and reconfigure the hdmi audio block. This is not possible with exynos as all information cannot be collected from i2s tx registers. It is directly set on wm8994 connected through i2c.
>>> Possible solution:
>>> 1) drm driver exposing ioctl for setting audio parameters.
>>> 2) alsa driver notifying the change in audio parameters through kernel notifiers. drm hdmi driver subscribed for the same.
>>
>> I am certainly not an audio expert, but I am pretty sure something
>> along the lines of solution #2 would be better.  I don't think
>> userspace would want to know about some exynos drm specific ioctls in
>> order to make audio work.
>>
>> BR,
>> -R
>
>
> I don't know how the audio setup for exynos HDMI hardware looks like, so
> this might not be applicable in this case. But what I did for HDMI
> transmitter I was working on, is to register a ASoC codec device as a
> subdevice to the HDMI transmitter. All access to the sound registers is done
> from that subdevice and you don't need any special notifier hooks, since you
> can use the normal alsa driver callbacks.
>
> It might be a good idea if you could describe how your setup looks exactly.
> E.g. which components does the audio stream pass through, where does it
> originate and how the different components related to each other.
>
> - Lars

Thanks Lars, Rob, Kyungmin,

In exynos, i2s and spdif DAIs configure the i2s, spdif tx IP regs. In hw, I2s and
spdif tx o/p pins are also connected to the i2s-In and spdif-In blocks of hdmi tx.
Drm hdmi sub driver needs to configure the i2s-In and spdif-In blocks with the
same setting as in i2s and spdif tx IPs. Hdmi is solely accessed by drm driver
where hdmi is registered as a sub-driver along with lcd sub-driver. I hope, I am
able to explain the flow and connections, through above.

Lars, how can I refer your implementation where Adding 'hdmi audio' as a seperate
subdrv. If I understand correctly, it will be exposed as a seperate sound card,
parallel to i2s and spdif cards, which user app accesses and configure and about
scenarios with hpd.

Kyungmin, about adding ioctl; it looks clean, but as Rob stated, is it a right way as drm
framework is primarily meant for gfx/video configurations? Please exaplin me this point.

- Rahul Sharma

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

* Re: exynos drm hdmi audio: how to recieve audio parameters (sf, bps, channel count)
  2012-07-20 11:44 RE: exynos drm hdmi audio: how to recieve audio parameters (sf, bps, channel count) RAHUL SHARMA
@ 2012-07-20 14:05 ` Lars-Peter Clausen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars-Peter Clausen @ 2012-07-20 14:05 UTC (permalink / raw)
  To: rahul.sharma
  Cc: SUNIL M, SHIRISH S, PADMAVATHI VENNA, Prathyush Kalashwaram,
	Seung-Woo Kim, SUNIL JOSHI, dri-devel@lists.freedesktop.org,
	In-Ki Dae, Kyungmin Park, FAHAD KUNNATHADI, PRASHANTH GODREHAL,
	CHANDRASEKAR RAMAKRISHNAN

On 07/20/2012 01:44 PM, RAHUL SHARMA wrote:
> 
> On Fri, Jul 20, 2012 at 11:40 AM, RAHUL SHARMA <rahul.sharma@samsung.com> wrote:
>>
>>
>> ------- Original Message -------
>> Sender : Lars-Peter Clausen<lars@metafoo.de>
>> Date : Jul 19, 2012 19:12 (GMT+05:30)
>> Title : Re: exynos drm hdmi audio: how to recieve audio parameters (sf, bps, channel count)
>>
>> On 07/19/2012 02:22 PM, Rob Clark wrote:
>>> On Tue, Jul 17, 2012 at 1:12 AM, RAHUL SHARMA wrote:
>>>> hi,
>>>>
>>>> I am adding support for hdmi audio, inside exynos drm hdmi driver. Hdmi audio is initialized with default parameters. I want to implement the mechanism to update hdmi registers, whenever audio properties got changed (i2s/spdif). raedon/r600 drm dirver is polling the audio ip every 100 ms and reconfigure the hdmi audio block. This is not possible with exynos as all information cannot be collected from i2s tx registers. It is directly set on wm8994 connected through i2c.
>>>> Possible solution:
>>>> 1) drm driver exposing ioctl for setting audio parameters.
>>>> 2) alsa driver notifying the change in audio parameters through kernel notifiers. drm hdmi driver subscribed for the same.
>>>
>>> I am certainly not an audio expert, but I am pretty sure something
>>> along the lines of solution #2 would be better.  I don't think
>>> userspace would want to know about some exynos drm specific ioctls in
>>> order to make audio work.
>>>
>>> BR,
>>> -R
>>
>>
>> I don't know how the audio setup for exynos HDMI hardware looks like, so
>> this might not be applicable in this case. But what I did for HDMI
>> transmitter I was working on, is to register a ASoC codec device as a
>> subdevice to the HDMI transmitter. All access to the sound registers is done
>> from that subdevice and you don't need any special notifier hooks, since you
>> can use the normal alsa driver callbacks.
>>
>> It might be a good idea if you could describe how your setup looks exactly.
>> E.g. which components does the audio stream pass through, where does it
>> originate and how the different components related to each other.
>>
>> - Lars
> 
> Thanks Lars, Rob, Kyungmin,
> 
> In exynos, i2s and spdif DAIs configure the i2s, spdif tx IP regs. In hw, I2s and
> spdif tx o/p pins are also connected to the i2s-In and spdif-In blocks of hdmi tx.
> Drm hdmi sub driver needs to configure the i2s-In and spdif-In blocks with the
> same setting as in i2s and spdif tx IPs. Hdmi is solely accessed by drm driver
> where hdmi is registered as a sub-driver along with lcd sub-driver. I hope, I am
> able to explain the flow and connections, through above.

With this setup, I think, implementing the HDMI audio as a ASoC codec driver
is the right approach.

> 
> Lars, how can I refer your implementation where Adding 'hdmi audio' as a seperate
> subdrv. If I understand correctly, it will be exposed as a seperate sound card,
> parallel to i2s and spdif cards, which user app accesses and configure and about
> scenarios with hpd.

With ASoC you can build complex sound card consisting out of multiple
components. E.g. SPDIF DAI + HDMI codec is a sound card and the settings
applied to that sound card will be send to both the SPDIF DAI and the HDMI
codec, so you can be sure that both have a matching config. You need to have
a ASoC board driver though which describes how DAI and codec are
interconnected, but you'll need that anyway to get a sound card for the
SPDIF controller instantiated, so that should not be a problem.

> 
> Kyungmin, about adding ioctl; it looks clean, but as Rob stated, is it a right way as drm
> framework is primarily meant for gfx/video configurations? Please exaplin me this point.

>From a technical point of view using a custom IOCTL for this is a bad idea,
since you'll require special tools to make sound over HDMI work, while by
using the method described above the standard tools will work out of the box.

- Lars

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

end of thread, other threads:[~2012-07-20 14:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-20 11:44 RE: exynos drm hdmi audio: how to recieve audio parameters (sf, bps, channel count) RAHUL SHARMA
2012-07-20 14:05 ` Lars-Peter Clausen
     [not found] <0M7E0082BJMPC170@ms10.samsung.com>
2012-07-20  5:55 ` Kyungmin Park
  -- strict thread matches above, loose matches on Subject: below --
2012-07-17  6:12 RAHUL SHARMA
2012-07-19 12:22 ` Rob Clark
2012-07-19 13:42   ` Lars-Peter Clausen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.