No active event for loopback

Jonas Holmberg jonashg at axis.com
Tue Mar 30 13:13:16 CEST 2021


I don't get an active-event when a loopback device becomes active if 
format, rate and channels has changed.

If I use aplay and alasctl monitor it looks like this:

aplay -D hw:0,0,0 -f S32_LE -r 48000 -c 1 -s 1 /dev/zero
=>
node hw:0, #0 (3,1,0,PCM Slave Active,0) VALUE
node hw:0, #0 (3,1,0,PCM Slave Active,0) VALUE

I.e. active value is true when playback starts and false when playback 
stops.

aplay -D hw:0,0,0 -f S16_LE -r 48000 -c 1 -s 1 /dev/zero
=>
node hw:0, #0 (3,1,0,PCM Slave Format,0) VALUE
node hw:0, #0 (3,1,0,PCM Slave Active,0) VALUE

I.e. format is changed to S16_LE when playback starts and active is 
false when playback stops. But no active-event was sent when playback 
started.

The same happens if rate and channels changes:

aplay -D hw:0,0,0 -f S16_LE -r 32000 -c 1 -s 1 /dev/zero
=>
node hw:0, #0 (3,1,0,PCM Slave Rate,0) VALUE
node hw:0, #0 (3,1,0,PCM Slave Active,0) VALUE

aplay -D hw:0,0,0 -f S16_LE -r 32000 -c 2 -s 1 /dev/zero
=>
node hw:0, #0 (3,1,0,PCM Slave Channels,0) VALUE
node hw:0, #0 (3,1,0,PCM Slave Active,0) VALUE

If all params are changed back at the same time only a format event is 
sent:

aplay -D hw:0,0,0 -f S32_LE -r 48000 -c 1 -s 1 /dev/zero
=>
node hw:0, #0 (3,1,0,PCM Slave Format,0) VALUE
node hw:0, #0 (3,1,0,PCM Slave Active,0) VALUE

Do format, rate and channels events always imply that the device 
becomes active or is it a bug that no active-event is sent when the 
device becomes active if a param has changed?

/Jonas


More information about the Alsa-devel mailing list