Page 1 of 1

Command line commands for Stereo Soundcard

Posted: Fri Nov 03, 2017 10:29 am
by kenski1
Are there any command line commands or other commands that can be put in a .sh file for the Stereo Sound card like the two "restore" commands that set either the microphone or the RCA inputs given in the setup posting? The Wolfson audio card had all kinds of these, although they were not well documented.

Re: Command line commands for Stereo Soundcard

Posted: Sat Nov 04, 2017 1:09 pm
by flatmax
Hi there,

If you want to store/restore each boot in a custom way, here is a suggestion ...

Perhaps the best approach is to edit the file ~/.config/lxsession/LXDE-pi/autostart :

Code: Select all

nano ~/.config/lxsession/LXDE-pi/autostart
In that file, put a command (this is untested) :

Code: Select all

@xterm -e 'sudo alsactl restore'
To store the mixer settings before you reboot do :

Code: Select all

sudo alsactl store

Matt
p.s. Can you please report back with your findings ?

Re: Command line commands for Stereo Soundcard

Posted: Sun Nov 05, 2017 1:36 am
by moggyd
To activate RCA input
amixer set 'Line' cap

To stop capture
amixer set 'Line' uncap

For the mic just substitute 'Mic' for 'Line' in the above

Re: Command line commands for Stereo Soundcard

Posted: Sun Nov 05, 2017 11:48 pm
by moggyd
Also

amixer set 'Input Mux' 'Line In'
or
amixer set 'Input Mux' 'Mic'