Bug 84983

Summary: [AV200 - Oxygen HD Audio - Asus Xonar D1] analog output device is not listed in audio settings
Product: PulseAudio Reporter: lostinspacetime
Component: clientsAssignee: pulseaudio-bugs
Status: RESOLVED MOVED QA Contact: pulseaudio-bugs
Severity: major    
Priority: medium CC: airlangga.cahya, bugzilla, germano.massullo, lennart, tingping
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: alsa-info.sh output
pactl list output
pulseaudio -vvvv
config.log
airlangga alsa-info
pacmd list-cards output
patch for volume control with more than two channels (up to eight)
pulseaudio log - core dumped
complete patch to pa 5.0 fedora 21
Quick workaround

Description lostinspacetime 2014-10-14 10:53:07 UTC
I cannot choose this device in the audio configuration tool since only the digital output device is listed. However, alsamixer shows it.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: pulseaudio 1:1.1-0ubuntu9
ProcVersionSignature: Ubuntu 3.2.0-17.26-generic 3.2.6
Uname: Linux 3.2.0-17-generic x86_64
NonfreeKernelModules: nvidia
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC2: test 1947 F.... pulseaudio
 /dev/snd/controlC3: test 1947 F.... pulseaudio
 /dev/snd/controlC0: test 1947 F.... pulseaudio
 /dev/snd/controlC1: test 1947 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'SB'/'HDA ATI SB at 0xfcff4000 irq 16'
   Mixer name	: 'Realtek ALC888'
   Components	: 'HDA:10ec0888,14627599,00100202'
   Controls : 43
   Simple ctrls : 20
Card1.Amixer.info:
 Card hw:1 'Webcam'/'Philips CE Philips SPC 1000NC Webcam at usb-0000:00:12.2-3, high speed'
   Mixer name	: 'USB Mixer'
   Components	: 'USB0471:0332'
   Controls : 2
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'Mic',0
   Capabilities: cvolume cvolume-joined cswitch cswitch-joined penum
   Capture channels: Mono
   Limits: Capture 0 - 2560
   Mono: Capture 2557 [100%] [27.98dB] [on]
Card2.Amixer.info:
 Card hw:2 'D1'/'Asus Virtuoso 100 at 0xe800, irq 21'
   Mixer name	: 'AV200'
   Components	: 'CS4398 CS4362A CS5361 AV200'
   Controls : 18
   Simple ctrls : 11
Card3.Amixer.info:
 Card hw:3 'NVidia'/'HDA NVidia at 0xfe97c000 irq 19'
   Mixer name	: 'Nvidia GPU 0d HDMI/DP'
   Components	: 'HDA:10de000d,10de0101,00100100'
   Controls : 24
   Simple ctrls : 4
Date: Sun Feb 19 22:19:15 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120219)
ProcEnviron:
 LANGUAGE=de_AT:de
 PATH=(custom, no user)
 LANG=de_AT.UTF-8
 SHELL=/bin/bash
SourcePackage: pulseaudio
Symptom: audio
Symptom_AlsaPlaybackTest: ALSA playback test through plughw:D1 successful
Symptom_AlsaPlaybackTestStderr:
 A L S A l i b c o n f . c : 1 2 2 0 : ( p a r s e _ d e f ) s h o w i s n o t a c o m p o u n d
  A L S A l i b c o n f . c : 1 6 8 6 : ( s n d _ c o n f i g _ l o a d 1 ) _ t o p l e v e l _ : 2 4 : 2 6 : U n e x p e c t e d c h a r
  A L S A l i b c o n f . c : 3 4 0 6 : ( c o n f i g _ f i l e _ o p e n ) / u s r / s h a r e / a l s a / p u l s e - a l s a . c o n f m a y b e o l d o r c o r r u p t e d : c o n s i d e r t o r e m o v e o r f i x i t
Symptom_Card: High Definition Audio Controller - HDA NVidia
Symptom_PulsePlaybackTest: PulseAudio playback test failed
Symptom_SpeakerTestPulseStderr:
 A L S A l i b c o n f . c : 1 2 2 0 : ( p a r s e _ d e f ) s h o w i s n o t a c o m p o u n d
  A L S A l i b c o n f . c : 1 6 8 6 : ( s n d _ c o n f i g _ l o a d 1 ) _ t o p l e v e l _ : 2 4 : 2 6 : U n e x p e c t e d c h a r
  A L S A l i b c o n f . c : 3 4 0 6 : ( c o n f i g _ f i l e _ o p e n ) / u s r / s h a r e / a l s a / p u l s e - a l s a . c o n f m a y b e o l d o r c o r r u p t e d : c o n s i d e r t o r e m o v e o r f i x i t
  A L S A l i b p c m . c : 2 2 1 7 : ( s n d _ p c m _ o p e n _ n o u p d a t e ) U n k n o w n P C M p u l s e
Symptom_Type: No sound at all
Title: [AV200 - Xonar D1, playback] No sound at all
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/04/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: V1.13
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: 770-C45 (MS-7599)
dmi.board.vendor: MICRO-STAR INTERNATIONAL CO.,LTD
dmi.board.version: 1.0
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: MICRO-STAR INTERNATIONAL CO.,LTD
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrV1.13:bd09/04/2010:svnMICRO-STARINTERNATIONALCO.,LTD:pnMS-7599:pvr1.0:rvnMICRO-STARINTERNATIONALCO.,LTD:rn770-C45(MS-7599):rvr1.0:cvnMICRO-STARINTERNATIONALCO.,LTD:ct3:cvr1.0:
dmi.product.name: MS-7599
dmi.product.version: 1.0
dmi.sys.vendor: MICRO-STAR INTERNATIONAL CO.,LTD
Comment 1 lostinspacetime 2014-10-14 10:56:20 UTC
This is an old Bug I reported 2 years ago. This is the original Bugreport with additional data. https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/936539

