See upstream -
https://github.com/raspberrypi/documentation/issues/1671https://github.com/raspberrypi/documentation/pull/1673
Quoted here:
* Only Device Tree nodes at the top level of the tree and children of
a bus node will be probed. For nodes added at run-time there is the
further limitation that the bus must register for notifications of
the addition and removal of children. However, there are exceptions
that break this rule and cause confusion: the kernel explicitly
scans the entire tree for some device types - clocks and interrupt
controller being the two main ones - in order to (for clocks)
initialise them early and/or (for interrupt controllers) in a
particular order. This search mechanism only happens during booting
and so doesn't work for nodes added by an overlay at run-time. It is
therefore recommended for overlays to place fixed-clock nodes in the
root of the tree unless it is guaranteed that the overlay will not
be used at run-time.
The snd_bcm2835.enable_compat_alsa option:
enable_compat_alsa:Enables ALSA compatibility virtual audio device (bool)
is off these days, since the beginning of 2020 apparently.
Reference:
raspi-config (20200120) buster; urgency=medium
* Add audio switching for discrete internal ALSA devices
-- Simon Long <simon@raspberrypi.org> Mon, 20 Jan 2020 11:38:37 +0000
The "sysclk = 24000000" value is supposed to come from the "clock-frequency"
field of ac108_mclk / ac10x_mclk, but somehow it isn't on 5.4 (vs 4.19). This
is a temporary work-around. For some strange unknown reasons, this affects
only the square 4-mic device, but not the linear 4-mic nor the 6-mics device.
The other two devices have two ac108's, and seem to work fine without it.
In v4.19:
seeed_voice_card_probe [snd_soc_seeed_voicecard]
-> devm_snd_soc_register_card [snd_soc_core]
-> snd_soc_register_card [snd_soc_core]
-> seeed_voice_card_dai_init [snd_soc_seeed_voicecard]
-> asoc_simple_card_init_dai [snd_soc_simple_card_utils]
-> snd_soc_dai_set_sysclk [snd_soc_core]
-> ac108_set_sysclk [snd_soc_ac108]
In 5.4:
seeed_voice_card_probe [snd_soc_seeed_voicecard]
-> devm_snd_soc_register_card [snd_soc_core]
-> snd_soc_register_card [snd_soc_core]
-> snd_soc_instantiate_card [snd_soc_core]
-> seeed_voice_card_dai_init [snd_soc_seeed_voicecard]
-> asoc_simple_init_dai.part.0 [snd_soc_seeed_voicecard]
-> snd_soc_dai_set_sysclk [snd_soc_core]
-> ac108_set_sysclk [snd_soc_ac108]
Which results in the "ac108_set_sysclk :24000000" kernel message.
Note the extra snd_soc_instantiate_card(), and the copied/renamed
asoc_simple_init_dai() - it became static and not-available to other drivers
in v5.x.
See https://github.com/respeaker/seeed-voicecard/issues/246
commit 0812a08ac8d054efc6cf2895d3b0e82c8731f8e9
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri May 15 09:48:02 2020 +0900
ASoC: cleanup dai / component active code
No one is using dai->active, snd_soc_component_is_active().
Let's remove these.
commit efffd9b344adbf813e3ae6f6136df80000bf2833
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri May 15 09:46:37 2020 +0900
ASoC: soc-dai: add snd_soc_dai_active()
Current snd_soc_dai_action() is updating
dai->stream_active for Playback/Capture (A),
dai->active for DAI (B)
void snd_soc_dai_action(struct snd_soc_dai *dai,
int stream, int action)
{
(A) dai->stream_active[stream] += action;
(B) dai->active += action;
dai->component->active += action;
}
But, these are very verbose, because we can calculate
DAI active from stream_active.
This patch adds snd_soc_dai_active() which calculate
DAI active from DAI stream_active.
The "-c 1" was simply wrong. The default (-c 0) sound device of
older kernel / alsa has a numid=3 selector for auto vs headphone vs hdmi .
Newer kernel simply has multiple devices. Also, headphone is -c 0 .
$ amixer contents
numid=2,iface=MIXER,name='Headphone Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=1,iface=MIXER,name='Headphone Playback Volume'
; type=INTEGER,access=rw---R--,values=1,min=-10239,max=400,step=0
: values=-2000
| dBscale-min=-102.39dB,step=0.01dB,mute=1
TODO: For now, broadly dividing by kernel v4.x vs v5.x is good enough, but
it would be nice to find out when / which kernel /alsa this is relevant.
closes https://github.com/respeaker/seeed-voicecard/issues/240
It was made private in v5.2:
commit ad934ca8010843482d61fda46786449a9bc99e10
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Wed Mar 20 13:55:52 2019 +0900
ASoC: simple-card-utils: share asoc_simple_dai_init()
The init code was extracted into asoc_simple_card_init_priv(), with
additional comments.
commit 65a5056b21202eff7f54243e587183f4bb6ed352
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Wed Mar 20 13:56:26 2019 +0900
ASoC: simple-card-utils: share asoc_simple_card_init_priv()
The difference between simple-card / audio-graph are just using
OF graph style, or not. In other words, other things should be same.
This means, simple-card/audio-graph common functions should be
implemented at simple-card-utils, and its own functions should be
implemented at each files.
Current simple-card / audio-graph are initializing each priv,
but it is same operation.
This patch adds new asoc_simple_card_init_priv() and initialize
priv by same operation.
commit f107294c6422e772773b53dbf802186175b6289e
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Thu Jun 6 13:07:35 2019 +0900
ASoC: simple-card: support snd_soc_dai_link_component style for cpu
ASoC supports modern style dai_link (= snd_soc_dai_link_component) for
CPU. legacy style dai_link (= cpu_dai_name, cpu_name, cpu_of_node) are
no longer needed.
This patch switches to modern style.