From: GitHub issues - opened <github@alsa-project.org>
To: alsa-devel@alsa-project.org
Subject: Dynamic PCM switching in ALSA with multi room audio sync support
Date: Thu, 13 Mar 2025 09:34:33 +0100 (CET) [thread overview]
Message-ID: <182c4fc6c4274600-webhooks-bot@alsa-project.org> (raw)
In-Reply-To: <182c4fc6c3010c00-webhooks-bot@alsa-project.org>
alsa-project/alsa-lib issue #443 was opened from Asikbct:
**Challenges:**
The PCM device is already opened by applications, making it difficult to switch to a new output seamlessly. Since most Music Service SDKs initialize the PCM device at startup, re-initializing it would require users to manually reopen their streaming app and re-select the device, negatively impacting the user experience.
**Requirement:**
User can switch between different audio output options (Line Out, Optical, USB Out, Bluetooth, etc.) at any time. The transition to a new output should be seamless, whether the user is currently playing a song from any music sources. Playback should resume on the newly selected output without requiring the user to manually reopen the content provider app and restart playback from the beginning.
**Problems:**
1. **Reopening the PCM**
Most music services open and configure the PCM device during initialization. Changing the PCM device (e.g., switching from Line Out to Optical Out) requires reopening it, which forces music services to reinitialize. This may require the end user to relaunch the respective app, reselect the device, and restart playback, impacting the user experience.
2. **Multiroom Sync**
Many music services that support multiroom synchronization rely on Linux ALSA APIs like snd_pcm_delay() to estimate the kernel buffer fill level and synchronize audio playback across devices. Any new approach to meet the requirements, should not disrupt this synchronization.
I've tried virtual loopback, PulseAudio, and a customized dswitch plugin. While all these methods enable dynamic PCM switching, I couldn't achieve stable long-term latency on the same PCM. Any guidance or suggestions on achieving stable long-term latency along with dynamic PCM switching would be greatly appreciated.
Issue URL : https://github.com/alsa-project/alsa-lib/issues/443
Repository URL: https://github.com/alsa-project/alsa-lib
parent reply other threads:[~2025-03-13 8:35 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <182c4fc6c3010c00-webhooks-bot@alsa-project.org>]
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=182c4fc6c4274600-webhooks-bot@alsa-project.org \
--to=github@alsa-project.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.