The bug is still present in Ubuntu 14.04.
Comment 2 Raymond 2014-10-14 11:34:15 UTC
you have to post output of alsa-info.sh

 and

 pactl list
Comment 3 lostinspacetime 2014-10-14 12:14:34 UTC
Created attachment 107819 [details]
alsa-info.sh output
Comment 4 lostinspacetime 2014-10-14 12:15:09 UTC
Created attachment 107820 [details]
pactl list output
Comment 5 Raymond 2014-10-15 00:52:18 UTC
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right - Rear Left - Rear Right - Front Center - Woofer - Side Left - Side Right
  Limits: Playback 67 - 127
  Mono:
  Front Left: Playback 121 [90%] [-6.00dB] [on]
  Front Right: Playback 121 [90%] [-6.00dB] [on]
  Rear Left: Playback 121 [90%] [-6.00dB] [on]
  Rear Right: Playback 121 [90%] [-6.00dB] [on]
  Front Center: Playback 121 [90%] [-6.00dB] [on]
  Woofer: Playback 94 [45%] [-33.00dB] [on]
  Side Left: Playback 121 [90%] [-6.00dB] [on]
  Side Right: Playback 121 [90%] [-6.00dB] [on]



multi channel master playback volume was removed by this patch

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/alsa-mixer.c?id=527078523815587bfd021bc1d10782403e9b3e84

seem using 5.1 profile with 8 channels master playback volume


post the pulseaudio verbose log
Comment 6 Raymond 2014-10-15 01:12:06 UTC
		device.vendor.id = "13f6"
		device.vendor.name = "C-Media Electronics Inc"
		device.product.id = "8788"
		device.product.name = "Virtuoso 100 (Xonar D1)"
		device.string = "2"
		device.description = "Virtuoso 100 (Xonar D1)"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	Profile:
		input:analog-stereo: Analog Stereo Eingang (sinks: 0, sources: 1, priority: 60, available: yes)
		input:iec958-stereo: Digital Stereo (IEC958) Eingang (sinks: 0, sources: 1, priority: 55, available: yes)
		output:analog-stereo: Analog Stereo Ausgang (sinks: 1, sources: 0, priority: 6000, available: yes)
		output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6060, available: yes)
		output:analog-stereo+input:iec958-stereo: Analog Stereo Ausgang + Digital Stereo (IEC958) Eingang (sinks: 1, sources: 1, priority: 6055, available: yes)
		output:analog-surround-40: Analog Surround 4.0 Ausgang (sinks: 1, sources: 0, priority: 700, available: yes)
		output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Ausgang + Analog Stereo Eingang (sinks: 1, sources: 1, priority: 760, available: yes)
		output:analog-surround-40+input:iec958-stereo: Analog Surround 4.0 Ausgang + Digital Stereo (IEC958) Eingang (sinks: 1, sources: 1, priority: 755, available: yes)
		output:analog-surround-41: Analog Surround 4.1 Ausgang (sinks: 1, sources: 0, priority: 800, available: yes)
		output:analog-surround-41+input:analog-stereo: Analog Surround 4.1 Ausgang + Analog Stereo Eingang (sinks: 1, sources: 1, priority: 860, available: yes)
		output:analog-surround-41+input:iec958-stereo: Analog Surround 4.1 Ausgang + Digital Stereo (IEC958) Eingang (sinks: 1, sources: 1, priority: 855, available: yes)
		output:analog-surround-50: Analog Surround 5.0 Ausgang (sinks: 1, sources: 0, priority: 700, available: yes)
		output:analog-surround-50+input:analog-stereo: Analog Surround 5.0 Ausgang + Analog Stereo Eingang (sinks: 1, sources: 1, priority: 760, available: yes)
		output:analog-surround-50+input:iec958-stereo: Analog Surround 5.0 Ausgang + Digital Stereo (IEC958) Eingang (sinks: 1, sources: 1, priority: 755, available: yes)
		output:analog-surround-51: Analog Surround 5.1 Ausgang (sinks: 1, sources: 0, priority: 800, available: yes)
		output:analog-surround-51+input:analog-stereo: Analog Surround 5.1 Ausgang + Analog Stereo Eingang (sinks: 1, sources: 1, priority: 860, available: yes)
		output:analog-surround-51+input:iec958-stereo: Analog Surround 5.1 Ausgang + Digital Stereo (IEC958) Eingang (sinks: 1, sources: 1, priority: 855, available: yes)
		output:analog-surround-71: Analog Surround 7.1 Ausgang (sinks: 1, sources: 0, priority: 700, available: yes)
		output:analog-surround-71+input:analog-stereo: Analog Surround 7.1 Ausgang + Analog Stereo Eingang (sinks: 1, sources: 1, priority: 760, available: yes)
		output:analog-surround-71+input:iec958-stereo: Analog Surround 7.1 Ausgang + Digital Stereo (IEC958) Eingang (sinks: 1, sources: 1, priority: 755, available: yes)
		output:iec958-stereo: Digital Stereo (IEC958) Ausgang (sinks: 1, sources: 0, priority: 5500, available: yes)
		output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Ausgang + Analog Stereo Eingang (sinks: 1, sources: 1, priority: 5560, available: yes)
		output:iec958-stereo+input:iec958-stereo: Digital Stereo Duplex (IEC958) (sinks: 1, sources: 1, priority: 5555, available: yes)
		off: Aus (sinks: 0, sources: 0, priority: 0, available: yes)
	Aktive Profile: output:analog-surround-51
	Profile:
		analog-input-mic: Mikrofon (priority: 8700, latency offset: 0 usec)
			Eigenschaften:
				device.icon_name = "audio-input-microphone"
			Teil des Profils/der Profile: input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:analog-surround-71+input:analog-stereo, output:iec958-stereo+input:analog-stereo
		analog-input-linein: Line In (priority: 8100, latency offset: 0 usec)
			Teil des Profils/der Profile: input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:analog-surround-71+input:analog-stereo, output:iec958-stereo+input:analog-stereo
		analog-input-aux: Analoge Eingabe (priority: 8000, latency offset: 0 usec)
			Teil des Profils/der Profile: input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:analog-surround-71+input:analog-stereo, output:iec958-stereo+input:analog-stereo
		iec958-stereo-input: Digitaler Eingang (S/PDIF) (priority: 0, latency offset: 0 usec)
			Teil des Profils/der Profile: input:iec958-stereo, output:analog-stereo+input:iec958-stereo, output:analog-surround-40+input:iec958-stereo, output:analog-surround-41+input:iec958-stereo, output:analog-surround-50+input:iec958-stereo, output:analog-surround-51+input:iec958-stereo, output:analog-surround-71+input:iec958-stereo, output:iec958-stereo+input:iec958-stereo
		iec958-stereo-output: Digitaler Ausgang (S/PDIF) (priority: 0, latency offset: 0 usec)
			Teil des Profils/der Profile: output:iec958-stereo, output:iec958-stereo+input:analog-stereo, output:iec958-stereo+input:iec958-stereo



