On Mon, 2014-09-15 at 14:00 +1200, Eliot Blennerhassett wrote: > On 15/09/14 12:32, Adrian Mageanu wrote: > > > What exactly should I look for in /dev/snd* ? > > You'd see files corresponding to each device present > > E.g. when I plug in a usb webcam (laptop has inbuilt also) > The following files appear: > > pcmC1D0c - the capture device C1 = card#1, D0 -> Device#0, 'c'->Capture > controlC1 - The control device > > ============================================== > To test whether any audio comes from your hardware. > > List the devices > $ arecord -l > > > **** List of CAPTURE Hardware Devices **** > > card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog] > > Subdevices: 1/1 > > Subdevice #0: subdevice #0 > > card 1: Camera [USB 2.0 Camera], device 0: USB Audio [USB Audio] > > Subdevices: 1/1 > > Subdevice #0: subdevice #0 > > Record from the appropriate device, in my case #1 > > $ arecord -vv -fcd -Dplughw:1 > > This should display some configuration information, then a basic real > time level graph on the terminal. > =============================================== > If the above tests show that there is a device present, and it is > generating some non-zero audio data, then move on up the stack. > > I.e. suspect pulseaudio or guvcview itself. > > You could try > 1. Restart pulseaudio > > $ pulseaudio --kill > pulseaudio will probably restart automatically (check with ps -C pulseaudio) > > Then you can look at sources and their states > $ pactl list short sources > > > $ pactl list short sources > > 0 alsa_output.pci-0000_00_1b.0.analog-stereo.monitor > > module-alsa-card.c s16le 2ch 44100Hz SUSPENDED > > 1 alsa_input.pci-0000_00_1b.0.analog-stereo module-alsa-card.c > > s16le 2ch 44100Hz SUSPENDED > > 2 > > alsa_input.usb-Sonix_Technology_Co.__Ltd._USB_2.0_Camera-02-Camera.analog-mono > > module-alsa-card.c s16le 1ch 16000Hz SUSPENDED > > The SUSPENDED state changes to RUNNING when the device is in use. > ~# ls -l /dev/snd/* | grep -i web lrwxrwxrwx 1 root root 12 Sep 15 19:20 usb-046d_HD_Pro_Webcam_C920_5419A86F-02 -> ../controlC2
:~# ls -l /dev/snd/controlC2 crw-rw---T+ 1 root audio 116, 9 Sep 15 19:20 /dev/snd/controlC2 my user is in the audio group ~$ arecord -l **** List of CAPTURE Hardware Devices **** card 0: SB [HDA ATI SB], device 0: ALC889 Analog [ALC889 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: SB [HDA ATI SB], device 2: ALC889 Analog [ALC889 Analog] Subdevices: 2/2 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 card 2: C920 [HD Pro Webcam C920], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: SAA7134 [SAA7134], device 0: SAA7134 PCM [SAA7134 PCM] Subdevices: 1/1 Subdevice #0: subdevice #0 With webcam mike unmute: ~$ arecord -v -f cd -D plughw:2,0 -d 10 test.wav Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo Plug PCM: Rate conversion PCM (32000, sformat=S16_LE) Converter: libspeex (builtin) Protocol version: 10002 Its setup is: stream : CAPTURE access : RW_INTERLEAVED format : S16_LE subformat : STD channels : 2 rate : 44100 exact rate : 44100 (44100/1) msbits : 16 buffer_size : 22050 period_size : 5512 period_time : 125000 tstamp_mode : NONE period_step : 1 avail_min : 5512 period_event : 0 start_threshold : 1 stop_threshold : 22050 silence_threshold: 0 silence_size : 0 boundary : 6206523236469964800 Slave: Hardware PCM card 2 'HD Pro Webcam C920' device 0 subdevice 0 Its setup is: stream : CAPTURE access : MMAP_INTERLEAVED format : S16_LE subformat : STD channels : 2 rate : 32000 exact rate : 32000 (32000/1) msbits : 16 buffer_size : 16001 period_size : 4000 period_time : 125000 tstamp_mode : NONE period_step : 1 avail_min : 4000 period_event : 0 start_threshold : 1 stop_threshold : 16001 silence_threshold: 0 silence_size : 0 boundary : 9007762204694413312 appl_ptr : 0 hw_ptr : 0 I get nothing when I play back test.wav. When trying with the front microphone (from headphones) ~$ arecord -v -f cd -D plughw:0,0 -d 10 test.wav Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo Plug PCM: Hardware PCM card 0 'HDA ATI SB' device 0 subdevice 0 Its setup is: stream : CAPTURE access : RW_INTERLEAVED format : S16_LE subformat : STD channels : 2 rate : 44100 exact rate : 44100 (44100/1) msbits : 16 buffer_size : 16384 period_size : 4096 period_time : 92879 tstamp_mode : NONE period_step : 1 avail_min : 4096 period_event : 0 start_threshold : 1 stop_threshold : 16384 silence_threshold: 0 silence_size : 0 boundary : 4611686018427387904 appl_ptr : 0 hw_ptr : 0 when I play back test.wav I can hear myself Killing pulseaudio did not make any difference. It restarted by itself. ~$ pactl list short sources 0 alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor module-alsa-card.c s16le 2ch 44100Hz SUSPENDED 1 alsa_output.pci-0000_00_14.2.analog-stereo.monitor module-alsa-card.c s16le 2ch 44100Hz SUSPENDED 2 alsa_input.pci-0000_00_14.2.analog-stereo module-alsa-card.c s16le 2ch 44100Hz SUSPENDED 3 alsa_input.usb-046d_HD_Pro_Webcam_C920_5419A86F-02-C920.analog-stereo module-alsa-card.c s16le 2ch 32000Hz SUSPENDED What should be the next step please? _______________________________________________ Linux-users mailing list [email protected] http://lists.canterbury.ac.nz/mailman/listinfo/linux-users
