Summary: | Microphone is visible by ALSA, but not recognized by PulseAudio | ||
---|---|---|---|
Product: | PulseAudio | Reporter: | Nazar Mokrynskyi <nazar> |
Component: | misc | Assignee: | pulseaudio-bugs |
Status: | RESOLVED FIXED | QA Contact: | pulseaudio-bugs |
Severity: | normal | ||
Priority: | medium | CC: | lennart |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Nazar Mokrynskyi
2015-05-30 10:50:57 UTC
I've added: load-module module-alsa-source device=hw:3,1 Into /etc/puse/default.pa before line: .ifexists module-udev-detect.so And microphone appears in Pulseaudio and works fine. Any chance to make this working out of the box? you have to post output of alsa-info.sh and pulseaudio verbose log in order to find out why there is no pulseaudio source Here is alsa-info.sh: http://www.alsa-project.org/db/?f=383a06006246483550e8bd94edf4d2ccba9bdcdb And verbose log: http://pastebin.com/gqmakZ3f I've removed my edits from /etc/puse/default.pa in order to provide clean output card 2: S51 [SB Omni Surround 5.1], device 1: USB Audio [USB Audio #1] Subdevices: 1/1 Subdevice #0: subdevice #0 seem capture device id device 1 instead of device 0 http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/USB-Audio.conf;hb=HEAD You need to define your sound card in USB-Audio.conf seem use full name instead of S51 USB-Audio."S51".pcm.front { @args [ CARD ] @args.CARD { type string } type asym playback.pcm { type hw card $CARD device 0 } capture.pcm { type hw card $CARD device 1 } hw:2 'S51'/'Creative Technology Ltd SB Omni Surround 5.1 at usb-0000:00:14.0-6.2, full spee' Mixer name : 'USB Mixer' Components : 'USB041e:322c' Controls : 12 Simple ctrls : 5 Simple mixer control 'PCM',0 Capabilities: pvolume pvolume-joined pswitch pswitch-joined Playback channels: Mono Limits: Playback 0 - 128 Mono: Playback 91 [71%] [-18.50dB] [on] Simple mixer control 'PCM Capture Source',0 Capabilities: enum Items: 'Mic' 'Line' Item0: 'Mic' Simple mixer control 'Line',0 Capabilities: cvolume cswitch cswitch-joined Capture channels: Front Left - Front Right Limits: Capture 0 - 48 Front Left: Capture 24 [50%] [0.00dB] [on] Front Right: Capture 24 [50%] [0.00dB] [on] Simple mixer control 'Mic',0 Capabilities: cvolume cswitch cswitch-joined Capture channels: Front Left - Front Right Limits: Capture 0 - 48 Front Left: Capture 24 [50%] [0.00dB] [on] Front Right: Capture 24 [50%] [0.00dB] [on] Simple mixer control 'Auto Gain Control',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [on] ( 0.072| 0.000) D: [pulseaudio] alsa-mixer.c: Looking at profile input:analog-mono ( 0.072| 0.000) D: [pulseaudio] alsa-mixer.c: Checking for recording on Analog Mono (analog-mono) ( 0.072| 0.000) D: [pulseaudio] alsa-util.c: Trying hw:2 with SND_PCM_NO_AUTO_FORMAT ... ( 0.072| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: open '/dev/snd/pcmC2D0c' failed (-2) ( 0.072| 0.000) I: [pulseaudio] alsa-util.c: Error opening PCM device hw:2: No such file or directory ( 0.072| 0.000) D: [pulseaudio] alsa-mixer.c: Caching failure to open input:analog-mono ( 0.072| 0.000) D: [pulseaudio] alsa-mixer.c: Looking at profile input:analog-stereo ( 0.072| 0.000) D: [pulseaudio] alsa-mixer.c: Checking for recording on Analog Stereo (analog-stereo) ( 0.072| 0.000) D: [pulseaudio] alsa-util.c: Trying front:2 with SND_PCM_NO_AUTO_FORMAT ... ( 0.072| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: open '/dev/snd/pcmC2D0c' failed (-2) ( 0.072| 0.000) I: [pulseaudio] alsa-util.c: Error opening PCM device front:2: No such file or directory ( 0.072| 0.000) D: [pulseaudio] alsa-util.c: Trying hw:2 with SND_PCM_NO_AUTO_FORMAT ... ( 0.073| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: open '/dev/snd/pcmC2D0c' failed (-2) ( 0.073| 0.000) I: [pulseaudio] alsa-util.c: Error opening PCM device hw:2: No such file or directory ( 0.073| 0.000) D: [pulseaudio] alsa-mixer.c: Caching failure to open input:analog-stereo card 2: S51 [SB Omni Surround 5.1], device 1: USB Audio [USB Audio #1] Subdevices: 1/1 Subdevice #0: subdevice #0 seem capture device id device 1 instead of device 0 http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/USB-Audio.conf;hb=HEAD You need to define your sound card in USB-Audio.conf seem use full name instead of S51 USB-Audio."S51".pcm.front { @args [ CARD ] @args.CARD { type string } type asym playback.pcm { type hw card $CARD device 0 } capture.pcm { type hw card $CARD device 1 } hw:2 'S51'/'Creative Technology Ltd SB Omni Surround 5.1 at usb-0000:00:14.0-6.2, full spee' Mixer name : 'USB Mixer' Components : 'USB041e:322c' Controls : 12 Simple ctrls : 5 Simple mixer control 'PCM',0 Capabilities: pvolume pvolume-joined pswitch pswitch-joined Playback channels: Mono Limits: Playback 0 - 128 Mono: Playback 91 [71%] [-18.50dB] [on] Simple mixer control 'PCM Capture Source',0 Capabilities: enum Items: 'Mic' 'Line' Item0: 'Mic' Simple mixer control 'Line',0 Capabilities: cvolume cswitch cswitch-joined Capture channels: Front Left - Front Right Limits: Capture 0 - 48 Front Left: Capture 24 [50%] [0.00dB] [on] Front Right: Capture 24 [50%] [0.00dB] [on] Simple mixer control 'Mic',0 Capabilities: cvolume cswitch cswitch-joined Capture channels: Front Left - Front Right Limits: Capture 0 - 48 Front Left: Capture 24 [50%] [0.00dB] [on] Front Right: Capture 24 [50%] [0.00dB] [on] Simple mixer control 'Auto Gain Control',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [on] ( 0.072| 0.000) D: [pulseaudio] alsa-mixer.c: Looking at profile input:analog-mono ( 0.072| 0.000) D: [pulseaudio] alsa-mixer.c: Checking for recording on Analog Mono (analog-mono) ( 0.072| 0.000) D: [pulseaudio] alsa-util.c: Trying hw:2 with SND_PCM_NO_AUTO_FORMAT ... ( 0.072| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: open '/dev/snd/pcmC2D0c' failed (-2) ( 0.072| 0.000) I: [pulseaudio] alsa-util.c: Error opening PCM device hw:2: No such file or directory ( 0.072| 0.000) D: [pulseaudio] alsa-mixer.c: Caching failure to open input:analog-mono ( 0.072| 0.000) D: [pulseaudio] alsa-mixer.c: Looking at profile input:analog-stereo ( 0.072| 0.000) D: [pulseaudio] alsa-mixer.c: Checking for recording on Analog Stereo (analog-stereo) ( 0.072| 0.000) D: [pulseaudio] alsa-util.c: Trying front:2 with SND_PCM_NO_AUTO_FORMAT ... ( 0.072| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: open '/dev/snd/pcmC2D0c' failed (-2) ( 0.072| 0.000) I: [pulseaudio] alsa-util.c: Error opening PCM device front:2: No such file or directory ( 0.072| 0.000) D: [pulseaudio] alsa-util.c: Trying hw:2 with SND_PCM_NO_AUTO_FORMAT ... ( 0.073| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: open '/dev/snd/pcmC2D0c' failed (-2) ( 0.073| 0.000) I: [pulseaudio] alsa-util.c: Error opening PCM device hw:2: No such file or directory ( 0.073| 0.000) D: [pulseaudio] alsa-mixer.c: Caching failure to open input:analog-stereo I've appended USB-Audio."S51".pcm.front { @args [ CARD ] @args.CARD { type string } type asym playback.pcm { type hw card $CARD device 0 } capture.pcm { type hw card $CARD device 1 } } to the end of /usr/share/alsa/cards/USB-Audio.conf, but it doesn't change anything (applied `sudo alsa force-reload && sudo service pulseaudio restart && pulseaudio --kill && pulseaudio --start`). Try arecord -Dplughw:CARD=S51,1 -f CD test.wav USB-Audio." SB Omni Surround 5.1 ".pcm.front { @args [ CARD ] @args.CARD { type string } type asym playback.pcm { type hw card $CARD device 0 } capture.pcm { type hw card $CARD device 1 } With this command: arecord -Dplughw:CARD=S51,1 -f CD test.wav Sound is recorded properly. However: USB-Audio."SB Omni Surround 5.1".pcm.front { @args [ CARD ] @args.CARD { type string } type asym playback.pcm { type hw card $CARD device 0 } capture.pcm { type hw card $CARD device 1 } } and many other variations I've tried doesn't help. I do not quite understand why there is a need to edit ALSA's file, since it records sound properly out of the box, the problem seems to be inside PulseAudio which doesn't see the output. In alsamixer I can even switch between Line and Mic for <PCM Capture Source> and both work properly with line added to /etc/puse/default.pa http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/profile-sets you can define a conf file which contain sterero surround51 playback and sterei capture uding device 1 and add your usb id in 90-pulseaudio.rules I'm not familiar with PulseAudio so that it would be possible for me to do by myself. Any extensive documentation about syntax of that files or additional hints (I've searched but didn't found any)? When solution found it should be ideally fixed upstream as well. [General] auto-profiles = no [Mapping analog-stereo-output] description = Analog Stereo Output device-strings = hw:%f,0,0 channel-map = left,right skip-probe = yes [Mapping analog-surround-51] device-strings = surround51:%f channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe paths-output = analog-output analog-output-lineout analog-output-speaker priority = 8 direction = output skip-probe = yes [Mapping analog-stereo-input] description = Analog Stereo device-strings = hw:%f,0,1 channel-map = left,right direction = input skip-probe = yes it is rather stange that snd-usb-audio create device 1 post the output of lsusb -vvvv you need to ask alsa developet what is the correct name to define front device as 1 for your usb sound card i.e. arecord -Dfront:CARD=S51 -f CD test.wav should be [Mapping analog-stereo-input] description = Analog Stereo device-strings = hw:%f,1,0 channel-map = left,right direction = input skip-probe = yes ATTRS{idVendor}=="041e", ATTRS{idProduct}=="322c", ENV{PULSE_PROFILE_SET}=" sb-omni-surround-51.conf" Here is lsusb output relevant to this sound card: http://pastebin.com/Ts0Qn89s I've made some progress by customizing default.conf (copied into new file, of course), with block: [Mapping analog-stereo-input] device-strings = hw:%f,1,0 paths-input = analog-input analog-input-mic analog-input-linein channel-map = left,right direction = input I see Line in and Mic, but both work as Mic, need to separate them. Behavior is changed into opposite when changing <PCM Capture Source> to Line in alsamixer. How to fix this, having Line in and Mic separately and working as expected? I wanted to try to push patch to mailing list, but before that I want to fix Line in somehow. Sound card have 3 inputs. Mon microphone and stereo Line in. However, currently I can't use them both because I need to switch <PCM Capture Source> in alsamixer and though both of them appear in sound control menu they both are working either as Mic of Line in. Now the question is how to explain ALSA that they are 2 different inputs, one Mono Mic and another Stereo Line In? BTW, I can't find list of possible values for paths-input, channel-map and other keys. Simple mixer control 'PCM Capture Source',0 Capabilities: enum Items: 'Mic' 'Line' Item0: 'Mic' http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-input.conf.common you have to add [Element PCM Capture] , [Option PCM Capture Source:Mic] and [Option PCM Capture Source:Line] to above conf AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 4 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 6 wTerminalType 0x0602 Digital Audio Interface bAssocTerminal 0 bSourceID 4 iTerminal 0 you have to ask alsa developer how to define digital out if it is not using device zero http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=a9b1299556598fed12d0d42c80aaa933aced8a42;hp=efda3e2bc766b4147f35f4b006d315ea7b3c55fe AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 4 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 6 wTerminalType 0x0602 Digital Audio Interface bAssocTerminal 0 bSourceID 4 iTerminal 0 you have to ask alsa developer how to define digital out if it is not using device zero http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=a9b1299556598fed12d0d42c80aaa933aced8a42;hp=efda3e2bc766b4147f35f4b006d315ea7b3c55fe card 2: S51 [SB Omni Surround 5.1], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: S51 [SB Omni Surround 5.1], device 1: USB Audio [USB Audio #1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: S51 [SB Omni Surround 5.1], device 2: USB Audio [USB Audio #2] Subdevices: 1/1 Subdevice #0: subdevice #0 what are the function of these three playback devices aplay -D hw:CARD=S51,DEV=1 --dump-hw-params stereo.wav aplay -D hw:CARD=S51,DEV=2 --dump-hw-params stereo.wav This is 5.1 surround sound card, so 2 RCA (or headphones 3.5mm jack) for Front, one 3.5mm jack for Rear and one 3.5mm jack for Center/LFE. I'm completely new to all this things, added: [Element PCM Capture] enumeration = select [Option PCM Capture Source:Mic] name = input-microphone [Option PCM Capture Source:Line] name = input-linein to /usr/share/pulseaudio/alsa-mixer/paths/analog-input.conf.common - no changes, should I attach somehow to sound card in some other config? sb-omni-surround-5.1.conf contains similar records, but they are a bit different anyway (input-microphone vs analog-input-mic), so that should be some other place. About digital output - I'll leave it as now, it is detected, but I do not have any hardware to check whether S/PDIF works properly. [Element PCM Capture Source] Doesn't workeither Please, take a look at screenshot: https://imgur.com/JiwQ4DI Even though Line was captured, PCM Caprute Source is still Mic, I think this might be wrong and actually the reason why it works this way. It doesn't change real source when I choose it in UI. how do your modified conf look like ? paths-input should contain analog-mic and analog-linein (In reply to Nazar Mokrynskyi from comment #24) > Please, take a look at screenshot: https://imgur.com/JiwQ4DI > Even though Line was captured, PCM Caprute Source is still Mic, I think this > might be wrong and actually the reason why it works this way. It doesn't > change real source when I choose it in UI. pactl list sources seem only support stereo capture AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 10 wTerminalType 0x0201 Microphone bAssocTerminal 0 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 10 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 11 bSourceID 10 bControlSize 1 bmaControls( 0) 0x41 Mute Control Automatic Gain Control bmaControls( 1) 0x02 Volume Control bmaControls( 2) 0x02 Volume Control iFeature 0 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 12 wTerminalType 0x0603 Line Connector bAssocTerminal 0 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 10 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 13 bSourceID 12 bControlSize 1 bmaControls( 0) 0x01 Mute Control bmaControls( 1) 0x02 Volume Control bmaControls( 2) 0x02 Volume Control iFeature 0 AudioControl Interface Descriptor: bLength 8 bDescriptorType 36 bDescriptorSubtype 5 (SELECTOR_UNIT) bUnitID 16 bNrInPins 2 baSource( 0) 11 baSource( 1) 13 iSelector 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 17 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 16 iTerminal 0 seem support 5.1 playback AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bNrChannels 6 wChannelConfig 0x003f Left Front (L) Right Front (R) Center Front (C) Low Freqency Enhancement (LFE) Left Surround (LS) Right Surround (RS) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 14 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 2 bSourceID 1 bControlSize 1 bmaControls( 0) 0x03 Mute Control Volume Control bmaControls( 1) 0x00 bmaControls( 2) 0x00 bmaControls( 3) 0x00 bmaControls( 4) 0x00 bmaControls( 5) 0x00 bmaControls( 6) 0x00 iFeature 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 3 wTerminalType 0x0301 Speaker bAssocTerminal 0 bSourceID 2 iTerminal 0 Unit: 11 Control: name="Mic Capture Volume", index=0 Info: id=11, control=2, cmask=0x3, channels=2, type="S16" Volume: min=-3072, max=3072, dBmin=-1200, dBmax=1200 Unit: 11 Control: name="Mic Capture Switch", index=0 Info: id=11, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN" Volume: min=0, max=1, dBmin=0, dBmax=0 Unit: 13 Control: name="Line Capture Volume", index=0 Info: id=13, control=2, cmask=0x3, channels=2, type="S16" Volume: min=-3072, max=3072, dBmin=-1200, dBmax=1200 Unit: 13 Control: name="Line Capture Switch", index=0 Info: id=13, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN" Volume: min=0, max=1, dBmin=0, dBmax=0 do dB range match with pulseaudio paths in pulseaudio verbose log ? There are 2 INPUT_TERMINAL connectors:
* Microphone
* Line Connector
> do dB range match with pulseaudio paths in pulseaudio verbose log ?
I'm not sure how to check this, can't find it in verbose log.
analog-input.cong.common records doesn't seem to help, PCM Capture Source remains fixed and doesn't change except manually from alsamixer in any case.
you have to post pulseaudio to show how it find capture device 1 ? pactl list sources Here is relevant block of `pactl list sources` output: http://pastebin.com/eMCJkt8H PulseAudio recognize that there are 2 ports: * analog-input-mic * analog-input-linein But choosing one or another doesn't actually matter, they currently work as the same, only depending on PCM Capture Source setting in alsamixer. Here is my current sb-omni-surround-5.1.conf contents: http://pastebin.com/kFeQzk0r check your pulseaudio log for message similar to your onboard mic 0.153| 0.000) D: [pulseaudio] alsa-mixer.c: Path analog-input-internal-mic (Internal Microphone), direction=2, priority=89, probed=yes, supported=yes, has_mute=yes, has_volume=yes, has_dB=yes, min_volume=0, max_volume=46, min_dB=-16, max_dB=60 Doesn't seem that range matches, fresh verbose log: http://pastebin.com/TaGeQ7fB this look like alsa bug but why pulseaudio just ignore this fatal error 0.122| 0.000) D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 3640 ms ( 0.123| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.123| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.123| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.124| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.124| 0.000) D: [pulseaudio] alsa-util.c: Set neither period nor buffer size. ( 0.124| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.124| 0.000) I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Input/output error ( 0.124| 0.000) D: [pulseaudio] alsa-util.c: Trying hw:2,1,0 without SND_PCM_NO_AUTO_FORMAT ... ( 0.125| 0.000) D: [pulseaudio] alsa-util.c: Managed to open hw:2,1,0 ( 0.125| 0.000) I: [pulseaudio] alsa-util.c: Disabling tsched mode since BATCH flag is set ( 0.125| 0.000) D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 3640 ms ( 0.125| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.125| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.126| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.126| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.126| 0.000) D: [pulseaudio] alsa-util.c: Set neither period nor buffer size. ( 0.127| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.127| 0.000) I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Input/output error 087| 0.000) D: [pulseaudio] alsa-mixer.c: Available mixer paths (after tidying): ( 0.087| 0.000) D: [pulseaudio] alsa-mixer.c: Path Set 0xe45c60, direction=2 ( 0.087| 0.000) D: [pulseaudio] alsa-mixer.c: Path analog-input-mic (Microphone), direction=2, priority=87, probed=yes, supported=yes, has_mute=yes, has_volume=yes, has_dB=yes, min_volume=0, max_volume=48, min_dB=-12, max_dB=12 ( 0.087| 0.000) D: [pulseaudio] alsa-mixer.c: Element Mic, direction=2, switch=1, volume=1, volume_limit=-1, enumeration=0, required=0, required_any=4, required_absent=0, mask=0x3600000000f66, n_channels=2, override_map=yes ( 0.087| 0.000) D: [pulseaudio] alsa-mixer.c: Element Line, direction=2, switch=2, volume=2, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x6, n_channels=2, override_map=no ( 0.087| 0.000) D: [pulseaudio] alsa-mixer.c: Jack Mic, alsa_name='Mic Jack', detection unavailable ( 0.087| 0.000) D: [pulseaudio] alsa-mixer.c: Jack Mic Phantom, alsa_name='Mic Phantom Jack', detection unavailable ( 0.087| 0.000) D: [pulseaudio] alsa-mixer.c: Path analog-input-linein (Line In), direction=2, priority=81, probed=yes, supported=yes, has_mute=yes, has_volume=yes, has_dB=yes, min_volume=0, max_volume=48, min_dB=-12, max_dB=12 ( 0.087| 0.000) D: [pulseaudio] alsa-mixer.c: Element Line, direction=2, switch=1, volume=1, volume_limit=-1, enumeration=0, required=0, required_any=4, required_absent=0, mask=0x3600000000f66, n_channels=2, override_map=yes ( 0.087| 0.000) D: [pulseaudio] alsa-mixer.c: Element Mic, direction=2, switch=2, volume=2, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x6, n_channels=2, override_map=no ( 0.087| 0.000) D: [pulseaudio] alsa-mixer.c: Jack Line, alsa_name='Line Jack', detection unavailable ( 0.087| 0.000) D: [pulseaudio] alsa-mixer.c: Jack Line Phantom, alsa_name='Line Phantom Jack', detection unavailable seem both paths are available (In reply to Nazar Mokrynskyi from comment #32) > Here is relevant block of `pactl list sources` output: > http://pastebin.com/eMCJkt8H > PulseAudio recognize that there are 2 ports: > * analog-input-mic > * analog-input-linein > > But choosing one or another doesn't actually matter, they currently work as > the same, only depending on PCM Capture Source setting in alsamixer. > > Here is my current sb-omni-surround-5.1.conf contents: > http://pastebin.com/kFeQzk0r Did you add the following to analog-input-mic.conf [Element PCM Capture Source] enumeration = select [Option PCM Capture Source:Mic] name = analog-input-microphone required-any = any you also need to add similar to analog-input-linein.conf Just tried all possible combinations - PCM Capture Source, just Capture Source, analog-input-microphone, analog-input-mic, input-microphone, the same for Line in - nothing changed. I'm guessing here, can you say what is real connection and distinction between analog-input-mic from one file and input-microphone from another? I can't find any documentation for that, only some separate messages on forums without soutions. All this seems to be a Black Magic available to few people in the whole world rather than something reliable and described in specification. in theory , pulseaudio should show the following during prob phase D: [pulseaudio] alsa-mixer.c: Probe of element 'PCM Capture Source' succeeded (volume=0, switch=0, enumeration=1). how about analog-input.conf.common ? Already tried analog-input.conf.common as you suggested before with all possible combinations I was able to generate - no luck. http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths are there any conf contain "Capture Source" but no "PCM Capture Source" ? Yes: nazar-pc@nazar-pc /u/s/p/a/paths> grep -rl 'Capture Source' analog-input-rear-mic.conf analog-input-front-mic.conf analog-input-dock-mic.conf analog-input-headphone-mic.conf analog-input-internal-mic-always.conf analog-input-headset-mic.conf analog-input-internal-mic.conf analog-input-mic.conf analog-input-linein.conf analog-input.conf.common nazar-pc@nazar-pc /u/s/p/a/paths> grep -rl 'PCM Capture Source' nazar-pc@nazar-pc /u/s/p/a/paths> http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output.conf.common the syntax is defined in the above file Simple mixer control 'PCM Capture Source',0 Capabilities: enum Items: 'Mic' 'Line' Item0: 'Mic' seem bug in alsa lib, normally capabities should be cenum instead of enum but enum mean both playback and capture I saw that file already, however it doesn't answer on question how all that works together and relates to each other. Could we invite someone from ALSA developers here or do we need to post another issue somewhere? http://support.creative.com/kb/ShowArticle.aspx?sid=123043 seem have internal microphone array, line in and mic jacks Yes, built-in mic turns off when external connected to jack. http://git.alsa-project.org/?p=alsa-utils.git;a=blob;f=alsactl/init/default;hb=HEAD you can set Mic as default in PCM Capture Source by alsactl I know, in fact it is already by default. The problem is that when I choose Line in (in UI) - it still works as Mic until I switch PCM Capture Source to Line. Just wanted to fix everything completely and contribute back to PulseAudio, so that next releases will include this fix out of the box. https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/sound/usb/mixer.c alternative workaround is to change PCM Capture Source" to "Capture Source" in snd-usb-audio - else if ((state->oterm.type & 0xff00) == 0x0100) + else if ((state->oterm.type & 0xff00) == 0x0100) { append_ctl_name(kctl, " Capture Source"); + if (strlcmp(kctl->name,"PCM Capture Source") == 0) + strlcpy(kctl->name,"Capture Source"); + } else append_ctl_name(kctl, " Playback Source"); (In reply to Nazar Mokrynskyi from comment #47) > Yes, built-in mic turns off when external connected to jack. in theory, there should be three ports internal mic, mic and line jackd but it is unlikely for alsa driver to provide any jack detection kctl (In reply to Nazar Mokrynskyi from comment #42) > Yes: > > nazar-pc@nazar-pc /u/s/p/a/paths> grep -rl 'Capture Source' > analog-input-rear-mic.conf > analog-input-front-mic.conf > analog-input-dock-mic.conf > analog-input-headphone-mic.conf > analog-input-internal-mic-always.conf > analog-input-headset-mic.conf > analog-input-internal-mic.conf > analog-input-mic.conf > analog-input-linein.conf > analog-input.conf.common > nazar-pc@nazar-pc /u/s/p/a/paths> grep -rl 'PCM Capture Source' > nazar-pc@nazar-pc /u/s/p/a/paths> can you post what you added to these three conf files ? analog-input-mic.conf analog-input-linein.conf analog-input.conf.common analog-input.conf.common: [Element PCM Capture Source] enumeration = select [Option PCM Capture Source:Mic] name = input-microphone [Option PCM Capture Source:Line] name = input-linein analog-input-mic.conf: [Element PCM Capture Source] enumeration = select [Option PCM Capture Source:Mic] name = input-microphone required-any = any analog-input-linein.conf [Element PCM Capture Source] enumeration = select [Option PCM Capture Source:Line] name = input-linein required-any = any Tried analog-input.conf.common only, all except analog-input.conf.common, all together. Also tried to add to existing Capture Source (without PCM prefix) in analog-input.conf.common. take a look at conf files [Option Capture Source:Line] name = analog-input-linein required-any = any your entry should use analog-input-linein instead og input-linein [Option PCM Capture Source:Line] name = analog-input-linein required-any = any I'm quite sure I've already tried that, but now it works! Pure magic) The only thing left is that volume level of Mic and Line seems to be the same for both, but that is the thing I can easily live with) Thank you so much! I'll prepare patch for PulseAudio with corresponding changes. (In reply to Nazar Mokrynskyi from comment #55) > > The only thing left is that volume level of Mic and Line seems to be the > same for both, try remove volume from http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-input-mic.conf.common [Element Line] switch = off -volume = off http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-input-linein.conf [Element Mic] switch = off -volume = off It helps, but only partially. It seems that this change will affect other configurations as well They are still interconnected, when I switch back and forth it sometimes preserves level, sometimes change each other, but most of times switching just makes them equal (I'm looking at levels in alsamixer, can make screencast if needed). Probably, UI bug, I'm not sure. when sound card has capture source/pcm caoture source but no jack detection kctl pulseaudio won't use the alsa selected source to activate the path since it does not use snd_mixer_selem_get_enum_item() to get the index and only use snd_mixer_selem_set_enum_item when user change path this mean you either need module provide an option to change capture port when you you pluggec your usb audio or need module_device_restore your preferred path modeule_switch_on_connect need an option to set the capture port when you plugged usb audio device seem sound preference list all source port except those unavailable ports line in is listed before mic this mean that you need to split your patch by function 1) add Element PCM Capture Souce into conf 2) add omni.conf to use device 1 for capture |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.