내 노트북에는 온보드 사운드 카드와 연결된 블루투스 헤드셋이 있습니다. 블루투스 장치를 /etc/asound.conf
다음 에서 구성했습니다 .
# cat /etc/asound.conf
pcm.bluetooth {
type bluetooth
device 12:34:56:78:9a:bc
profile "auto"
}
ctl.bluetooth {
type bluetooth
}
이제 다음과 같은 새 오디오 장치를 지정하여 헤드셋으로 오디오를 재생할 수 있습니다.
mplayer -ao alsa:device=bluetooth file.mp3
기본 장치로 재생하려면 장치를 생략하면됩니다.
mplayer file.mp3
그러나 ALSA를 구성해야 애플리케이션별로 명시 적으로 설정할 필요없이 모든 사운드가 기본적으로 두 장치 모두에 전송됩니다.
즉 :
mplayer file.mp3
노트북 사운드 카드와 블루투스 헤드셋 모두에서 재생되어야합니다.
어떻게 할 수 있습니까?
~ / .asoundrc 에서이를 수행하는 한 가지 방법이 있습니다 . 예제는 기본 PCM으로 통합 된 온보드 및 사운드 블래스터 라이브 카드를 보여줍니다.
# duplicate audio to both devices
pcm.!default plug:both
ctl.!default {
type hw
card SB
}
pcm.both {
type route;
slave.pcm {
type multi;
slaves.a.pcm "sblive";
slaves.b.pcm "onboard";
slaves.a.channels 2;
slaves.b.channels 4;
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;
bindings.4.slave b;
bindings.4.channel 2;
bindings.5.slave b;
bindings.5.channel 3;
}
ttable.0.0 1;
ttable.1.1 1;
ttable.0.2 1; # front left
ttable.1.3 1; # front right
ttable.0.4 1; # copy front left to rear left
ttable.1.5 1; # copy front right to rear right
}
ctl.both {
type hw;
card Live;
}
pcm.onboard {
type dmix
ipc_key 1024
slave {
pcm "hw:0,1"
period_time 0
period_size 2048
buffer_size 65536
buffer_time 0
periods 128
rate 48000
channels 4
}
bindings {
0 0
1 1
2 2
3 3
}
}
pcm.sblive {
type dmix
ipc_key 2048
slave {
pcm "hw:1,0"
period_time 0
period_size 2048
buffer_size 65536
buffer_time 0
periods 128
rate 48000
channels 2
}
bindings {
0 0
1 1
}
}
ctl.onboard {
type hw
card "SB"
}
ctl.sblive {
type hw
card "Live"
}
( 출처 )
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다