I've developed a small application that records sound using ALSA driver on an embedded system.
Now I have a problem selecting the device that I want to record from MIC/Line IN .
The application is set to start at system start up but my default recording device is set to MIC. For my app to work I have to go to amixer and set the recording device from MIC to Line IN and then start my app.
Do you guys know a way to do this change from the app or amixer command that will change this recording device and I can put it in a script an run it at start up.
Has I said this app is running on a embedded system and I need a way to conf the system before my app starts.
EDIT1:
here is my amixer output:
root@freescale ~$ amixer
Simple mixer control 'Headphone',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 127
Front Left: 103 [81%]
Front Right: 103 [81%]
Simple mixer control 'Playback',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 192
Front Left: 192 [100%]
Front Right: 192 [100%]
Simple mixer control 'Capture',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 15
Front Left: Capture 15 [100%]
Front Right: Capture 15 [100%]
Simple mixer control 'Capture Vol Reduction',0
Capabilities: enum
Items: 'No Change' 'Reduced by 6dB'
Item0: 'No Change'
Simple mixer control 'ADC Mux',0
Capabilities: enum
Items: 'MIC_IN' 'LINE_IN'
Item0: 'MIC_IN'
Simple mixer control 'DAC Mux',0
Capabilities: enum
Items: 'DAC' 'LINE_IN'
Item0: 'DAC'
Simple mixer control 'MIC GAIN',0
Capabilities: enum
Items: '0dB' '20dB' '30dB' '40dB'
Item0: '0dB'
Thanks a lot, Gabriel