Page 1 of 1
amixer interface for squeezeplay - equivalent to alsamixer
Posted: Wed Sep 26, 2012 6:30 pm
by Wilberforce
This is lets you control the alsa mixer from within squeezeplay.
Instructions:
Code: Select all
wget http://www.jogglerwiki.com/forum/download/file.php?id=328 -O amixer.tar.gz
sudo tar -xvf amixer.tar.gz -C /opt/squeezeplay/share/jive/applets/
restart squeezeplay and select, settings --> audio settings -->
Amixer , to see the new interface.
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Wed Sep 26, 2012 7:06 pm
by themystical
Would this work with SqPOS?
Newbie question....how does one actually install this? Put the downloaded file on a stick plugged into the Joggler and SSH in with the commands in the post? Or is it just SSH in with the commands in the post and it drags the file in from source?
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Wed Sep 26, 2012 7:57 pm
by Wilberforce
Yeah, I'm pretty sure it will work with SqPOS (as long as
amixer is available). Its probably best to save it your home directory, so just cd there:
Then issue those commands above (all via ssh).
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Wed Sep 26, 2012 9:03 pm
by themystical
I would love to try this out but I am completely out of my depth! I can't seem to work out how to transfer the downloaded file on my windows laptop to the home directory on the Joggler. Putty does not seem to give me an easy option to do this. Do I need to use PSFTP: this is the sort of thing Google is bringing up. I can't use a stick because SqPOS takes up the USB port. Any chance of a step by step?
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Wed Sep 26, 2012 10:01 pm
by Wilberforce
wget will download it straight onto the joggler, so you should just be able to type the commands I said in an ssh session (no transfers necessary - if your joggler is connected to the net). Otherwise, PSCP could be the way to go.
I think you'd use something like (from windows command prompt):
Code: Select all
pscp Amixer.tar.gz joggler@192.168.0.15:~
Where the ip, is the ip for your joggler. That would copy the file to the home directory of the user, 'joggler', on your joggler. Then you could use (on the joggler):
Code: Select all
cd ~
sudo tar -xvf Amixer.tar.gz -C /opt/squeezeplay/share/jive/applets/
But I'd recommend using wget to save yourself the trouble.
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Thu Sep 27, 2012 1:15 pm
by themystical
Not tried this yet as I am not sure how to recover if it doesn't work (for example if there is no Amixer in Roobarb's Ubuntu base build for the SqPOS). Is there any way of checking? Just typing in Amixer in Putty brings the following error:
amixer: Mixer attach default error: Invalid argument
Does this mean that Amixer is not available to attach? or that it is available but simply not attached and needs your code to make this happen?
Any ideas?
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Thu Sep 27, 2012 1:27 pm
by Wilberforce
That sounds like you have
amixer installed. It shouldn't cause any issues if it isn't though - would just refuse to work. You can always remove the applet with the command:
Code: Select all
rm -rf /opt/squeezeplay/share/jive/applets/Amixer
if you type
it should list a load of simple mixer controls (these are what this controls through the interface (only playback related ones))
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Thu Sep 27, 2012 3:24 pm
by themystical
Tried this and works great! On my installation it allows master volume control and muting/unmuting of the other card devices including SPDIF through the Squeezeplay audios settings menu. There are 4 devices listed:
HDA Intel Mid - I cant do anything with this and pressing this goes no where.
Master - This provides volume control and mute function
IEC 958 - This is the SPDIF output which can be muted/unmuted - This operates on my SPDIF output
IEC 958 Default PCM - Not sure what this is but the mute/unmute function provided has no impact on the music being played.
Also by adding this applet, I cant Putty in and get the Alsa mixer and typing in Amixer returns error. These are as below
joggler@joggler:~$ alsamixer
cannot open mixer: Invalid argument
joggler@joggler:~$ amixer
amixer: Mixer attach default error: Invalid argument
All in all useful features!
This brings two questions in my mind.
The non availability of the Intel Mid device - Is this the reason I couldn't get any sound from the speakers prior to doing the SPDIF mod? Whats gone wrong?
What is the SPDIF Default device and how does this function? Any advantage in specifying this in the asound.conf? What device number would this be?
Okay....sorry these are many questions...not just two
I am keeping this feature!
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Thu Sep 27, 2012 4:01 pm
by Wilberforce
It is not especially obvious, but the first item in the list selects the sound card. If you had multiple sound cards, then you would tap this to switch between them. The internal card is identified as "HDA Intel Mid".
The master volume control only works if you don't explicitly tell it use the spdif (hw:0,1) in your asound.conf.
I've got no idea what the default pcm option does... like you say it doesn't seem to perform any useful function.
I think the errors you get with
amixer/alsamixer are more to do with your asound.conf. If you move it temporarily you should be still be able to use those commands as is. But you can also use:
to avoid doing this.
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Thu Sep 27, 2012 4:23 pm
by Wilberforce
something like:
Code: Select all
pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}
or
Code: Select all
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0"
period_time 0
period_size 1024
buffer_size 4096
}
bindings {
0 0
1 1
}
}
ctl.dmixer {
type hw
card 0
}
would allow you switch between the two using the squeezeplay interface.
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Thu Sep 27, 2012 4:57 pm
by Wilberforce
Slight bug fix: wouldn't allow 0% selection on volume - it shows a small bar, but this should be 0%
Code: Select all
cd ~
wget http://www.jogglerwiki.com/forum/download/file.php?id=330 -O AMixer.tar.gz
sudo tar -xvf AMixer.tar.gz -C /opt/squeezeplay/share/jive/applets/ --overwrite
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Fri Sep 28, 2012 2:06 pm
by themystical
This is an absolutely great feature for switching between internal speakers and SPDIF from the Squeezebox menu without messing around in command line. I think it ought to be included in Roobarb's next build of Squeezeplay.
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Fri Sep 28, 2012 3:42 pm
by JimbobVFR400
themystical wrote:This is an absolutely great feature for switching between internal speakers and SPDIF from the Squeezebox menu without messing around in command line. I think it ought to be included in Roobarb's next build of Squeezeplay.
Agreed although I don't seem to be able to get anything out of the speakers or headphone socket ATM. I wonder if I disturbed something when I did the optical mod? Are you using the asound.conf above and can you switch from optical to internal with it?
Me and thee seem to be following Wilberforce around at the moment don't we, can I just say thanks for your help Wilberforce you've been most instructive the last few days.
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Fri Sep 28, 2012 4:12 pm
by JimbobVFR400
Actually scrub that. I tried the asound.conf and also no asound.conf file at all, both cases followed by a reboot and my optical was still working but nothing from internal sound no matter what I did in your excellent amixer interface.
I then bit the bullet and chose reset to defaults in interface configuration in squeezeplay, and a reboot. As expected my optical went quiet but internal audio works, I then un-muted the IEC958 option in amixer and bingo, both the optical and internal are working perfectly and I can easily switch between them using amixer (plus you can long press and add amixer to the home screen if you want)
The moral of this I guess is that if you do the digital out mod, no editing of files is necessary at all it works out the box so to speak. Just un-muting it in Alsamixer or this add-on will do the trick.
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Fri Sep 28, 2012 6:09 pm
by themystical
JimbobVFR400 wrote:Actually scrub that. I tried the asound.conf and also no asound.conf file at all, both cases followed by a reboot and my optical was still working but nothing from internal sound no matter what I did in your excellent amixer interface.
I then bit the bullet and chose reset to defaults in interface configuration in squeezeplay, and a reboot. As expected my optical went quiet but internal audio works, I then un-muted the IEC958 option in amixer and bingo, both the optical and internal are working perfectly and I can easily switch between them using amixer (plus you can long press and add amixer to the home screen if you want)
The moral of this I guess is that if you do the digital out mod, no editing of files is necessary at all it works out the box so to speak. Just un-muting it in Alsamixer or this add-on will do the trick.
Yes Wilberforce is top man!
Actually I do have an intermitent issue since doing the SPDIF mod. As we sit, I cant get any sound from the internal speakers though the headphone output and SPDIF output are fine and I can toggle between them. I know that it is probably not a hardware/wiring fault as I have had sound from the speakers since doing the mod (as recently as yesterday). As you rightly say the SPDIF need not be selected in the asound.conf provided it has been unmuted in the
amixer. I have just tried the solution that worked for you (reset to defaults in audio settings with a reboot) and it does not seem to have solved it as I have SPDIF and headphone output but no internal speaker output. In practise, this is irrelevant as the Joggler is connected to the HiFi but it wrangles me slightly that something is not quite right!
Right, Wilberforce's EDO mod translation sounds interesting so I need to ask him some questions about that.

Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Thu Feb 13, 2014 12:18 pm
by roobarb!
I don't know how I've overlooked this! Definitely one for v1.56 if wilberforce is happy for it to be added.
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Sun Feb 16, 2014 12:44 pm
by Error
@ Roobarb, then please also add the EDO-applet if Wilberforce is ok with that aswell!
(I don't know how much work is involved with it though

)
Re: amixer interface for squeezeplay - equivalent to alsamix
Posted: Sun Feb 16, 2014 3:34 pm
by roobarb!
I looked at the EDO applet and the only way SqueezePlay would load with it installed is with the alternative jive_alsa. I'd like to know what's changed to make that binary work before I bundle it in, so any clues greatly appreciated. Wrong thread to ask, really, but thought if explain.
If it can be made to work and not interfere with basic setups, I'd like to add it. But not until I'm more familiar with its workings.