You are not logged in.
*edit: simplified*
This is similar to this question: http://bbs.archlinux.org/viewtopic.php?id=72281
I want to redirect mic input from the onboard card to the mixer of the second card, which is the main card, so that I can hear the live feed in the output of the second card.
Just to be clear, I am able to record from the microphone in different applications(e.g. audacity) by changing the input settings.
Last edited by Xyne (2009-05-19 11:43:12)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
*bump* (3.5 months... seems reasonable to bump it now )
I'd really appreciate some help with this. I've simplified the OP again to be as concise as possible.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Have you checked alsa-project.org (i think that's the website anyway)?
They have all sorts of things on there.
What have you tried so far?
What does your ~/.asoundrc or /etc/asound.conf look like?
Knute
Offline
Hi,
arecord -f S16_LE -r48000 -c2 -D hw:0 -F0 --period-size=1024 -B0 --buffer-size=4096 | aplay -D hw:1 -
Redirects the input upon the output. If You specify the device(-D hw:0) correctly.
You can use
aplay -l
to get a list of the device numbers.
hth, zoidby
Last edited by zoidby (2009-05-21 02:44:49)
Offline
@Knute
I've looked at it before and I'll look again, but I wasn't able to find anything to do this specifically. I've tried a few different things when I first posted this a few months ago, but I didn't make any progress and eventually gave up. I really haven't completely understood the asound file syntax to such a degree that I can manage this without a really good starting point.
At the moment I don't have an asound file. If you have some suggestions for a starting point I would be grateful. Otherwise I'll go back to the site and see if I can figure it out (maybe they've updated some documentation). I'm sure it's actually quite easy once you've understood it, but I just haven't managed yet.
@zoidby
That's the right idea and my original post actually contained a simplified arecord-aplay pipe to demonstrate the effect that I want. The problem is that there is a very noticeable delay when using such a pipe which makes it unusable for me.
Thanks for replying.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
You may be looking for something more like this:
ecasound -B:rtlowlatency -b:256 -f:s32_le,2,44100 -i:alsahw,0,0 -o:alsahw
Install ecasound, check the manpage, and alter the above to your liking. It seems to work with much lower latencies than the piping described above but...I still don't think it is an optimal solution. The latency is much lower but still discernible, and depending on the speed of your machine you may have to increase the buffer size to prevent over/underruns. There might be a way to get the redirection to work right on the card, but I haven't figured it out yet. I'm actually going to toy with it more under Windows today and see if I can get the redirection to work at even lower latency with no problems, and if I can...then I will at least know whether it is possible.
I use an M-Audio Revolution 7.1 (ice1724) under Gentoo.
"We demand rigidly defined values of doubt and uncertainty!"
Offline
Actually, I don't think this will quite work for you. I've been using ecasound to take the cards input (line in) and pipe it to the output (speakers). After that, I have not been specifying the mic/line in or speakers-out at all; I've just been pointing the application to the sound card device and it figures things out in context. With ecasound I don't know if you can pipe an output to an...output.
"We demand rigidly defined values of doubt and uncertainty!"
Offline
Maybe this will work
arecord -f S16_LE -r48000 -c2 -D hw:0 -F0 --period-size=1024 -B0 --buffer-size=4096 | unbuffered | aplay -D hw:1 -
unbuffered is in AUR.
KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein
Offline
did it work?
KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein
Offline
Sorry for the delayed reply, test1000. That pipe still has a very noticeable delay and the inclusion of "unbuffered" doesn't change anything.
I need to find the time and motivation to figure out the asoundrc configuration syntax which I still find cryptic. Something tells me that it should be possible with that.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Just about, yeah. I've never used either of them though and after taking a quick look at jack and qjackctl I'm still not sure how to do it. After wasting more time on the asoundrc wiki trying to figure this out, I'd appreciate it if someone could either tell me how to do this with jack or point me to a clear tutorial that will teach me.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Hmm. That gave me an idea for a wiki page. There's no JACK guide as far as I can see ...
Well, the basic idea is that you start jack, go to "connections", and simply put a virtual "cable" from the mic input to the system output and voila, it should work. To problem here is that you're using two different sound cards, which might be troublesome. I don't know how to do that with Jack (loading two different sound cards at the same time, but of course, it should work)
Last edited by Themaister (2009-06-23 08:51:36)
Offline
hi you all,
I'm trying to do the same thing. I have a turntable plugged in my inboard sound card, it plays whitout any config from this soundcard, but I want it to play in the pci soundcard too.
Jackd seems to be the solution, but I did not find the way to do it yet...
So, subscribing to the post.
Offline
Phonon and/or PulseAudio should allow choosing between multiple cards for playback and recording.
I've never used multiple devices at once, but I do believe jack only allows selection of subdevices, i.e the "interface" or card choice is only for one at a time, but you are allowed to choose input and output devices separately. You have the following options:
http://ubuntuforums.org/showthread.php?t=1128748
So apparently, you run one jack instance and then use jack_load to bring in the other devices.
Else:
http://ubuntuforums.org/showthread.php?t=464086
Else:
http://alsa.opensrc.org/index.php/TwoCardsAsOne
Some examples:
http://www.jrigg.co.uk/linuxaudio/ice1712multi.html
http://bpmdj.yellowcouch.org/jack.html
So then you'd have one interface, but at the same time you will end up with the ins/outs of both the (merged) cards.
Last edited by schivmeister (2010-10-20 18:29:35)
I need real, proper pen and paper for this.
Offline
Thanks schivmeister,
That looks quite complicated just for listening to old vinyls...
But the first link seems to be what I need. Gonna read it more carefully later.
[edit]
by the way, I like your signature
Last edited by k2000 (2010-10-20 23:07:22)
Offline
If you want to output on multiple cards at once Jack gives you the flexibility, but I do this with Pulseaudio and a 'combined' output (module-combine). Its only really useful to play exactly the same thing on all your cards, but since that's what I want... my music comes out through my inbuilt speakers/headphones, my BT headset, and the speakers on my cooling pad at the same time. Jack wouldn't be able to handle the BT, but otherwise would be much more flexible.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
One of the links posted by schivmeister shows something like this, a 'combined' output, with alsa. I think that's what I will try. I rather stay with alsa if possible.
But what I want to achieve is having only the mic input coming out of the second sound card, on demand if possible (just when I use the turntable).
I already use this card for mpd output (https://bbs.archlinux.org/viewtopic.php?id=102677).
Offline
Well, I could tell you how to achieve that on Pulseaudio (its actually pretty simple) but on Alsa, you'd need a REAL expert.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Maybe one day I'll become one
Offline
@ngoonee & k2000
Please post working solutions if you have/find them. I feel the same as k2000 in wanting to avoid Pulseaudio and Jack for something so seemingly trivial so I'm hoping a working Asla solution shows up, but others who find this thread might appreciate the Pulseaudio solution.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I have a solution for now, it's call a Y cable...
I think I will finally use pulseaudi, alsa seems too much headache and I don't really have lot of time to spend on this.
But I'm a bit afraid that installing pulseaudio will f**** all my existing sound settings...
Offline
But I'm a bit afraid that installing pulseaudio will f**** all my existing sound settings...
It will take over your machine, but that's not necessarily a bad thing.
Whatever works with jack will work with alsa. The only reason for using jack here is for the latency and visual routing. In fact, this scenario is even slower than standard mic-to-soundcard because the mic is connected to a different "soundcard" (so the sound travels between two distinct devices). But of course, you could try decreasing the alsa buffer/period sizes without jack if the recording app provides options for it.
Last edited by schivmeister (2010-10-23 23:13:36)
I need real, proper pen and paper for this.
Offline
With pulseaudio its almost dead-simple. Two steps:-
1. Load module-loopback
2. Open pavucontrol and set your module-loopback to take the correct sink/source.
That's it
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Hi everybody,
Sorry for resurrecting an old thread but this might be helpful for those who end up here.
I have a turntable plugged in my inboard sound card, it plays whitout any config from this soundcard, but I want it to play in the pci soundcard too.
To solve a similar problem (with three outputs instead) I added the following to my asound.conf file.
# Joins all equalizers into a single stereo output.
pcm.join {
type plug
slave.pcm multi
slave.rate 48000
ttable.0.0 1.0
ttable.1.1 1.0
ttable.0.2 1.0
ttable.1.3 1.0
ttable.0.4 1.0
ttable.1.5 1.0
}
pcm.multi {
type multi
slaves.a.pcm "plugeqmun"
slaves.a.channels 2
slaves.b.pcm "plugeqspk"
slaves.b.channels 2
slaves.c.pcm "plugeqsub"
slaves.c.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
bindings.4.slave c
bindings.4.channel 0
bindings.5.slave c
bindings.5.channel 1
}
Then following siliciferous' advice I use ecasound and get a low enough latency with:
ecasound -B:rtlowlatency -b:128 -f:s32_le,2,44100 -i:alsahw,0,0 -o:alsa,join
Voilá! No need to use Jack for this.
Offline