D. R. Evans wrote: > I am trying to set up the ability to record line-in, but have been unable > to make it work and would appreciate advice. (I have looked at quite a few > web pages of various kinds of help for ALSA, but all of them seem to be > rather vague on the details of recording.) > > The hardware is very simple: > > ---- > > n7dr@shack:~$ cat /proc/asound/cards > 0 [IXP ]: ATIIXP - ATI IXP > ATI IXP rev 2 with ALC658D at 0xfe02a000, irq 17 > n7dr@shack:~$ > > ---- > > The card has a mic input, a line input, and a speaker output. > > If I simply run aplay with a WAV file, I hear the contents of the file. > For example: > > ---- > > n7dr@shack:~$ aplay -D hw:0,0 c*.wav > > ---- > > causes the named file to play. So *playing* seems to be fine. > > However, I have been unable to find any way to record the line input. > Everything I have tried has resulted in silence in the output file. > > For example: > > ---- > > n7dr@shack:~$ arecord -D hw:0,0 -fdat foo.wav >
It is very simple 1) find out the input shell> cat /proc/asound/devices 0: [ 0] : control 1: : sequencer 6: [ 0- 2]: hardware dependent 7: [ 0- 3]: hardware dependent 16: [ 0- 0]: digital audio playback 17: [ 0- 1]: digital audio playback 19: [ 0- 3]: digital audio playback 24: [ 0- 0]: digital audio capture 32: [ 1] : control 33: : timer 56: [ 1- 0]: digital audio capture 64: [ 2] : control 88: [ 2- 0]: digital audio capture => my input is the capture on the second card 88: [ 2- 0]: digital audio capture 2) so no we can test the input shell> arecord -c2 -Dplughw:2,0 -f cd -vv /dev/null You will see if recording can be done on the screen > ---- > > produces the file foo.wav, with silence. > > amixer says: > > ---- > > n7dr@shack:~$ amixer > Simple mixer control 'Master',0 > Capabilities: pvolume pswitch pswitch-joined > Playback channels: Front Left - Front Right > Limits: Playback 0 - 65536 > Mono: > Front Left: Playback 55141 [84%] [on] > Front Right: Playback 55141 [84%] [on] > Simple mixer control 'Capture',0 > Capabilities: cvolume cswitch cswitch-joined > Capture channels: Front Left - Front Right > Limits: Capture 0 - 65536 > Front Left: Capture 53640 [82%] [off] > Front Right: Capture 53640 [82%] [off] > n7dr@shack:~$ > > ---- > > which seems to be OK, insofar as I understand it, except that there is no > indication of whether the capture device is line-in or the mic line. I > haven't been able to find anything that explicitly tells me how to set the > capture device to be the line in. > > alsamixer looks like this when viewing the Capture item: > > > ───────────────────── AlsaMixer v1.0.28 ─────────────────────┐ > │ Card: PulseAudio F1: Help │ > │ Chip: PulseAudio F2: System information │ > │ View: Capture F6: Select sound card │ > │ Item: Capture Esc: Exit │ > │ │ > │ │ > │ │ > │ │ > │ │ > │ │ > │ │ > │ │ > │ ┌──┐ │ > │ │ │ │ > │ │ │ │ > │ │ │ │ > │ │ │ │ > │ │ │ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ │▒▒│ │ > │ L└──┘R │ > │ CAPTURE │ > │ 82<>82 │ > │ <Capture > │ > │ │ > │ │ > │ │ > │ │ > │ │ > │ │ > │ │ > │ │ > └─────────────────────────────────────────────────────────────┘ > > I've also tried plugging the incoming audio into the mic socket (in case > that's what's being captured), and that just records silence as well. > > So I suppose that my questions are: > > 1. How do I tell alsa that I want to capture from line-in? > > 2. How do I actually record the audio that I'm sending on the line-in > line? > > If more information is needed before these questions can be answered, > please let me know and I'll provide it. > > Doc Evans > You are looking at PulseAudio, not at ALSA mixer Try alsamixer -c0 and check the input section regards