Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So here is my pickle. I am very new to linux and to make matters worse i am working on an embedded system and not a PC. i have been searching for this topic but almost everything i find shows just 1 recording device.
we have a codec/sound card that has 2 input channels and 2 output channels and i need all of them at the same time. when i run my code to capture the audio samples i am only getting 1 channel and not the other. when i do arecord it is the same result.
my first series of questions are: Does ALSA only do 1 input at a time by default? if so is there a way to change that? if not does it mix the 2 inputs when doing an arecord or do i have to specify which channel i want?
my other thought about my issue is that it isn't being routed properly and it is taking the samples off an input that is not connected to anything. the thing is i can't figure out, in the OS, which port it thinks it is connected to. i think that is too deep into the hardware for linux to have an idea about that.
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
Rep:
Hi DeusDingo,
For live recording in linux, jack (or jack2) is usually installed as an audio server, interacting with alsa (and pulseaudio if that is also installed), usually along with a whole other suite of tools. I have never heard of anyone doing multichannel recording without jack, at the very least.
Could you provide a bit of extra info on your setup ? For example:
Hardware: computer make and model / CPU class and version / amount of RAM / sound card (internal, external - which make and model) ... anything else
Software: version of linux you are using, desktop environment, sound recording and / or editing software ....
so as i mentioned i am on an embedded system so this is going to be a little hard for me to get help, i am aware of that. it is running on a TI AM4378 ARM A9, it has 2 Gb of ram, the sound is coming out of a TI AIC3106 codec which is 2 channels (2 in, 2 out).
My linux version is 4.9.69 ubuntu
the special software is an application being developed.
so here is more information:
when i do "amixer" i get:
...
Simple mixer control 'Left PGA Mixer Line1L',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
...
which, if "Mono: Playback" means the samples are being collected is right
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
Rep:
Hi again Deus,
Sorry - I had missed your original mention of an embedded system. I am unlikely to be able to offer much assistance, given my almost total unfamiliarity with such systems.
Your objective seems to be able to go quite low-level in your attempt to use the embedded audio device's native capabilities in a non-standard way (or at least relatively) for multichannel recording under linux. Perhaps other members here have tackled the issue before and will pipe in.
One place you might be able to get some help is on the linux musician's forum:
i know i have little chance of getting help in such a specialized environment. i have posts around to different forums to try and get an answer. i appreciate you looking though
so when i do:
amixer set 'Right PGA Mixer Line1R' off
amixer set 'Right PGA Mixer Line2R' on
and then do an arecord, i get the audio i was looking for. so it is routing the audio incorrectly
hopefully somebody can help me with this: in code (c) is there a way to do the input switching like above? i have been using snd_mixer_* commands but i am not sure how to use something like that to achieve what i want. or am i stuck using "system" calls?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.