[alsa-devel] IEC61937/SPDIF

Anssi Hannula anssi.hannula at iki.fi
Tue Jun 14 20:09:43 CEST 2011


On 14.06.2011 15:47, ajay khandelwal wrote:
> Hi All,

Hi!

I've worked with IEC61937, but I'm no ALSA expert, so I hope others
correct me if I'm wrong.

>  I have to develop driver for SPDIF output of my board connected to HDMI.
> 
> I'm not sure for following (specially IEC61937)
> 1) How should driver know if it is compressed audio or plain pcm

You can look at the bit 1 (0x02) of AES0 IEC958 channel status.

The driver generally provides IEC958 controls:
http://www.alsa-project.org/~tiwai/writing-an-alsa-driver/ch10s03.html
That are then used via hooks in "foo.pcm.hdmi.0" (or "foo.pcm.iec958.0"
for non-hdmi) definition in /usr/share/alsa/cards/foo.conf (look at
existing drivers for examples).
Applications can then set these flags by e.g. opening the ALSA audio
device as "hdmi:AES0=0x06,AES1=0x82" etc.

> 2) Is their any plugin available for IEC61937, I could see only for IEC958

No.

> 3) Who should create burst preamble, some plug in or driver.

Currently they are created by the applications themselves.

-- 
Anssi Hannula


More information about the Alsa-devel mailing list