HDMI audio sink.

Soeren Grunewald soeren.grunewald at avionic-design.de
Mon Dec 5 06:05:15 PST 2011


Hi Forest,

this looks good,

On 12/05/2011 11:31 AM, forestzhu wrote:
> Hi Soeren ,
> Nice to see your reply.
> Follow your hint ,I got these 2 files.
> But none of it give me the device name.

to use alsa you dont need a device name. the output is referenced by 
cardid and output. e.g. hw:0,0 or hw:0,1

> cards:
> 0[panda]:OMAP4-panda
> 1[PandaHDMI]: -PandaHDMI

you have a second card for hdmi audio output

>                        TI OMAP4 HDMI Board
> devices:
> 2: [0-19]:digital audio capture
> 3: [0-18]:digital addio capture
> ...
> 33: : timer
>
> info:
> card:1
> device:0
> subdevice:0
> stream:PLAYBACK

and it can be used as playback device

> id: HDMI omap4-hdmi-audio-codec-0
> name:
> subname :subdevice #0
> class :0
> subclass:0
> subdevices_count:1
> subdevices_avail:1
>
>
> in /dev/ there is no things like "omap4" and "HDMI"

take a look under /dev/snd/*

>
> What can i do next?

In this case this line should work:

 > gst-launch playbin2 uri="myfile" video-sink="pvrvideosink" 
audio-sink="alsasink device=hw:1,0"

As second step you can create an alsa alias for your hdmi device. check 
your /etc/asound.conf (from details see alsa documentation)

 > pcm.!default {
 > 	type plug;
 > 	slave { pcm "hw:0,0" }
 > }
 > pcm.!hdmi {
 > 	type plug;
 > 	slave { pcm "hw:1,0" }
 > }

than you can use the alias name
 > audio-sink="alsasink device=hdmi"


hope this will help you.

PS: In general is this the same as on most desktop machines were the gfx 
card has an hdmi output. Than you have always a second audio device for 
hdmi audio only. So you have to set this device as you output device.
--
Regards,
Soeren


More information about the gstreamer-devel mailing list