card 2: D1 [Xonar D1], device 0: Multichannel [Multichannel]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: D1 [Xonar D1], device 1: Digital [Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

**** List of CAPTURE Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC888 Analog [ALC888 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 2: ALC888 Alt Analog [ALC888 Alt Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Webcam [Philips SPC 1000NC Webcam], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: D1 [Xonar D1], device 0: Multichannel [Multichannel]
  Subdevices: 1/1
  Subdevice #0: subdevice #0



http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/CMI8788.conf;hb=HEAD




Simple mixer control 'Mic Source',0
  Capabilities: cenum
  Items: 'Mic Jack' 'Front Panel'
  Item0: 'Mic Jack'
Comment 8 Raymond 2014-10-15 01:23:42 UTC
http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths

Simple mixer control 'Mic Source',0
  Capabilities: cenum
  Items: 'Mic Jack' 'Front Panel'
  Item0: 'Mic Jack'


you may need to add this oxygen specific "mic source" and "front panel" into those conf files
Comment 9 Raymond 2014-10-15 07:17:57 UTC
Simple mixer control 'Front Panel',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]

is this switch use to switch output between  front panel headphone and line out jacks ?
Comment 10 lostinspacetime 2014-10-15 10:13:54 UTC
(In reply to Raymond from comment #5)
> Simple mixer control 'Master',0
>   Capabilities: pvolume pswitch pswitch-joined
>   Playback channels: Front Left - Front Right - Rear Left - Rear Right -
> Front Center - Woofer - Side Left - Side Right
>   Limits: Playback 67 - 127
>   Mono:
>   Front Left: Playback 121 [90%] [-6.00dB] [on]
>   Front Right: Playback 121 [90%] [-6.00dB] [on]
>   Rear Left: Playback 121 [90%] [-6.00dB] [on]
>   Rear Right: Playback 121 [90%] [-6.00dB] [on]
>   Front Center: Playback 121 [90%] [-6.00dB] [on]
>   Woofer: Playback 94 [45%] [-33.00dB] [on]
>   Side Left: Playback 121 [90%] [-6.00dB] [on]
>   Side Right: Playback 121 [90%] [-6.00dB] [on]
> 
> 
> 
> multi channel master playback volume was removed by this patch
> 
> http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/
> alsa-mixer.c?id=527078523815587bfd021bc1d10782403e9b3e84
> 
> seem using 5.1 profile with 8 channels master playback volume
> 
> 
> post the pulseaudio verbose log

I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) fehlgeschlagen: Die Operation ist nicht erlaubt
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) fehlgeschlagen: Die Operation ist nicht erlaubt
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
D: [pulseaudio] core-util.c: RealtimeKit worked.
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: Dies ist PulseAudio 5.0-rebootstrapped
D: [pulseaudio] main.c: Kompilier-Host: x86_64-pc-linux-gnu
D: [pulseaudio] main.c: Kompilier-CFLAGS: -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option
D: [pulseaudio] main.c: Laufe auf Host: Linux x86_64 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014
D: [pulseaudio] main.c: 4 CPUs gefunden.
I: [pulseaudio] main.c: Seitengröße ist 4096 Bytes.
D: [pulseaudio] main.c: Kompiliere mit Valgrind-Unterstützung: nein
D: [pulseaudio] main.c: Läuft im Valgrind-Modus: no
D: [pulseaudio] main.c: Wird in VM ausgeführt: no
D: [pulseaudio] main.c: Optimiertes Build: ja
D: [pulseaudio] main.c: FASTPATH definiert, nur fast-path-Ansprüche deaktiviert.
I: [pulseaudio] main.c: System- ID ist a62d22d1a2ca94ce2a66406d51841b82.
I: [pulseaudio] main.c: System- ID ist c2.
I: [pulseaudio] main.c: Nutze Laufzeit-Verzeichnis /run/user/1000/pulse.
I: [pulseaudio] main.c: Nutze Zustands-Verzeichnis /home/ancutasigabi/.pulse.
I: [pulseaudio] main.c: Modul-Verzeichnis /usr/lib/pulse-5.0/modules benutzen.
I: [pulseaudio] main.c: Laufe im System-Modus: no
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() fehlgeschlagen.
Comment 11 lostinspacetime 2014-10-15 10:33:12 UTC
(In reply to Raymond from comment #5)
> Simple mixer control 'Master',0
>   Capabilities: pvolume pswitch pswitch-joined
>   Playback channels: Front Left - Front Right - Rear Left - Rear Right -
> Front Center - Woofer - Side Left - Side Right
>   Limits: Playback 67 - 127
>   Mono:
>   Front Left: Playback 121 [90%] [-6.00dB] [on]
>   Front Right: Playback 121 [90%] [-6.00dB] [on]
>   Rear Left: Playback 121 [90%] [-6.00dB] [on]
>   Rear Right: Playback 121 [90%] [-6.00dB] [on]
>   Front Center: Playback 121 [90%] [-6.00dB] [on]
>   Woofer: Playback 94 [45%] [-33.00dB] [on]
>   Side Left: Playback 121 [90%] [-6.00dB] [on]
>   Side Right: Playback 121 [90%] [-6.00dB] [on]
> 
> 
> 
> multi channel master playback volume was removed by this patch
> 
> http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/
> alsa-mixer.c?id=527078523815587bfd021bc1d10782403e9b3e84
> 
> seem using 5.1 profile with 8 channels master playback volume
> 
> 
> post the pulseaudio verbose log

Before this patch, my card worked perfectly. I am now able to use it by choosing the 5.1 Profile with pavucontrol. With this fix however, I get maximum volume every time I restart the computer.. but this is probably another story.
Comment 12 lostinspacetime 2014-10-15 10:40:46 UTC
(In reply to Raymond from comment #7)
> seem your card id not in alisaes.conf
> 
> http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;
> h=45e9496a7a666210702598d0c2d3b43065a5f940;
> hp=aba87e509898ec9ddb3e319267d7c267409ff100

Would this be the missing entry in aliases.conf?

'Xondar D1' cards.CMI8788
Comment 13 Raymond 2014-10-15 16:10:22 UTC
aplay -L 
it is ok if the above command list surroun40, surround51 , surround71



pulseaudio] pid.c: Daemon already running.

you have to kill the deamon , disable auto spwan 

and restart pulseaudio

pulseaudio -vvvv


https://wiki.ubuntu.com/PulseAudio/Log
Comment 14 lostinspacetime 2014-10-15 17:20:51 UTC
Created attachment 107892 [details]
pulseaudio -vvvv
Comment 15 lostinspacetime 2014-10-15 17:26:23 UTC
(In reply to Raymond from comment #13)
> aplay -L 
> it is ok if the above command list surroun40, surround51 , surround71
> 
> 
> 
> pulseaudio] pid.c: Daemon already running.
> 
> you have to kill the deamon , disable auto spwan 
> 
> and restart pulseaudio
> 
> pulseaudio -vvvv
> 
> 
> https://wiki.ubuntu.com/PulseAudio/Log

aplay -L gives me that:

front:CARD=D1,DEV=0
    Xonar D1, Multichannel
    Front speakers
surround40:CARD=D1,DEV=0
    Xonar D1, Multichannel
    4.0 Surround output to Front and Rear speakers
surround41:CARD=D1,DEV=0
    Xonar D1, Multichannel
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=D1,DEV=0
    Xonar D1, Multichannel
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=D1,DEV=0
    Xonar D1, Multichannel
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=D1,DEV=0
    Xonar D1, Multichannel
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=D1,DEV=0
    Xonar D1, Multichannel
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=D1,DEV=0
    Xonar D1, Multichannel
    Direct sample mixing device
dmix:CARD=D1,DEV=1
    Xonar D1, Digital
    Direct sample mixing device
dsnoop:CARD=D1,DEV=0
    Xonar D1, Multichannel
    Direct sample snooping device
dsnoop:CARD=D1,DEV=1
    Xonar D1, Digital
    Direct sample snooping device
hw:CARD=D1,DEV=0
    Xonar D1, Multichannel
    Direct hardware device without any conversions
hw:CARD=D1,DEV=1
    Xonar D1, Digital
    Direct hardware device without any conversions
plughw:CARD=D1,DEV=0
    Xonar D1, Multichannel
    Hardware device with all software conversions
plughw:CARD=D1,DEV=1
    Xonar D1, Digital
    Hardware device with all software conversions
Comment 16 Raymond 2014-10-16 12:04:10 UTC
W: [pulseaudio] alsa-mixer.c: Volume element Master has 8 channels. That's too much! I can't handle that!
D: [pulseaudio] alsa-mixer.c: Probe of element 'Master' failed.



D: [pulseaudio] alsa-mixer.c: Added 0 ports




 [pulseaudio] alsa-sink.c: Using 1,0 fragments of size 1048512 bytes (1981,32ms), buffer size is 1048512 bytes (1981,32ms)
I: [pulseaudio] alsa-sink.c: Time scheduling watermark is 6,69ms

seem not using two seconds buffer and no port added
Comment 17 lostinspacetime 2014-10-16 15:50:17 UTC
(In reply to Raymond from comment #16)
> W: [pulseaudio] alsa-mixer.c: Volume element Master has 8 channels. That's
> too much! I can't handle that!
> D: [pulseaudio] alsa-mixer.c: Probe of element 'Master' failed.
> 
> 
> 
> D: [pulseaudio] alsa-mixer.c: Added 0 ports
> 
> 
> 
> 
>  [pulseaudio] alsa-sink.c: Using 1,0 fragments of size 1048512 bytes
> (1981,32ms), buffer size is 1048512 bytes (1981,32ms)
> I: [pulseaudio] alsa-sink.c: Time scheduling watermark is 6,69ms
> 
> seem not using two seconds buffer and no port added

Is there anything I can do?
Comment 18 Raymond 2014-10-16 16:09:30 UTC
have you ask the author of that patch ?


similar case is the four channel mic array of ps3 eye



USB Mixer information
!!---------------------------


USB Mixer: usb_id=0x14152000, ctrlif=1, ctlerr=0
Card: OmniVision Technologies, Inc. USB Camera-B4.04.27.1 at usb-0000:00:1d.7-4, high
  Unit: 3
    Control: name="Mic Capture Volume", index=0
    Info: id=3, control=2, cmask=0xf, channels=4, type="S16"
    Volume: min=0, max=1, dBmin=0, dBmax=0


https://www.libreoffice.org/bugzilla/show_bug.cgi?id=45813
Comment 19 Raymond 2014-10-17 23:42:01 UTC
> > Simple mixer control 'Master',0
> >   Capabilities: pvolume pswitch pswitch-joined
> >   Playback channels: Front Left - Front Right - Rear Left - Rear Right -
> > Front Center - Woofer - Side Left - Side Right
> >   Limits: Playback 67 - 127
> >   Mono:
> >   Front Left: Playback 121 [90%] [-6.00dB] [on]
> >   Front Right: Playback 121 [90%] [-6.00dB] [on]
> >   Rear Left: Playback 121 [90%] [-6.00dB] [on]
> >   Rear Right: Playback 121 [90%] [-6.00dB] [on]
> >   Front Center: Playback 121 [90%] [-6.00dB] [on]
> >   Woofer: Playback 94 [45%] [-33.00dB] [on]
> >   Side Left: Playback 121 [90%] [-6.00dB] [on]
> >   Side Right: Playback 121 [90%] [-6.00dB] [on]
> > 
> > 
> > 
> > multi channel master playback volume was removed by this patch
> > 
> > http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/
> > alsa-mixer.c?id=527078523815587bfd021bc1d10782403e9b3e84

> 
> Before this patch, my card worked perfectly. I am now able to use it by
> choosing the 5.1 Profile with pavucontrol. With this fix however, I get
> maximum volume every time I restart the computer.. but this is probably
> another story.


did you change masks in alsa-mixer.h


pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST][8];





-                    if (e->n_channels > 2) {
+                   if (e->n_channels > 8) {
                        /* FIXME: In some places code like this is used:
                         *
                         *     e->masks[alsa_channel_ids[p]][e->n_channels-1]
                         *
                         * The definition of e->masks is
                           *
-                         *     pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST][2];
+                         *     pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST][8];
                         *
-                         * Since the array size is fixed at 2, we obviously
+                         * Since the array size is fixed at 8, we obviously
-                          * don't support elements with more than two
+                         * don't support elements with more than eight
                         * channels... */
                        pa_log_warn("Volume element %s has %u channels. That's too much! I can't handle that!", e->alsa_name, e->n_channels);
                        return -1;
                  }
Comment 20 lostinspacetime 2014-10-18 10:38:39 UTC
(In reply to Raymond from comment #19)
> > > Simple mixer control 'Master',0
> > >   Capabilities: pvolume pswitch pswitch-joined
> > >   Playback channels: Front Left - Front Right - Rear Left - Rear Right -
> > > Front Center - Woofer - Side Left - Side Right
> > >   Limits: Playback 67 - 127
> > >   Mono:
> > >   Front Left: Playback 121 [90%] [-6.00dB] [on]
> > >   Front Right: Playback 121 [90%] [-6.00dB] [on]
> > >   Rear Left: Playback 121 [90%] [-6.00dB] [on]
> > >   Rear Right: Playback 121 [90%] [-6.00dB] [on]
> > >   Front Center: Playback 121 [90%] [-6.00dB] [on]
> > >   Woofer: Playback 94 [45%] [-33.00dB] [on]
> > >   Side Left: Playback 121 [90%] [-6.00dB] [on]
> > >   Side Right: Playback 121 [90%] [-6.00dB] [on]
> > > 
> > > 
> > > 
> > > multi channel master playback volume was removed by this patch
> > > 
> > > http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/
> > > alsa-mixer.c?id=527078523815587bfd021bc1d10782403e9b3e84
> 
> > 
> > Before this patch, my card worked perfectly. I am now able to use it by
> > choosing the 5.1 Profile with pavucontrol. With this fix however, I get
> > maximum volume every time I restart the computer.. but this is probably
> > another story.
> 
> 
> did you change masks in alsa-mixer.h
> 
> 
> pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST][8];
> 
> 
> 
> 
> 
> -                    if (e->n_channels > 2) {
> +                   if (e->n_channels > 8) {
>                         /* FIXME: In some places code like this is used:
>                          *
>                          *     e->masks[alsa_channel_ids[p]][e->n_channels-1]
>                          *
>                          * The definition of e->masks is
>                            *
> -                         *     pa_channel_position_mask_t
> masks[SND_MIXER_SCHN_LAST][2];
> +                         *     pa_channel_position_mask_t
> masks[SND_MIXER_SCHN_LAST][8];
>                          *
> -                         * Since the array size is fixed at 2, we obviously
> +                         * Since the array size is fixed at 8, we obviously
> -                          * don't support elements with more than two
> +                         * don't support elements with more than eight
>                          * channels... */
>                         pa_log_warn("Volume element %s has %u channels.
> That's too much! I can't handle that!", e->alsa_name, e->n_channels);
>                         return -1;
>                   }

after doing so I have to recompile alsa, right?
Comment 21 Raymond 2014-10-18 11:32:00 UTC
http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/PulseAudioFromGit/

you can try method 3 to test whether it works or not
Comment 22 lostinspacetime 2014-10-19 14:14:26 UTC
(In reply to Raymond from comment #21)
> http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/
> PulseAudioFromGit/
> 
> you can try method 3 to test whether it works or not

i tried that, but the configure script doesn't finish successfully.
Comment 23 lostinspacetime 2014-10-19 14:15:18 UTC
Created attachment 108063 [details]
config.log
Comment 24 Raymond 2014-10-20 01:53:02 UTC
http://colin.guthr.ie/2010/09/compiling-and-running-pulseaudio-from-git/

do you mean 

./bootstrap.sh -V

fail to create the configure script

or

missing some dev packages to


../configure --prefix=$(pwd)
Comment 25 lostinspacetime 2014-10-20 10:57:19 UTC
(In reply to Raymond from comment #24)
> http://colin.guthr.ie/2010/09/compiling-and-running-pulseaudio-from-git/
> 
> do you mean 
> 
> ./bootstrap.sh -V
> 
> fail to create the configure script
> 
> or
> 
> missing some dev packages to
> 
> 
> ../configure --prefix=$(pwd)

The bootstrap script went well. The configure script finishes with "config.status:1610: error: cannot find input file: `Makefile.in'". I had to install several dev packages but that part worked I suppose. I added the log file for the config script if you want to have a look at it.
Comment 26 Raymond 2014-10-21 02:24:51 UTC
http://www.gnu.org/software/automake/manual/html_node/automake-Invocation.html


To create all the Makefile.ins for a package, run the automake program in the top level directory, with no arguments. automake will automatically find each appropriate Makefile.am (by scanning configure.ac; see configure) and generate the corresponding Makefile.in. 


this mean bootstrap.sh fail at the automake


http://cgit.freedesktop.org/pulseaudio/pulseaudio/plain/bootstrap.sh
Comment 27 Airlangga Cahya Utama 2015-02-23 18:56:31 UTC
Hello...

I'm another user of Xonar DX Card, reporting same bugs. Gnome Control Center Audio are troubled parsing all device port with this card because pulseaudio doesn't report any Analog Output Ports for this card.

From alsa-info.sh we can see this card has multichannel ports.

APLAY

**** List of PLAYBACK Hardware Devices ****
card 0: DX [Xonar DX], device 0: Multichannel [Multichannel]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: DX [Xonar DX], device 1: Digital [Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Hovewer pulseaudio only report digital port output.

ports:
	analog-input-mic: Microphone
	analog-input-linein: Line In
	analog-input-aux: Analog Input
	iec958-stereo-input: Digital Input (S/PDIF)
	iec958-stereo-output: Digital Output (S/PDIF)

Sorry I cut out some text to make it short.
Complete logs is attached below...
Comment 28 Airlangga Cahya Utama 2015-02-23 18:58:15 UTC
Created attachment 113764 [details]
airlangga alsa-info

alsa-info from my pc, linux fedora 21 kernel 3.18.7-200.
Comment 29 Airlangga Cahya Utama 2015-02-23 18:58:55 UTC
Created attachment 113765 [details]
pacmd list-cards output
Comment 30 Raymond 2015-02-25 09:59:43 UTC
Created attachment 113811 [details] [review]
patch for volume control with more than two channels (up to eight)

This patch just increase the number of channels in volume control from 2 to 8
Comment 31 Airlangga Cahya Utama 2015-02-25 20:51:40 UTC
Created attachment 113827 [details]
pulseaudio log - core dumped

It working, pacmd list-cards shows more ports

	ports:
		analog-input-mic: Microphone (priority 8700, latency offset 0 
		analog-input-linein: Line In (priority 8100, latency offset 0 
		analog-input-aux: Analog Input (priority 8000, latency offset 0 usec, available: unknown)
		iec958-stereo-input: Digital Input (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
		analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
		iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)

And profile combobox works correctly in gnome control center audio.

However, in about 10 seconds in gnome control center audio or when adjusting volume control manually, pulse audio coredumped.
Attached output log from pulseaudio -vvvvv
Comment 32 Raymond 2015-02-26 03:56:55 UTC
seem pulseaudio cannot find correct dB 

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=67, max_volume=127, min_dB=inf, max_dB=-inf
D: [pulseaudio] alsa-mixer.c: Element Master, direction=1, switch=1, volume=1, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x0, n_channels=8, override_map=yes
D: [pulseaudio] alsa-mixer.c: Element IEC958, direction=1, switch=2, volume=0, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x0, n_channels=0, override_map=no
D: [pulseaudio] alsa-mixer.c: Jack Line Out, alsa_name='Line Out Jack', detection unavailable
D: [pulseaudio] alsa-mixer.c: Jack Line Out Phantom, alsa_name='Line Out Phantom Jack', detection unavailable
I: [pulseaudio] alsa-sink.c: Successfully enabled deferred volume.
I: [pulseaudio] alsa-sink.c: Hardware volume ranges from inf dB to -inf dB.
I: [pulseaudio] alsa-sink.c: Fixing base volume to 270.93 dB


dBmin is -60dB

state.DX {
	control.1 {
		iface MIXER
		name 'Master Playback Volume'
		value.0 127
		value.1 127
		value.2 127
		value.3 127
		value.4 127
		value.5 127
		value.6 127
		value.7 127
		comment {
			access 'read write'
			type INTEGER
			count 8
			range '67 - 127'
			dbmin -6000
			dbmax 0
			dbvalue.0 0
			dbvalue.1 0
			dbvalue.2 0
			dbvalue.3 0
			dbvalue.4 0
			dbvalue.5 0
			dbvalue.6 0
			dbvalue.7 0
		}
Comment 33 Raymond 2015-02-26 10:34:32 UTC
I: [pulseaudio] alsa-sink.c: Hardware volume ranges from inf dB to -inf dB.


  element master, dBmin and dBmax not set as e->emerged_mask is zero 



     pa_log_debug("Probe of element '%s' succeeded (volume=%d, switch=%d, enumeration=%d).", e->alsa_name, e->volume_use, e->switch_use, e->enumeration_use);

        if (ignore_dB)
            e->has_dB = false;

        if (e->volume_use == PA_ALSA_VOLUME_MERGE) {

            if (!p->has_volume) {
                p->min_volume = e->min_volume;
                p->max_volume = e->max_volume;
            }

            if (e->has_dB) {
                if (!p->has_volume) {
                    for (t = 0; t < PA_CHANNEL_POSITION_MAX; t++)
                        if (PA_CHANNEL_POSITION_MASK(t) & e->merged_mask) {
                            min_dB[t] = e->min_dB;
                            max_dB[t] = e->max_dB;
                            path_volume_channels |= PA_CHANNEL_POSITION_MASK(t);
                        }

                    p->has_dB = true;
Comment 34 Raymond 2015-02-27 03:21:32 UTC
do the coredump still occur after pulseaudio set path's min_dB and max_dB array 

if (!p->has_volume) {

+                  e->merged_mask = 0xff;

                    for (t = 0; t < PA_CHANNEL_POSITION_MAX; t++)
                        if (PA_CHANNEL_POSITION_MASK(t) & e->merged_mask) {
                            min_dB[t] = e->min_dB;
                            max_dB[t] = e->max_dB;
                            path_volume_channels |= PA_CHANNEL_POSITION_MASK(t);
                        }

                    p->has_dB = true;
Comment 35 Airlangga Cahya Utama 2015-02-27 07:27:37 UTC
Created attachment 113855 [details] [review]
complete patch to pa 5.0 fedora 21

Hello...

Just back from trip yesterday.

Hey thank you, now it's works properly. Volume control is working too.

Gnome control center audio can select audio analog out too since analog output port is properly reported by pulseaudio.

Attached complete patch that applied to my source.
All patch based on pulseaudio ver 5.0 fedora 21.
Comment 36 Airlangga Cahya Utama 2015-02-27 17:36:31 UTC
Just curious, is there a chance the patch go to next release of pulse audio?
Comment 37 Raymond 2015-02-28 04:10:23 UTC
you have to ask Tanu and Arun since 

e->merged_mask = 0xff;



may not be the correct fix as it change the logic 

seem it try to skip the virtual master playback volume

can you post the pulseaudio verbose log ?
Comment 38 Raymond 2015-02-28 08:23:05 UTC
http://cgit.freedesktop.org/pulseaudio/pulseaudio/plain/src/modules/alsa/mixer/paths/analog-output.conf


[Element Master]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

do pulseaudio need a 8 channel override map for those 8 channel master playback volume control ?
Comment 39 David Henningsson 2015-03-12 09:28:38 UTC
 > W: [pulseaudio] alsa-mixer.c: Volume element Master has 8 channels. That's too much! I can't handle that!

I think the short-term fix would be to just ignore Volume element Master. Long term we could think about supporting it correctly.
Comment 40 David Henningsson 2015-03-12 09:31:27 UTC
Meanwhile, just comment out the "[Element Master]" section in /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf should solve the problem for this card (but might cause problems for other cards).
Comment 41 David Henningsson 2015-03-12 09:46:35 UTC
Created attachment 114250 [details] [review]
Quick workaround

Quick-and-dirty workaround patch.
Comment 42 David Henningsson 2015-03-12 09:49:34 UTC
(In reply to Raymond from comment #37)
> you have to ask Tanu and Arun since 
> 
> e->merged_mask = 0xff;

Yeah, I don't think this part is correct either. It will probably regress other cards.
Comment 43 Raymond 2015-03-12 10:06:09 UTC
(In reply to David Henningsson from comment #41)
> Created attachment 114250 [details] [review] [review]
> Quick workaround
> 
> Quick-and-dirty workaround patch.

does it really fix since you still need to set all eight channel of those volume control to 0dB ?
Comment 44 Raymond 2015-03-12 11:56:35 UTC
(In reply to David Henningsson from comment #39)
>  > W: [pulseaudio] alsa-mixer.c: Volume element Master has 8 channels.
> That's too much! I can't handle that!
> 
> I think the short-term fix would be to just ignore Volume element Master.
> Long term we could think about supporting it correctly.

1) some notebook with  hda codecs (e.g alc260) which have stereo Master plaback volume control instead of the virtual master playbav volume
2) most multi channels usb audio card have these kind of playback volume control

http://mailman.alsa-project.org/pipermail/alsa-devel/2015-March/088833.html

numid=11,iface=MIXER,name='Speaker Playback Volume'
  ; type=INTEGER,access=rw---R--,values=8,min=0,max=74,step=0
  : values=54,54,54,54,54,54,54,54
  | dBminmax-min=-74.00dB,max=0.00dB
Comment 45 David Henningsson 2015-03-12 12:49:56 UTC
(In reply to Raymond from comment #43)
> (In reply to David Henningsson from comment #41)
> > Created attachment 114250 [details] [review] [review] [review]
> > Quick workaround
> > 
> > Quick-and-dirty workaround patch.
> 
> does it really fix since you still need to set all eight channel of those
> volume control to 0dB ?

That's why I called it a "workaround patch", not a fix. :-)

If the user wants to change this 8-channel volume control, (s)he will have to use ALSA to do so (e g alsamixer or amixer).
Comment 46 Raymond 2015-03-13 05:22:17 UTC
(In reply to David Henningsson from comment #42)
> (In reply to Raymond from comment #37)
> > you have to ask Tanu and Arun since 
> > 
> > e->merged_mask = 0xff;
> 
> Yeah, I don't think this part is correct either. It will probably regress
> other cards.

http://cgit.freedesktop.org/pulseaudio/pulseaudio/patch/src/modules/alsa/alsa-mixer.c?id=31575f7766d6ff39665b64a3a04412eff1c39957


should e->merged_mask be ininitalised in function element_probe ?
Comment 47 Raymond 2015-03-13 05:39:28 UTC
the current logic is also broken


      if (e->has_dB) {
                if (!p->has_volume) {
                    for (t = 0; t < PA_CHANNEL_POSITION_MAX; t++)
                        if (PA_CHANNEL_POSITION_MASK(t) & e->merged_mask) {
                            min_dB[t] = e->min_dB;
                            max_dB[t] = e->max_dB;
                            path_volume_channels |= PA_CHANNEL_POSITION_MASK(t);
+                          p->has_dB = true;
                        }

-               p->has_dB = true;
          }
Comment 48 Raymond 2015-03-13 08:36:08 UTC
 element_parse_override_map only supprt two override maps



static int element_parse_override_map(
        const char *filename,
        unsigned line,
        const char *section,
        const char *lvalue,
        const char *rvalue,
        void *data,
        void *userdata) {

    pa_alsa_path *p = userdata;
    pa_alsa_element *e;
    const char *state = NULL;
    unsigned i = 0;
    char *n;

    if (!(e = element_get(p, section, TRUE))) {
        pa_log("[%s:%u] Override map makes no sense in '%s'", filename, line, section);
        return -1;
    }

    while ((n = pa_split(rvalue, ",", &state))) {
        pa_channel_position_mask_t m;

        if (!*n)
            m = 0;
        else {
            if ((m = parse_mask(n)) == 0) {
                pa_log("[%s:%u] Override map '%s' invalid in '%s'", filename, line, n, section);
                pa_xfree(n);
                return -1;
            }
        }

        if (pa_streq(lvalue, "override-map.1"))
            e->masks[i++][0] = m;
        else
            e->masks[i++][1] = m;

        /* Later on we might add override-map.3 and so on here ... */

        pa_xfree(n);
    }

    e->override_map = TRUE;

    return 0;
}
Comment 49 Raymond 2015-03-14 03:33:19 UTC
http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=aec811798cd883a454b9b5cd82c77831906bbd2d

do overrided_map=all mean all channels since Speaker+LO playback volume seem only expect front left and front right, probably not all nor all-left,all-right


Element Speaker+LO]
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right
+required-any = any

if all mean PA_CHANNEL_POSITION_MASK_ALL,  e-merged mask should not be zero
Comment 50 Raymond 2015-04-02 02:57:34 UTC
http://mailman.alsa-project.org/pipermail/alsa-devel/2008-October/011830.html


these kind of multichannel volume control in xonar device was implemented as requested by lenning
Comment 51 Raymond 2015-10-22 16:26:48 UTC
(In reply to Airlangga Cahya Utama from comment #35)
> Created attachment 113855 [details] [review] [review]
> complete patch to pa 5.0 fedora 21
> 
> Hello...
> 
> Just back from trip yesterday.
> 
> Hey thank you, now it's works properly. Volume control is working too.
> 
> Gnome control center audio can select audio analog out too since analog
> output port is properly reported by pulseaudio.
> 
> Attached complete patch that applied to my source.
> All patch based on pulseaudio ver 5.0 fedora 21.

do adding a 8 channel override-map.3 to set the mask ?


[Element Master]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
Comment 52 GitLab Migration User 2018-07-30 10:25:14 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/402.

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.