[pulseaudio-discuss] [PATCH] Added support for Creative SoundBlaster Omni Surround 5.1 USB sound card. Mic and Line in inputs were not working at all.

Raymond Yau superquad.vortex2 at gmail.com
Wed Jun 3 09:42:38 PDT 2015


>
> ---
>  .../alsa/mixer/paths/analog-input-linein.conf      |  7 ++
>  src/modules/alsa/mixer/paths/analog-input-mic.conf |  7 ++
>  .../alsa/mixer/profile-sets/90-pulseaudio.rules    |  1 +
>  .../mixer/profile-sets/sb-omni-surround-5.1.conf   | 78
++++++++++++++++++++++
>  4 files changed, 93 insertions(+)
>  create mode 100644
src/modules/alsa/mixer/profile-sets/sb-omni-surround-5.1.conf
>

> diff --git
a/src/modules/alsa/mixer/profile-sets/sb-omni-surround-5.1.conf
b/src/modules/alsa/mixer/profile-sets/sb-omni-surround-5.1.conf
> new file mode 100644
> index 0000000..1c4aa7b
> --- /dev/null
> +++ b/src/modules/alsa/mixer/profile-sets/sb-omni-surround-5.1.conf
> @@ -0,0 +1,78 @@
> +# This file is part of PulseAudio.
> +#
> +# PulseAudio is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU Lesser General Public License as
> +# published by the Free Software Foundation; either version 2.1 of the
> +# License, or (at your option) any later version.
> +#
> +# PulseAudio is distributed in the hope that it will be useful, but
> +# WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> +# General Public License for more details.
> +#
> +# You should have received a copy of the GNU Lesser General Public
License
> +# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
> +
> +; Creative Sound Blaster Omni Surround 5.1
> +;
> +; This sound card have Mic/Line in at hw:%f,1,0 - this is the main
> +; difference from default.conf, also unsupported sections removed.
> +;
> +; See default.conf for an explanation on the directives used here.
> +
> +[General]
> +auto-profiles = yes
> +
> +[Mapping analog-stereo]
> +device-strings = front:%f hw:%f
> +channel-map = left,right
> +paths-output = analog-output
> +priority = 10
> +
> +[Mapping analog-stereo-input]
> +device-strings = hw:%f,1,0
> +paths-input = analog-input-mic analog-input-linein
> +channel-map = left,right
> +direction = input
> +

Why pulseaudio still try to open front device for recording ?

D: [pulseaudio] alsa-mixer.c: Checking for recording on Analog Stereo
(analog-stereo)
D: [pulseaudio] alsa-util.c: Trying front:2 with SND_PCM_NO_AUTO_FORMAT ...
I: [pulseaudio] (alsa-lib)pcm_hw.c: open '/dev/snd/pcmC2D0c' failed (-2)
I: [pulseaudio] alsa-util.c: Error opening PCM device front:2: No such file
or directory
D: [pulseaudio] alsa-util.c: Trying hw:2 with SND_PCM_NO_AUTO_FORMAT ...
I: [pulseaudio] (alsa-lib)pcm_hw.c: open '/dev/snd/pcmC2D0c' failed (-2)
I: [pulseaudio] alsa-util.c: Error opening PCM device hw:2: No such file or
directory
D: [pulseaudio] alsa-mixer.c: Caching failure to open input:analog-stereo

Should pulseaudio just start from here ?

D: [pulseaudio] alsa-mixer.c: Looking at profile input:analog-stereo-input
D: [pulseaudio] alsa-mixer.c: Checking for recording on analog-stereo-input
(analog-stereo-input)
D: [pulseaudio] alsa-util.c: Trying hw:2,1,0 with SND_PCM_NO_AUTO_FORMAT ...
D: [pulseaudio] alsa-util.c: Managed to open hw:2,1,0
I: [pulseaudio] alsa-util.c: Disabling tsched mode since BATCH flag is set

Seem pulseaudio always try to use pcm device name to open ctl/mixer device

