Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8193633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:32:27+00:00 2026-06-07T04:32:27+00:00

I’ve developed a small application that records sound using ALSA driver on an embedded

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T04:32:30+00:00Added an answer on June 7, 2026 at 4:32 am

    I finally did it. I’m using amixer with “cset” command to do it.

    amixer -c 0 cset numid=7 1
    

    “-c 0” is the first sound card
    “numid=7” is the recording device that is active.
    “1” is the second intput … in my case 0-MIC 1-LINEIN

    amixer info  
    

    Gets all the controls with their numids ex:

        amixer info
    Card default 'mxsevk'/'mxs-evk (SGTL5000)'
      Mixer name    : ''
      Components    : ''
      Controls      : 7
      Simple ctrls  : 7
    root@freescale ~$ amixer contents
    numid=5,iface=MIXER,name='Headphone Volume'
      ; type=INTEGER,access=rw---,values=2,min=0,max=127,step=0
      : values=103,103
    numid=7,iface=MIXER,name='ADC Mux'
      ; type=ENUMERATED,access=rw---,values=1,items=2
      ; Item #0 'MIC_IN'
      ; Item #1 'LINE_IN'
      : values=1
    numid=3,iface=MIXER,name='Capture Vol Reduction'
      ; type=ENUMERATED,access=rw---,values=1,items=2
      ; Item #0 'No Change'
      ; Item #1 'Reduced by 6dB'
      : values=0
    numid=2,iface=MIXER,name='Capture Volume'
      ; type=INTEGER,access=rw---,values=2,min=0,max=15,step=0
      : values=15,15
    numid=4,iface=MIXER,name='Playback Volume'
      ; type=INTEGER,access=rw---,values=2,min=0,max=192,step=0
      : values=192,192
    numid=6,iface=MIXER,name='DAC Mux'
      ; type=ENUMERATED,access=rw---,values=1,items=2
      ; Item #0 'DAC'
      ; Item #1 'LINE_IN'
      : values=0
    numid=1,iface=MIXER,name='MIC GAIN'
      ; type=ENUMERATED,access=rw---,values=1,items=4
      ; Item #0 '0dB'
      ; Item #1 '20dB'
      ; Item #2 '30dB'
      ; Item #3 '40dB'
      : values=0
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.