JiriSko / amixer-webui

Web application for control ALSA volume
MIT License
53 stars 21 forks source link

Cannot find amixer components #15

Open gearhead opened 5 years ago

gearhead commented 5 years ago

This is on multiple raspberry pis. command line seems fine. but the web based solution seems to strugggle with python2:

Mar 13 10:31:45 labrune python2[181]: ALSA lib control.c:1373:(snd_ctl_open_noupdate) Invalid CTL pulse
Mar 13 10:31:45 labrune python2[181]: amixer: Control device pulse open error: No such file or directory
Mar 13 10:31:45 labrune python2[181]: 10.10.1.118 - - [13/Mar/2019 10:31:45] "GET /cards/ HTTP/1.1" 200 -
Mar 13 10:31:45 labrune python2[181]: 10.10.1.118 - - [13/Mar/2019 10:31:45] "GET /controls/?1552491103027 HTTP/1.1" 200 -
Mar 13 10:31:46 labrune python2[181]: ALSA lib control.c:1373:(snd_ctl_open_noupdate) Invalid CTL equal
Mar 13 10:31:46 labrune python2[181]: amixer: Mixer attach equal error: No such file or directory
Mar 13 10:31:46 labrune python2[181]: ALSA lib control.c:1373:(snd_ctl_open_noupdate) Invalid CTL equal
Mar 13 10:31:46 labrune python2[181]: amixer: Control equal open error: No such file or directory
Mar 13 10:31:46 labrune python2[181]: 10.10.1.118 - - [13/Mar/2019 10:31:46] "GET /equalizer/ HTTP/1.1" 200 -

I can check, but I remember it running better with Python3. Since this is on a Pi, we want to minimize packages installed. Currently using python2 as samba installs it and uses it, still (in 2019) and rather not have to install 3. The OS is Arch Linux. We do not have pulseaudi installed as we are only using alsa.

gearhead commented 5 years ago

Ok, I found a 'fix', but it is not a 'proper fix'. If I comment out lines 48 and 49 in alsamixer_webui.py, it mostly works, but does not get the card name for selecting between the cards. But the mixer works again and I can modify settings. I am guessing a change in alsa has caused this. This is in Arch, updated recently. The Alsa version is 1.1.8-1

gearhead commented 5 years ago

Ok, I am not versed in python, but shouldn't this line number 48: if self.equal is True: be if self.card is True:

I made this edit and it works but I do not get a name for my second card, just a blank space but my card's response to 'aplay -l' is:

**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: IQaudIODAC [IQaudIODAC], device 0: IQaudIO DAC HiFi pcm512x-hifi-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0

The listed card in the webui is "Broadcom Mixer" and the other is blank

also when I select 'equalizer' I get a really messed up graphic and do not think there is an equalizer

gearhead commented 4 years ago

I installed and enabled the equalizer. It appears that the sliders show up, but are not distributed such that they are useful. The resulting graphic is attached mixer_graphic This is with Python3.8.2, with the aforementioned fix: sed -i '48 s/self.equal/self.card/g' alsamixer_webui.py In summary, the name of the device, if it is not the onboard card, [bcm2835 ALSA] does not show in the drop down box. If the PCM device is disabled at boot and there is only one card, nothing shows in the box though aplay -l shows: card 0: sndrpihifiberry [snd_rpi_hifiberry_dacplus] and the equalizer, if enabled. does not display a use-able graphic.