I: [pulseaudio] (alsa-lib)conf.c: Unknown parameter 1
I: [pulseaudio] (alsa-lib)conf.c: Parse arguments error: No such file or
directory
I: [pulseaudio] (alsa-lib)control.c: Invalid CTL hw:2,1,0
I: [pulseaudio] alsa-util.c: Unable to attach to mixer hw:2,1,0: No such
file or directory
I: [pulseaudio] alsa-util.c: Successfully attached to mixer 'hw:2'

> +[Mapping analog-surround-21]
> +device-strings = surround21:%f
> +channel-map = front-left,front-right,lfe
> +paths-output = analog-output
> +priority = 5
> +direction = output

D: [pulseaudio] alsa-mixer.c: Looking at profile output:analog-surround-21
D: [pulseaudio] alsa-mixer.c: Checking for playback on Analog Surround 2.1
(analog-surround-21)
D: [pulseaudio] alsa-util.c: Trying surround21:2 with
SND_PCM_NO_AUTO_FORMAT ...
I: [pulseaudio] (alsa-lib)pcm_hw.c: Invalid PCM state for chmap_get: OPEN

I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5)
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5)
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5)
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5)
D: [pulseaudio] alsa-util.c: Set neither period nor buffer size.
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5)
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Input/output error

D: [pulseaudio] alsa-util.c: Trying hw:2,1,0 without SND_PCM_NO_AUTO_FORMAT
...
D: [pulseaudio] alsa-util.c: Managed to open hw:2,1,0
I: [pulseaudio] alsa-util.c: Disabling tsched mode since BATCH flag is set
D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 3640 ms
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5)
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5)
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5)
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5)
D: [pulseaudio] alsa-util.c: Set neither period nor buffer size.
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5)
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Input/output error

Have you tested surround21 ?

> +
> +[Mapping analog-surround-40]
> +device-strings = surround40:%f
> +channel-map = front-left,front-right,rear-left,rear-right
> +paths-output = analog-output
> +priority = 6
> +direction = output
> +
> +[Mapping analog-surround-41]
> +device-strings = surround41:%f
> +channel-map = front-left,front-right,rear-left,rear-right,lfe
> +paths-output = analog-output
> +priority = 7
> +direction = output
> +
> +[Mapping analog-surround-50]
> +device-strings = surround50:%f
> +channel-map = front-left,front-right,rear-left,rear-right,front-center
> +paths-output = analog-output
> +priority = 8
> +direction = output
> +
> +[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
> +priority = 9
> +direction = output

I: [pulseaudio] (alsa-lib)control.c: Invalid CTL surround51:2
I: [pulseaudio] alsa-util.c: Unable to attach to mixer surround51:2: No
such file or directory
I: [pulseaudio] alsa-util.c: Successfully attached to mixer 'hw:2'
D: [pulseaudio] alsa-mixer.c: Available mixer paths (after tidying):
D: [pulseaudio] alsa-mixer.c: Path Set 0xec77d0, direction=1
D: [pulseaudio] alsa-mixer.c: Path analog-output (Analog Output),
direction=1, priority=99, probed=yes, supported=yes, has_mute=yes,
has_volume=yes, has_dB=yes, min_volume=0, max_volume=128, min_dB=-64,
max_dB=0

D: [pulseaudio] alsa-mixer.c: Element PCM, direction=1, switch=1, volume=1,
volume_limit=-1, enumeration=0, required=0, required_any=0,
required_absent=0, mask=0x7ffffffffffff, n_channels=1, override_map=yes

Do surround51 works since you have a hardware volume knob but PCM playback
volume is mono

D: [pulseaudio] alsa-mixer.c: Skipping profile
output:analog-surround-51+input:analog-stereo - will not be able to open
input:analog-stereo
D: [pulseaudio] alsa-mixer.c: Looking at profile
output:analog-surround-51+input:analog-stereo-input

http://support.creative.com/kb/ShowArticle.aspx?sid=123044

Do it mean that headphone can auto mute  speakers connected at rear ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20150604/2ce2f099/attachment-0001.html>


More information about the pulseaudio-discuss mailing list