RasPi에서 온보드 오디오 출력 포트와 디지털 출력 카드 (I2S Hifiberry Digi)로 오디오를 보내려고합니다. 이것은 ALSA로 가능해야합니다. 드라이버가로드되어 있고 두 사운드 장치로 개별적으로 보낼 수 있지만 결합하면 작동하지 않습니다. 이 작업을 수행하는 방법을 설명하는 몇 가지 게시물이 있지만 구성을 작동시킬 수 없습니다.
플레이로 인한 오류 :
Playing WAVE 'sin1000_48khz.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
ALSA lib pcm_params.c:2162:(snd1_pcm_hw_refine_slave) Slave PCM not usable
aplay: set_params:1059: Broken configuration for this PCM: no configurations available
"aplay -l"의 출력
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_digi], device 0: HifiBerry Digi HiFi wm8804-spdif-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
"aplay -L"의 출력
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_digi,
Default Audio Device
sysdefault:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio Device`
/etc/asound.conf의 내용
pcm.both {
type route
slave.pcm {
type multi
slaves.a.pcm "hw:0,0"
slaves.b.pcm "hw:1,0"
slaves.a.channels 2
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}
ttable.0.0 1
ttable.1.1 1
ttable.0.2 1
ttable.1.3 1
}
ctl.both {
type hw
card sndrpihifiberry
device 0
}
pcm.hifiberry {
type hw
card sndrpihifiberry
device 0
}
ctl.hifiberry {
type hw
card sndrpihifiberry
device 0
}
pcm.audioout {
type hw
card ALSA
device 0
}
ctl.audioout {
type hw
card ALSA
device 0
}
pcm.!default {
type plug
slave {
pcm both
}
}
#pcm.!default {
# type hw
# card sndrpihifiberry
# device 0
#}
ctl.!default {
type hw
card sndrpihifiberry
device 0
}