Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jonas Holmberg <jonashg@axis.com>
To: <alsa-devel@alsa-project.org>
Subject: No active event for loopback
Date: Tue, 30 Mar 2021 13:13:16 +0200	[thread overview]
Message-ID: <YGMHzBpftblFSr7X@axis.com> (raw)

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

                 reply	other threads:[~2021-03-30 11:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YGMHzBpftblFSr7X@axis.com \
    --to=jonashg@axis.com \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox