Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pianobar is having trouble opening audio device #739

Closed
gorski123 opened this issue Jun 4, 2024 · 9 comments · Fixed by #769
Closed

Pianobar is having trouble opening audio device #739

gorski123 opened this issue Jun 4, 2024 · 9 comments · Fixed by #769
Assignees
Milestone

Comments

@gorski123
Copy link
Contributor

gorski123 commented Jun 4, 2024

Pianobar the underlying client we use to play Pandora streams appears to sometimes be unable to open the audio device. The user will see this as a Pandora stream that will stop playing audio. Switching streams or using the Pandora station browser to switch to a different station will usually fix the problem. Here is a log from pianobar:

pi@amplipi-inhouse:~/amplipi-dev/config/srcs $ cat v1/.config/pianobar/output 
Welcome to pianobar (2019.02.14)! Press ? for a list of commands.
(i) Control fifo at /home/pi/amplipi-dev/config/srcs/v1/.config/pianobar/ctl opened
(i) Login... Ok.
(i) Get stations... Ok.
|>  Station "Regina Spektor Radio" (189553607752814248)
(i) Receiving new playlist... Ok.
|>  "On the Radio" by "Regina Spektor" on "Begin To Hope (U.S. Version)"
/!\ Cannot open audio device.
|>  "You And I" by "Ingrid Michaelson" on "Be OK"
|>  "1234" by "Feist" on "The Reminder (Deluxe Version)"
|>  "New Soul" by "Yael Naïm" on "Yael Naïm"
pi@amplipi-inhouse:~/amplipi-dev/config/srcs $ cat v1/.config/pianobar/error 
ALSA lib pcm_dmix.c:1165:(snd_pcm_dmix_open) unable to open slave

Currently we are not sure if this happens mid song, when starting up, or when changing songs, or some combination. Current thoughts are our virtual sources are possibly interfering with pianobars behavior / expectations.

This was the original reason we had tried to add a process monitor to pianobar.
Current thoughts are we could fork pianobar and attempt to make the changes to the source ourselves. Other options are https://deviousfish.com/pianod/ and pydora as replacements for pianobar.

@rtertiaer rtertiaer added this to the 0.4.0 milestone Jun 6, 2024
@rtertiaer
Copy link
Contributor

I'm adding this to the 0.4.x board to triage before our next meeting.

@linknum23
Copy link
Contributor

One solution to this problem may be to build the latest pianobar release from source. Currently the deb package is at least several years out of date.

@linknum23
Copy link
Contributor

Our current version is 2019.02.14, there have been 3 releases since then, the latest being: 2022.04.01. Source https://github.com/PromyLOPh/pianobar/blob/master/ChangeLog

@klay2000 klay2000 self-assigned this Jun 10, 2024
@klay2000
Copy link
Contributor

Just noting here that Pianod (https://deviousfish.com/pianod/) is based on pianobar, so we probably shouldn't switch to that.

@klay2000
Copy link
Contributor

update to this:
updating pianobar didn't help, it broke the same way

Image

@linknum23
Copy link
Contributor

linknum23 commented Jun 19, 2024 via email

@klay2000
Copy link
Contributor

klay2000 commented Jun 21, 2024

So I forked pianobar and made a couple changes to the current release version, built it and replaced the binary on the inhouse amplipi and it seems like it's more stable. I'm going to let it run over the weekend but my question now is what should we do, try to get this change merged into pianobar or maintain a fork ourselves?

@gorski123
Copy link
Contributor Author

gorski123 commented Jun 21, 2024 via email

@rtertiaer
Copy link
Contributor

the updated link for changes between forks is PromyLOPh/pianobar@master...micro-nova:pianobar:master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants