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

RPI4 - Bullseye 64bit Issue or Container Issue (ver: Master) #75

Open
NickJLange opened this issue Jul 29, 2022 · 7 comments
Open

RPI4 - Bullseye 64bit Issue or Container Issue (ver: Master) #75

NickJLange opened this issue Jul 29, 2022 · 7 comments

Comments

@NickJLange
Copy link

The problem

So having done a fresh clone/build with buildah using the Dockerfile on bullseye 64-bit (light) - I get the below error. After a bit of googling, there seems to be some major breakage in raspian between buster and bullseye releases which might be the issue? At any rate, I wanted to raise the issue in case someone else stumbles across it - if I get some time I might dig deeper.

What commit exhibits the issue?

master

Was there a last known working commit?

nope

What type of installation are you running?

Docker

With which python3 version do you run Receiver?

Docker version

OS the receiver runs on

bullseye

OS the sender runs

OSX

Which sender client was used

Photos

Command invocation

same as README.md

Please include --debug output which helps to illustrate the problem

[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[Receiver]: Name: ap2
[Receiver]: Enabled features: 0001c300405f4200
[Receiver]: FeatureFlags.Ft48TransientPairing|Ft47PeerManagement|Ft46HomeKitPairing|Ft41_PTPClock|Ft40BufferedAudio|Ft30UnifiedAdvertisingInfo|Ft22AudioUnencrypted|Ft20ReceiveAudioAAC_LC|Ft19ReceiveAudioALAC|Ft18ReceiveAudioPCM|Ft17AudioMetaTxtDAAP|Ft16AudioMetaProgress|Ft14MFiSoft_FairPlay|Ft09AirPlayAudio
amixer: Mixer attach default error: No such file or directory
Traceback (most recent call last):
  File "ap2-receiver.py", line 1426, in <module>
    setup_global_structs(args, isDebug=DEBUG)
  File "ap2-receiver.py", line 202, in setup_global_structs
    volume = get_volume()
  File "/airplay2/ap2/utils.py", line 224, in get_volume
    line_pct = subprocess.check_output(["amixer", "get", "PCM"]).splitlines()[-1]
  File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['amixer', 'get', 'PCM']' returned non-zero exit status 1.

Additional information

No response

@Neustradamus
Copy link
Contributor

@systemcrash, @LewdNeko: What do you think?

@Crazsped
Copy link

Also getting this error, but on Raspbian

@TheSpookyCat
Copy link
Contributor

@Neustradamus I only have a Windows machine right now & am not experiencing issues. I won't be much help here 😅

@teh-hippo
Copy link

I also have this issue

@teh-hippo
Copy link

I've worked out the issue. It's caused by the device name in amixer. The below modification worked for me.

diff --git a/ap2/utils.py b/ap2/utils.py
index 7bfcf12..bf4dee5 100644
--- a/ap2/utils.py
+++ b/ap2/utils.py
@@ -221,7 +221,7 @@ def get_volume():
                 pct = 0
         vol = interpolate(pct, 0, 100, -30, 0)
     elif subsys == "Linux":
-        line_pct = subprocess.check_output(["amixer", "get", "PCM"]).splitlines()[-1]
+        line_pct = subprocess.check_output(["amixer", "get", "Headphone"]).splitlines()[-1]
         m = re.search(b"\[([0-9]+)%\]", line_pct)
         if m:
             pct = int(m.group(1))
@@ -255,7 +255,7 @@ def set_volume(vol):
     elif subsys == "Linux":
         pct = int(interpolate(vol, -30, 0, 45, 100))

-        subprocess.run(["amixer", "set", "PCM", f"{pct}%%"])
+        subprocess.run(["amixer", "set", "Headphone", f"{pct}%%"])
     elif subsys == "Windows":
         volume_session = get_pycaw_volume_session()
         if volume_session:

@systemcrash
Copy link
Member

is "headphone" a local modification for you, or one that applies globally for everyone on Linux?

@teh-hippo
Copy link

teh-hippo commented Sep 9, 2022 via email

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

No branches or pull requests

6 participants