No momento, estou tentando configurar uma placa soundblaster (chipset CA106) para a saída para 4 canais.
Liguei 4 alto-falantes à saída analógica (usando plugues).
Quando estou testando os pseakers usando o utilitário speaker-test
, ele funciona bem, mas sempre que tento reproduzir um canal 4 (construído por mim) ou qualquer som multicanal (recuperado da web) com aplay
utility I não pode fazê-lo funcionar.
Estas são as informações sobre minha configuração de HW:
[root@server SurroundTestFiles]# aplay -L
default:CARD=CA0106
CA0106, CA0106
Default Audio Device
front:CARD=CA0106,DEV=0
CA0106, CA0106
Front speakers
rear:CARD=CA0106,DEV=0
CA0106, CA0106
Rear speakers
center_lfe:CARD=CA0106,DEV=0
CA0106, CA0106
Center and Subwoofer speakers
side:CARD=CA0106,DEV=0
CA0106, CA0106
Side speakers
surround40:CARD=CA0106,DEV=0
CA0106, CA0106
4.0 Surround output to Front and Rear speakers
surround41:CARD=CA0106,DEV=0
CA0106, CA0106
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=CA0106,DEV=0
CA0106, CA0106
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=CA0106,DEV=0
CA0106, CA0106
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=CA0106,DEV=0
CA0106, CA0106
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=CA0106,DEV=0
CA0106, CA0106
IEC958 (S/PDIF) Digital Audio Output
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=Intel
HDA Intel, AD198x Analog
Default Audio Device
front:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
Front speakers
surround40:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=Intel,DEV=0
HDA Intel
HDMI Audio Output
[root@server SurroundTestFiles]# alsacard
0
[root@server SurroundTestFiles]# cat /proc/asound/cards
0 [CA0106 ]: CA0106 - CA0106
Audigy SE [SB0570] at 0xcce0 irq 169
1 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0xf7ffc000 irq 82
Aqui está o comando que eu uso em ambos os casos (e a saída correspondente).
O teste do palestrante:
speaker-test -c 4 -D surround40:CA0106 -t wav
Isto reproduz o som correcto para os altifalantes correctos (4 canais para 4 altifalantes)
Aqui está a saída aplay
ao tentar reproduzir sons de 4 canais usando o mesmo dispositivo virtual (surround40):
[root@epr-servmcs-40 SurroundTestFiles]# aplay -v -D surround40:CA0106 -c 4 test-4-channels.wav
Playing WAVE 'test-4-channels.wav' : Signed 24 bit Little Endian in 3bytes, Rate 44100 Hz, Channels 4
aplay: set_params:954: Sample format non available
Se eu tentar usar aplay
sem especificar explicitamente o dispositivo, ele reproduzirá apenas o som de dois alto-falantes, consulte a saída deste teste:
[root@epr-servmcs-40 SurroundTestFiles]# aplay -v -c 4 test-4-channels.wav
Playing WAVE 'test-4-channels.wav' : Signed 24 bit Little Endian in 3bytes, Rate 44100 Hz, Channels 4
Plug PCM: Route conversion PCM (sformat=S24_3LE)
Transformation table:
0 <- 0
1 <- 1
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S24_3LE
subformat : STD
channels : 4
rate : 44100
exact rate : 44100 (44100/1)
msbits : 24
buffer_size : 7526
period_size : 940
period_time : 21333
tstamp_mode : NONE
period_step : 1
avail_min : 940
period_event : 0
start_threshold : 7526
stop_threshold : 7526
silence_threshold: 0
silence_size : 0
boundary : 986447872
Slave: Rate conversion PCM (48000, sformat=S32_LE)
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S24_3LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 24
buffer_size : 7526
period_size : 940
period_time : 21333
tstamp_mode : NONE
period_step : 1
avail_min : 940
period_event : 0
start_threshold : 7526
stop_threshold : 7526
silence_threshold: 0
silence_size : 0
boundary : 986447872
Slave: Direct Stream Mixing PCM
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S32_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 32
buffer_size : 8192
period_size : 1024
period_time : 21333
tstamp_mode : NONE
period_step : 1
avail_min : 1024
period_event : 0
start_threshold : 8192
stop_threshold : 8192
silence_threshold: 0
silence_size : 0
boundary : 1073741824
Hardware PCM card 0 'CA0106' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S32_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 32
buffer_size : 8192
period_size : 1024
period_time : 21333
tstamp_mode : ENABLE
period_step : 1
avail_min : 1024
period_event : 0
start_threshold : 1
stop_threshold : 1073741824
silence_threshold: 0
silence_size : 1073741824
boundary : 1073741824
Meu objetivo é forçar (ou permitir) aplay
a reproduzir o som de vários canais (na verdade, apenas 4 canais de som) corretamente, ou seja, usando os quatro alto-falantes.