ALSA에서 새로운 PCM 장치를 만들고 싶습니다. 덕분에ALSA PCM 플러그인존재하다 /etc/asound.conf
:
pcm.blah {
type rate
slave {
pcm <device1>
rate 48000
}
}
그런데 이름이 뭐예요 <device1>
?
이렇게 하면 aplay -L
동일한 이름을 가진 여러 장치가 표시됩니다(아래 참조).
선택하는 방법정확하게하나의 장치에 asound.conf
여러 장치의 이름이 같은 것 같나요?default
(예를 들어 아래 목록에는 최소 3개 이상의 장치가 있습니다)
root@samplerbox:~# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
blah
default:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio Device
sysdefault:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio Device
dmix:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct sample mixing device
dmix:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct sample snooping device
hw:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Hardware device with all software conversions
default:CARD=DAC
USB Audio DAC, USB Audio
Default Audio Device
sysdefault:CARD=DAC
USB Audio DAC, USB Audio
Default Audio Device
front:CARD=DAC,DEV=0
USB Audio DAC, USB Audio
Front speakers
surround21:CARD=DAC,DEV=0
USB Audio DAC, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=DAC,DEV=0
USB Audio DAC, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=DAC,DEV=0
USB Audio DAC, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=DAC,DEV=0
USB Audio DAC, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=DAC,DEV=0
USB Audio DAC, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=DAC,DEV=0
USB Audio DAC, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=DAC,DEV=0
USB Audio DAC, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=DAC,DEV=0
USB Audio DAC, USB Audio
Direct sample mixing device
dsnoop:CARD=DAC,DEV=0
USB Audio DAC, USB Audio
Direct sample snooping device
hw:CARD=DAC,DEV=0
USB Audio DAC, USB Audio
Direct hardware device without any conversions
plughw:CARD=DAC,DEV=0
USB Audio DAC, USB Audio
Hardware device with all software conversions
default:CARD=LPD8
Default Audio Device
sysdefault:CARD=LPD8
Default Audio Device
답변1
이름이 인 기기가 3개 없습니다 default
.
세 개의 장치 이름은 default:CARD=ALSA
, default:CARD=DAC
및 입니다 default:CARD=LPD8
.
하지만 다른 리샘플링 플러그인이 필요하지 않다면 아마도 hw
또는 dmix
장치 플러그인을 사용해야 할 것입니다.