【鼎革‧革鼎】︰ Raspbian Stretch 《六之 H.2 》

我們將如何解讀 Asoundrc 的

The default plugin

Make a file called .asoundrc in your home and/or root directory.

vi /home/xxx/.asoundrc

copy and paste the following into the file then save it.

pcm.!default {
	type hw
	card 0
}

ctl.!default {
	type hw           
	card 0
}

 

之 default 一詞呢?

The keyword default is defined in the ALSA lib API and will always access hw:0,0 — the default device on the default soundcard. Specifying the !default name supersedes the one defined in the ALSA lib API.

aplay -D default test.wav

 

顧名思義,『 ! 』也者,重新定義原本 API 預設者『hw:0,0』呦!方說 default \neq hw:0,0 矣。若有軟體將之視為 default  \ {\equiv}_{df} \  hw:0,0

或將忽略 bluealsa 實乃首選聲音輸出者哩?!

pi@raspberrypi:~ more ~/.asoundrc  pcm.!default { 	type plug 	slave.pcm { 		type bluealsa 		device "00:02:5B:00:47:4E" 		profile "a2dp" 	} }  ctl.!default { 	type bluealsa } </pre>    <span style="color: #666699;">所以並非 jackd 無法使用藍牙喇叭︰</span> <pre class="lang:default decode:true">pi@raspberrypi:~ jackd -dalsa  -r44100 -p2048 -n4  -Pdefault
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... default|-|2048|4|44100|0|0|nomon|swmeter|-|32bit
configuring for 44100Hz, period = 2048 frames (46.4 ms), buffer = 4 periods
ALSA: final selected sample format for playback: 32bit float little-endian
You appear to be using the ALSA software "plug" layer, probably
a result of using the "default" ALSA device. This is less
efficient than it could be. Consider using a hardware device
instead rather than using the plug layer. Usually the name of the
hardwa
ALSA: use 5 periods for playback
Unknown destination port in attempted (dis)connection src_name [alsaplayer-2734:out_1] dst_name [alsa_pcm:playback_1]
Unknown destination port in attempted (dis)connection src_name [alsaplayer-2734:out_2] dst_name [alsa_pcm:playback_2]

 

恐是 QjackCtl 錯解未讀 (default) 導至哩!!

 

因此 SonicPi 亦可如是看也︰