Welcome!

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

Reply
Developer
guru2000at
Posts: 101
Registered: ‎02-25-2011
My Device: Playbook, q5, z10
My Carrier: TM
Accepted Solution

Preferred PCM

Preferred PCM vs Other PSM

 

while i was investigating how to record sound and some other sound regarding issues, i came across:
https://bdsc.webapps.blackberry.com/native/reference/com.qnx.doc.neutrino.audio/topic/architecture_c...

so i was interested in the last part of hte documention:
"You can list the devices that are on your system by typing:

ls /dev/snd"

 

i investigated this point and here is the output:

 

$ ls -la /dev/snd
total 0
-rw-rw-rw-   1 root      nto               0 Jan 04 12:27 controlC0
-rw-rw-rw-   1 root      nto               0 Jan 03 18:16 mixerC0D0
-rw-rw-rw-   1 root      nto               0 Jan 04 11:09 pcmC0D0c
-rw-rw-rw-   1 root      nto               0 Jan 04 12:27 pcmC0D0p
-rw-rw-rw-   1 root      nto               0 Jan 03 18:17 pcmC0D1p
-rw-rw-rw-   1 root      nto               0 Jan 04 12:27 pcmC0D2p
-rw-rw-rw-   1 root      nto               0 Jan 04 12:27 pcmC0D3p
-rw-rw-rw-   1 root      nto               0 Jan 04 12:27 pcmC0D4c
-rw-rw-rw-   1 root      nto               0 Jan 04 12:27 pcmC0D5c
-rw-rw-rw-   1 root      nto               0 Jan 04 12:27 pcmC0D5p
-rw-rw-rw-   1 root      nto               0 Jan 04 12:27 pcmC0D6c
lrw-rw-rw-   1 root      nto               0 Jan 04 12:27 pcmPreferredc -> pcmC0D0c
lrw-rw-rw-   1 root      nto               0 Jan 04 12:27 pcmPreferredp -> pcmC0D1p

 

an image in the docu show pcmC0D0p as some kind of "standard" pcm, but the preferred is linked to pcmC0D1p.

does anybody know why ?

 

 

________________
mappau Dev Team
blackberry@mappau.com
twitter: mappau
Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Preferred PCM

Hi,

 

The diagram in the linked site is just a generic diagram of audio devices and does not reflect the preferred PCM. To determine the preferred PCM you have a few options:
Synchronously - use

audiodevice_get()

 

 Asynchronously - call

audiodevice_request_events() 

Before your BPS loop then check for audio change events using

 audiodevice_event_get_path()

 

Regards,

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Developer
guru2000at
Posts: 101
Registered: ‎02-25-2011
My Device: Playbook, q5, z10
My Carrier: TM

Re: Preferred PCM

thx for the clarification

________________
mappau Dev Team
blackberry@mappau.com
twitter: mappau
Please use plain text.