0

I have a raspberry pi 3 model B+ with raspbian jessy lite from July.

cat /proc/asound/version

Advanced Linux Sound Architecture Driver Version k4.4.50-v7+.

I have a USB soundcard that has two 3.5 jack audio ports (one for mic and one for headphones) and I also have a bluetooth speaker.

What I want to do is to configure alsa to use the USB Soundcard(Set [C-Media USB Headphone Set]) only for microphone input and use my bluetooth speaker(bcm2358) as audio output. How can I do that ? I looked through similar questions and the answers I found didn't worked for me.

This question is related to this:

Setup output and input audio on different cards

He made it to get it work - but for me, it isn't working.

My configuration: aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 1: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

My configuration: arecord -l

**** List of CAPTURE Hardware Devices ****
card 0: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

My configuration: cat /proc/asound/modules

 0 snd_usb_audio
 1 snd_bcm2835

https://s1.postimg.org/h5hpkvn5r/photo5996751145789401269.jpg

4
  • can you explain why it isn't working for you ?
    – Matt
    Commented Jul 13, 2017 at 2:05
  • The sound output is on the same card as the sound input. On the USB soundcard. Commented Jul 13, 2017 at 4:54
  • If you look at the attached image, that is my setup. I want to have microphone recorded from the usb card and to have playback on that little mushroom like bluetooth device. Commented Jul 13, 2017 at 5:49
  • Maybe the problem is that my speaker is connected as bluetooth. I followed this tutorial to do that youness.net/raspberry-pi/… So it goes through pulseaudio. Maybe I should set microphone to go through pulseaudio too Commented Jul 13, 2017 at 6:33

2 Answers 2

1

To make this work, if we assume that you want to record through device 0 and playback through device 1, then you need to alter the .asoundrc file to be like so :

pcm.!default {
    type asym
    playback.pcm "plughw:1,1"
    capture.pcm  "plughw:0"
}
ctl.!default {
        type hw
        card 1
}

This setup is different to what you want, because you want to output through bluetooth, however there is no bluetooth audio device listed. For that reason in this setup, sound should be output through the headphone jack. If you want the sound output through the HDMI cable, then change "plughw:1,1" to "plughw:1,0".

Once you can see your bluetooth audio device, change "plughw:1,1" to that device.

1

What worked for me was an answer I've found here: https://superuser.com/questions/1157370/how-to-configure-pulseaudio-to-input-output-via-alsa

In short:

I edited ~/.config/pulse/default.pa and wrote something like that in it:

load-module module-alsa-sink device=default
load-module module-alsa-source device=default

load-module module-native-protocol-unix
load-module module-bluetooth

And I also altered .asoundrc as Matt said.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.