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

Add simple volume control for jack #39

Open
flatsiedatsie opened this issue Jul 7, 2020 · 1 comment
Open

Add simple volume control for jack #39

flatsiedatsie opened this issue Jul 7, 2020 · 1 comment

Comments

@flatsiedatsie
Copy link

flatsiedatsie commented Jul 7, 2020

I support a number of addons for the Mozilla WebThings Gateway, a user friendly open source smart home controller.

I'm trying to use this USB ReSpeaker v2 with the addons, but I'm running into an issue: I can't change the volume for the headphone jack in the ways I normally would.

When I run amixer -c 1 scontrols there is no output. Unlike my other USB sound cards, this ReSpeaker USB doesn't seem to have any 'simple' control options to change the volume.

So following this forum post I found this example page, which lead me to believe that changing the volume required a complex control. The device seems to have three of those:

amixer -c 1 contents gives:

numid=3,iface=CARD,name='Keep Interface'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=2,iface=PCM,name='Capture Channel Map'
  ; type=INTEGER,access=r----R--,values=6,min=0,max=36,step=0
  : values=3,4,7,8,9,10
  | container
    | chmap-fixed=FL,FR,FC,LFE,SL,SR

numid=1,iface=PCM,name='Playback Channel Map'
  ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
  : values=0,0
  | container
    | chmap-fixed=FL,FR

However, after impementing this more complex way of changing the volume, it didnt work.

amixer -c 1 cset numid=1 13,13 should change the volume, but it results in an error:

amixer: Control hw:1 element write error: Operation not permitted

Sudo doesn't help either. It seems these basic controls are read-only.

From what I've learnt, one way around is to install Pulse Audio. But the system I'm using (the Mozilla WebThings Gateway) doesn't support this, and addons are not allowed to install new software either. So I cannot install Pulse Audio. Similarly, addons are also not allowed to change or create an asound.conf file either.

Would it be possible to implement (simple) volume control in ALSA? Other ReSpeaker hardware seems to support this (I also have a ReSpeaker Pi Hat), so it would be great if this USB device could do the same.

@soominjung
Copy link

I also think it would be really helpful if it was possible to control the volume with ALSA...

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

No branches or pull requests

2 participants