Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
arecord doesn't output data when recording from pulseaudio
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
palmer
Guru
Guru


Joined: 17 Nov 2004
Posts: 322
Location: Berkeley, CA

PostPosted: Fri Sep 18, 2015 5:01 am    Post subject: arecord doesn't output data when recording from pulseaudio Reply with quote

No programs that record audio work when pulseaudio is running on my system. Audio playback is fine. When I try to record audio using arecord, I get a WAV header and then no more data gets output:

Code:
$ arecord -f cd
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
RIFF$WAVEfmt D±data


I can record on the same setup if I use ALSA to record (by first removing my card's module-load from pulseaudio's configuration file and then killing pulseaudio to release the device):

Code:
$ arecord -D sysdefault:CARD=Alpha -f cd
... lots of data ...


The odd thing is that pulseaudio seems to think that it's recording something: I see the source turned on in "pactl list"

Code:
Source #1
        State: RUNNING
        Name: alsa_input.Alpha.analog-mono
        Description: Headphones
        Driver: module-alsa-card.c
        Sample Specification: s16le 1ch 44100Hz
        Channel Map: mono
        Owner Module: 2
        Mute: no
        Volume: mono: 58409 /  89% / -3.00 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor of Sink: n/a
        Latency: 241163152 usec, configured 99954 usec
        Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
        Properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "USB Audio"
                alsa.id = "USB Audio"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "3"
                alsa.card_name = "Sound Blaster Tactic(3D) Alpha"
                alsa.long_card_name = "Creative Technology Ltd Sound Blaster Tactic(3D) Alpha at usb-0000:00:1d.0-1.1."
                alsa.driver_name = "snd_usb_audio"
                device.bus_path = "pci-0000:00:1d.0-usb-0:1.1.1:1.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/sound/card3"
                udev.id = "usb-Creative_Technology_Ltd_Sound_Blaster_Tactic_3D__Alpha_00168190-00-Alpha"
                device.bus = "usb"
                device.vendor.id = "041e"
                device.vendor.name = "Creative Technology, Ltd"
                device.product.id = "30dc"
                device.product.name = "Sound Blaster Tactic(3D) Alpha"
                device.serial = "Creative_Technology_Ltd_Sound_Blaster_Tactic_3D__Alpha_00168190"
                device.string = "hw:Alpha"
                device.buffering.buffer_size = "8816"
                device.buffering.fragment_size = "2204"
                device.access_mode = "mmap"
                device.profile.name = "analog-mono"
                device.profile.description = "Analog Mono"
                device.description = "Headphones"
                alsa.mixer_name = "USB Mixer"
                alsa.components = "USB041e:30dc"
                device.icon_name = "audio-card-usb"
        Ports:
                analog-input-mic: Microphone (priority: 8700)
        Active Port: analog-input-mic
        Formats:
                pcm


and I see "pulseaudio -vv" show some output that seems to indicate that it's recognized the stream

Code:
I: [pulseaudio] main.c: Daemon startup complete.
I: [pulseaudio] client.c: Created 0 "Native client (UNIX socket client)"
I: [pulseaudio] client.c: Freed 0 "Native client (UNIX socket client)"
I: [pulseaudio] protocol-native.c: Connection died.
I: [pulseaudio] client.c: Created 1 "Native client (UNIX socket client)"
I: [pulseaudio] protocol-native.c: Got credentials: uid=1000 gid=1000 success=1
I: [pulseaudio] module-stream-restore.c: Restoring device for stream source-output-by-application-name:ALSA plug-in [aplay].
I: [pulseaudio] source-output.c: Trying to change sample rate
I: [pulseaudio] source-output.c: Rate changed to 44100 Hz
I: [pulseaudio] resampler.c: Forcing resampler 'copy', because of fixed, identical sample rates.
I: [pulseaudio] remap_sse.c: Using SSE2 mono to stereo remapping
I: [pulseaudio] source-output.c: Created output 0 "ALSA Capture" on alsa_input.Alpha.analog-mono with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source-output.c:     media.name = "ALSA Capture"
I: [pulseaudio] source-output.c:     application.name = "ALSA plug-in [aplay]"
I: [pulseaudio] source-output.c:     native-protocol.peer = "UNIX socket client"
I: [pulseaudio] source-output.c:     native-protocol.version = "29"
I: [pulseaudio] source-output.c:     application.process.id = "12136"
I: [pulseaudio] source-output.c:     application.process.user = "palmer"
I: [pulseaudio] source-output.c:     application.process.host = "palmer-audio-desk"
I: [pulseaudio] source-output.c:     application.process.binary = "aplay"
I: [pulseaudio] source-output.c:     application.language = "en_US.utf8"
I: [pulseaudio] source-output.c:     application.process.machine_id = "01912b365e4658f963ed1d8b55edb69e"
I: [pulseaudio] source-output.c:     module-stream-restore.id = "source-output-by-application-name:ALSA plug-in [aplay]"
I: [pulseaudio] protocol-native.c: Final latency 199.88 ms = 99.93 ms + 99.95 ms


In "pavucontrol" I don't see the blue bars under the recording volume control at all.

If I change pulseaudio to record from a monitor then arecord outputs data.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum