Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 587
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Redirecting audio to HDMI

I could have sworn that I just posted about this, but I'm not seeing my post, so here goes...


When I plug my PlayBook into HDMI, I'd like the audio to stop coming out of the PlayBook speakers and start coming out of the TV.


I think I've determined that rather than calling snd_pcm_open_preferred, I need to call:


audiodevice_get(&device, &audio_device_path);


... and then:


snd_pcm_open(&pcm_handle, card, device, SND_PCM_OPEN_PLAYBACK)


... although I'm not sure what value to use for "card".


(I've tried using the value of "0", which is the value returned by snd_pcm_open_preferred)


When I do this, the sound continues to play from the PlayBook speakers, even though audiodevice_get returns a audio_device_path that refers to HDMI, and even though the device ID is 2, which matches up with:




... which shows HDMI as being 2.


Not sure what I'm doing wrong.

Posts: 21
Registered: ‎02-03-2012
My Device: PlayBook 16g
My Carrier: MTSm

Re: Redirecting audio to HDMI

I had gotten this example from Froggyface/Trevor Nunes, from some others. Show an example of how a standalone app plays audio via HDMI. should help you out.