At Tue, 14 Jun 2011 21:09:43 +0300, Anssi Hannula wrote:
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)
- 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.
- Is their any plugin available for IEC61937, I could see only for IEC958
No.
- Who should create burst preamble, some plug in or driver.
Currently they are created by the applications themselves.
There is also iec958 alsa-lib PCM plugin. But this is usable only for drivers that can take IEC958 subframes as the supported format.
Takashi