-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[BUG] Regression: Failed to map card[0], port analog-output-speaker
to a stream
#132
Comments
Any progress on this? This issue depreciated the AUR package. |
@jmickelin Thanks for investigating this and sorry for the late response. Here you refer to ports:
whereas further on you mention the sink list that doesn't get to be updated:
Did I understand you correctly that in this second excerpt you refer to sink ports that are supposed to be re-read? Besides, On a side note, PulseAudio issues like this one are extremely hard to properly analyse because they depend on specific devices, PA modules in use, and even on the PA version. |
@alsimoneau What do you mean with "depreciated the AUR package"? This issue doesn't seem to be package-specific, rather a device-specific one. |
Here's the link to the AUR package: https://aur.archlinux.org/packages/indicator-sound-switcher As you can see here, it's flagged as out-of-date because of this issue. |
@alsimoneau The comment there states:
Not sure we can call it a "regression", it's more of an incomplete fix. As for the change "from legacy dependency 'libappindicator-gtk3' to 'libayatana-appindicator'", that doesn't seem to be correct as it Depends on UPDATE: I see that the AUR package has a few incorrect dependencies indeed; however it's been submitted by someone else so I can't maintain it. |
I've (seemingly) resolved the issue by enforcing a stream update after a profile switch. However to be honest, the change doesn't sit right with me as it looks more like a workaround rather than a solution. If we look closely to your logs, we can see that the streams and ports do get updated as a result of PulseAudio event handling. Here's an excerpt starting with an output item click:
The problem is actually not so much in the (lack of) update, but rather that the app tries to find a stream/port immediately upon a profile switch; PulseAudio fires change events a short while later, and they get properly handled, resulting in registering a newly available port. If I'm correct, the output will always be selected on a second click; and I can confirm it works that way for me indeed. Hence the proper solution would be to wait until PA event handling is finished, and then to try remapping the streams. Will need to ponder a bit more over that... |
I decided to go ahead and release this in 2.3.10. The issue seems too complicated to be properly resolved without update duplication: PulseAudio issues events asynchronously and there's basically no way to know how many events to expect or if a certain event is the last one. |
Describe the bug
This seems to be a regression introduced by 5fb737c.
I can no longer switch output ports when the ports reside in different profiles. The error I get is as follows (I have added some extra debugging lines to showcase what happens):
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Output should be switched correctly.
Desktop (please complete the following information):
Indicator log:
Here is the log. I have included some extra debug lines for context, as follows:
This produces the following:
Analysis
The problem seems to be that my computer's sound card only lists the ports in question when the corresponding profiles are active. That is,
hdmi-output-0
is only active when a profile likeoutput:hdmi-stereo+input:analog-stereo
is active, and converselyanalog-output-speaker
andanalog-output-headphones
are only available whenoutput:analog-stereo+input:analog-stereo
is active.This already seems to be what was addressed by 5fb737c, with these lines:
However, as shown by the logging I added to
card.find_stream_port
, the contents ofself.sinks
is never updated after switching profile! This stale information of course causes the second lookup to fail, just like the first one did.It seems prudent to force a refresh of the Pulseaudio data from within
card_switch_profile
. I have confirmed that adding the following in that function resolves the issue:The text was updated successfully, but these errors were encountered: