Page 1 of 1

How to get mic soundcard input to work.

Posted: Wed Sep 09, 2015 9:46 pm
by Cole1717
Does anyone know how to setup the soundcard so that i can connect music to it and read it from my pi?

Re: How to get mic soundcard input to work.

Posted: Thu Sep 10, 2015 4:27 am
by fruitoftheloom
Cole1717 wrote:Does anyone know how to setup the soundcard so that i can connect music to it and read it from my pi?
The Raspberry Pi has no Sound Input only Output ;)

Re: How to get mic soundcard input to work.

Posted: Thu Sep 10, 2015 4:35 am
by ame
You could add a USB soundcard. They are cheap, and have an audio input socket (and another audio output).

Re: How to get mic soundcard input to work.

Posted: Thu Sep 10, 2015 11:56 am
by Cole1717
Sorry, I should have been clearer. I have a USB soundcard that I know is compatible with the pi plugged in. I have gotten the pi to default its output through the card, now I want to know how to read input from the card.

Thanks!

Re: How to get mic soundcard input to work.

Posted: Thu Sep 10, 2015 11:59 am
by RaTTuS
post a link to it and
what does
lsusb
say

Re: How to get mic soundcard input to work.

Posted: Thu Sep 10, 2015 12:11 pm
by fruitoftheloom
Cole1717 wrote:Sorry, I should have been clearer. I have a USB soundcard that I know is compatible with the pi plugged in. I have gotten the pi to default its output through the card, now I want to know how to read input from the card.

Thanks!
https://c.getsatisfaction.com/plugable/ ... spberry-pi

Re: How to get mic soundcard input to work.

Posted: Sat Sep 12, 2015 1:08 pm
by KLL
Cole1717 wrote:I have gotten the pi to default its output through the card
how you do that?

if i follow @fruitoftheloom link and edit
sudo nano /etc/modprobe.d/alsa-base.conf

Code: Select all

options snd-usb-audio index=0
options snd_bcm2835 index=1
i can record and play

Code: Select all

arecord -d 5 -f cd xfiles.wav
aplay xfiles.wav
but as soon i start the first time the desktop it not works anymore.

in the desktop is the audio tool xfce4-mixer
that only works for the internal sound, even
https://www.raspberrypi.org/blog/anothe ... ce-update/
states you can select source ( or select device and make default )
but i can not.

anyhow, as soon it starts the first time it writes a file
/home/pi/.asoundrc
with card 0 default
( if you have above change in /etc/modprobe.d/alsa-base.conf it makes card 1 default / so all no use )

you can make your own /home/pi/.asoundrc in 2 ways:
-a- you define your USB sound card ( what might be card 1 ) as default
-b- or leave the default to the useless desktop tool
and add your card.
while aplay -l gives me

Code: Select all

**** List of PLAYBACK Hardware Devices ****
card 0: 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 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
i config in .asoundrc

Code: Select all

pcm.!default {
type hw
card 0
}

ctl.!default {
type hw
card 0
}

pcm.ALSA {
type hw
card 0
}

ctl.ALSA {
type hw
card 0
}

pcm.Device {
type plug slave {
pcm "hw:1,0"
}
}

ctl.Device {
type hw
card 1
}
i just use the same stupid word "Device" like i see it in "aplay -l"
but it works also with other names like "USB"...
anyhow that name can be used now with the -D switch
arecord -d 5 -DDevice -f cd xfiles.wav
Recording WAVE 'xfiles.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay -DDevice xfiles.wav
Playing WAVE 'xfiles.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
for adjust volume ... run
alsamixer [F6][F5]
so far about CLI record and play.

much better is
sudo apt-get install audacity
Image
where you can select input and output device / card as you wish.

i hope some specialist can help to get the desktop xfce4-mixer configured so the operation of USB sound card works again.
( or is it just my 3$ USB "Device" )

Re: How to get mic soundcard input to work.

Posted: Tue Sep 15, 2015 8:21 am
by KLL
sorry to bump this, but i would like to have some feedback,

is the desktop (xfce4-mixer) USB sound card selection and operation working? or are only some cards supported...?