2008-04-17 06:20:44 How to choose output channels for AD1386A sound?
Ihar Hrachyshka (BELARUS)
Message: 54406 Hello!
I build my BF533-EZKIT-based board sound system on AD1386A sound. One of my board's function is to play three different stereo sound streams simultaneously on it. What I done is choosing for AD1386 '3 stereos' option. After loading the kernel, my software is able to open pcm 3 times and plays sound properly, with no glitches or smth. The only missed functionality is that I can't specify the needed subdevice I want to play a stream on. I should have the possibility to play, f.e., mplayer stream on the 3rd stereo output while the 1st and the 2nd are not used. How can I do it?
Also that would be great if I can optionally play the same stream on all the outputs.
If I'm not wrong, this can be made through asound.conf settings though I can't figer out what are the right values. If I can choose next used output through kernel interface (kobject value or smth) then please tell me where should I look into.
Here are some info (line-in playing on the 1st subdevice):
root:~> aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ad1836 [ADI ad1836], device 0: AD1836_PCM [AD1836_PCM]
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
root:~> cat /proc/asound/devices
0: [ 0] : control
16: [ 0- 0]: digital audio playback
24: [ 0- 0]: digital audio capture
33: : timer
root:~> cat /proc/asound/pcm
00-00: AD1836_PCM : AD1836_PCM : playback 3 : capture 1
root:~> cat /proc/asound/cards
0 [ad1836 ]: AD1836 - ADI ad1836
ADI ad1836 at PF4 SPORT0 rx/tx dma 1/2 err irq 10
root:~> cat /proc/asound/ad1836/registers
ADC_PEAK_1L 0xffff -63 dBFS
ADC_PEAK_1R 0xffff -63 dBFS
ADC_PEAK_2L 0xffff -63 dBFS
ADC_PEAK_2R 0xffff -63 dBFS
root:~> cat /proc/asound/ad1836/pcm0p/info
subname: subdevice #0
root:~> ls /proc/asound/ad1836/pcm0p/
info oss sub0 sub1 sub2 xrun_debug
root:~> cat /proc/asound/ad1836/pcm0p/sub0/status
tstamp : 1208611991.506408000
delay : 6441
avail : 1751
avail_max : 6188
hw_ptr : 44035799
appl_ptr : 44042240
root:~> cat /proc/asound/ad1836/pcm0p/sub1/status
root:~> cat /proc/asound/ad1836/pcm0p/sub2/status
Thanks for help.
2008-04-17 15:14:05 Re: How to choose output channels for AD1386A sound?
Mike Frysinger (UNITED STATES)
Message: 54432 i think you would have to do it via alsa config files and options to mplayer ... you may have better luck asking on the mplayer or alsa mailing lists: