HaasEffect
February 19th, 2013, 04:24 PM
Hi,
I'm new to ubuntu/linux and am trying to come up with a solution for the following problem. But first I'd like to describe what I'm trying to achieve. Basically I'd like to record something via a microphone on soundcard A and output it immediately on soundcard B. I'd prefer to do that with gstreamer.
My setup:
I have two sound cards (one internal on board card and one sound blaster usb dongle). Both cards are being recognized:
user@pc:~/Desktop $ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7f30000 irq 51
1 [Pro ]: USB-Audio - Sound Blaster X-Fi Go! Pro
Creative Technology Ltd Sound Blaster X-Fi Go! Pro at usb-0000:00:14.0-2, full
user@pc:~/Desktop$ aplay -l
**** list of hardware-devices (PLAYBACK) ****
Card 0: PCH [HDA Intel PCH], device 0: ALC886 Analog [ALC886 Analog]
Sub-devices: 1/1
Sub-devices #0: subdevice #0
Card 1: Pro [Sound Blaster X-Fi Go! Pro], device 0: USB Audio [USB Audio]
Sub-devices: 1/1
Sub-devices #0: subdevice #0
user@pc:~/Desktop $
So I guess they've been recognized by ALSA. I also ran the tests for each card in ubuntu's Audio settings - which works. I went ahead with a little test and took a wave audio file and tried to play it back on each card using the following command:
aplay -d 'hw:0,0' audio.wav // play back on internal sound card
aplay -d 'hw:1,0' audio.wav // play back on usb sound card
Now, this is where the troubles start. The device parameter 'hw:0,0' and 'hw:1,0' seems to have no effect on which card should be used. The sound comes always out of the most lately selected sound card in the audio settings panel.
To me this looks like that ALSA is using only one soundcard - depending on which got selected the last. But I have to use both simultaneously.
In the end I'd like to be able to do something like this:
gst-launch-0.10 alsasrc device='hw:1,0' ! queue ! alsasink device='hw:0,0' // hope this pipeline is correct
Any idea how to solve this?
Thanks in advance!
I'm new to ubuntu/linux and am trying to come up with a solution for the following problem. But first I'd like to describe what I'm trying to achieve. Basically I'd like to record something via a microphone on soundcard A and output it immediately on soundcard B. I'd prefer to do that with gstreamer.
My setup:
I have two sound cards (one internal on board card and one sound blaster usb dongle). Both cards are being recognized:
user@pc:~/Desktop $ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7f30000 irq 51
1 [Pro ]: USB-Audio - Sound Blaster X-Fi Go! Pro
Creative Technology Ltd Sound Blaster X-Fi Go! Pro at usb-0000:00:14.0-2, full
user@pc:~/Desktop$ aplay -l
**** list of hardware-devices (PLAYBACK) ****
Card 0: PCH [HDA Intel PCH], device 0: ALC886 Analog [ALC886 Analog]
Sub-devices: 1/1
Sub-devices #0: subdevice #0
Card 1: Pro [Sound Blaster X-Fi Go! Pro], device 0: USB Audio [USB Audio]
Sub-devices: 1/1
Sub-devices #0: subdevice #0
user@pc:~/Desktop $
So I guess they've been recognized by ALSA. I also ran the tests for each card in ubuntu's Audio settings - which works. I went ahead with a little test and took a wave audio file and tried to play it back on each card using the following command:
aplay -d 'hw:0,0' audio.wav // play back on internal sound card
aplay -d 'hw:1,0' audio.wav // play back on usb sound card
Now, this is where the troubles start. The device parameter 'hw:0,0' and 'hw:1,0' seems to have no effect on which card should be used. The sound comes always out of the most lately selected sound card in the audio settings panel.
To me this looks like that ALSA is using only one soundcard - depending on which got selected the last. But I have to use both simultaneously.
In the end I'd like to be able to do something like this:
gst-launch-0.10 alsasrc device='hw:1,0' ! queue ! alsasink device='hw:0,0' // hope this pipeline is correct
Any idea how to solve this?
Thanks in advance!