Bug 608936

Summary: Front speakers don't work on F13 with SB Audigy 2 (center, rear, and subwoofer work)
Product: [Fedora] Fedora Reporter: S M <hawkboy>
Component: pulseaudioAssignee: Lennart Poettering <lpoetter>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: bugzilla.1.evade, hawkboy, lkundrak, lpoetter, scarinae, superquad.vortex2
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 18:57:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
output of "alsa-info.sh -no-upload" and "pulseaudio -vvvvv"
none
output of "pactl list" command
none
More recent output of "pulseaudio -vvvvv" as requested none

Description S M 2010-06-29 00:22:51 UTC
Created attachment 427533 [details]
output of "alsa-info.sh -no-upload" and "pulseaudio -vvvvv"

Description of problem:
Despite setting my sound configuration properly (tried all 5.1 configurations under "Settings for the selected device" in the "Hardware" tab of the "Sound Preferences"), only the rear, center channels work properly.

The front channels and the subwoofer don't make any sound in the "Test Speakers" dialog box. The front speakers don't work under any other conditions either (they are always silent). The subwoofer seems to work everywhere other than the "Test Speakers" dialog box.

This setup used to work perfectly on Fedora 12.

System:
Motherboard: Asus M4A78T-E
SoundBlaster Audigy II Platinum
Fedora 13 (Linux 2.6.33.5-124.fc13.x86_64 #1 SMP Fri Jun 11 09:38:12 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux)


Version-Release number of selected component (if applicable):
pulseaudio.x86_64                 0.9.21-6.fc13          @released/$releasever  
pulseaudio-gdm-hooks.x86_64       0.9.21-6.fc13          @released/$releasever  
pulseaudio-libs.i686              0.9.21-6.fc13          @fedora                
pulseaudio-libs.x86_64            0.9.21-6.fc13          @released/$releasever  
pulseaudio-libs-glib2.x86_64      0.9.21-6.fc13          @released/$releasever  
pulseaudio-module-bluetooth.x86_64
pulseaudio-module-gconf.x86_64    0.9.21-6.fc13          @released/$releasever  
pulseaudio-module-x11.x86_64      0.9.21-6.fc13          @released/$releasever  
pulseaudio-utils.x86_64           0.9.21-6.fc13          @released/$releasever

alsa-firmware.noarch              1.0.23-1.fc13          @released/$releasever  
alsa-lib.i686                     1.0.23-1.fc13          @fedora                
alsa-lib.x86_64                   1.0.23-1.fc13          @released/$releasever  
alsa-tools-firmware.x86_64        1.0.23-1.fc13          @released/$releasever  
alsa-utils.x86_64                 1.0.22-1.fc13          @released/$releasever  
report-config-localsave.x86_64    0.14-1.fc13            @updates               
report-plugin-localsave.x86_64    0.14-1.fc13            @updates     


How reproducible:
It's always like this.

Steps to Reproduce:
None
  
Actual results:
N/A

Expected results:
N/A

Additional info:
I've attached the output of "alsa-info.sh -no-upload" and "pulseaudio -vvvvv"

Comment 1 Raymond 2010-07-26 23:51:47 UTC
udev detect card 3 only

D: cli-command.c: Checking for existance of '/usr/lib64/pulse-0.9.21/modules/module-udev-detect.so': success
D: module-udev-detect.c: /dev/snd/controlC3 is accessible: yes
D: module-udev-detect.c: /devices/pci0000:00/0000:00:01.0/0000:01:05.1/sound/card3 is busy: no
D: module-udev-detect.c: Loading module-alsa-card with arguments 'device_id="3" name="pci-0000_01_05.1" card_name="alsa_card.pci-0000_01_05.1" tsched=yes ignore_dB=no card_properties="module-udev-detect.discovered=1"'




!!Soundcards recognised by ALSA
!!-----------------------------

 0 [Audigy2        ]: Audigy2 - SB Audigy 2 Platinum [SB0240P]
                      SB Audigy 2 Platinum [SB0240P] (rev.4, serial:0x10021102) at 0xe880, irq 20
 1 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xfbaf4000 irq 16
 2 [U0x46d0x8b2    ]: USB-Audio - USB Device 0x46d:0x8b2
                      USB Device 0x46d:0x8b2 at usb-0000:00:12.1-3, full speed
 3 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfbcfc000 irq 26

Comment 2 Lennart Poettering 2010-08-02 17:07:15 UTC
If you play around with "alsamixer -c0" can you make it work?

Comment 3 Raymond 2010-08-02 23:52:51 UTC
PA server only setup hdmi-stereo , module-udev-detect only detect card 3

D: alsa-mixer.c: Looking at profile output:hdmi-stereo
D: alsa-mixer.c: Checking for playback on Digital Stereo (HDMI) (hdmi-stereo)
D: alsa-util.c: Trying hdmi:3 with SND_PCM_NO_AUTO_FORMAT ...
D: alsa-util.c: Managed to open hdmi:3
D: alsa-util.c: Maximum hw buffer size is 21845 ms
D: alsa-util.c: Set buffer size first (to 4797 samples), period size second (to 1199 samples).
I: alsa-util.c: Device hdmi:3 doesn't support 44100 Hz, changed to 48000 Hz.
D: alsa-mixer.c: Profile output:hdmi-stereo supported.





your card 1 HDA STB seem has permission problem of controlC1


type=1400 audit(1277769221.172:5): avc:  denied  { read } for  pid=956 comm="alsactl" name="controlC1" dev=devtmpfs ino=11326 scontext=system_u:system_r:alsa_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file
type=1400 audit(1277769221.172:6): avc:  denied  { read } for  pid=963 comm="alsactl" name="controlC1" dev=devtmpfs ino=11326 scontext=system_u:system_r:alsa_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file
ALSA sound/pci/hda/hda_intel.c:712: azx_get_response timeout, switching to polling mode: last cmd=0x000f0001
type=1400 audit(1277769223.893:7): avc:  denied  { read } for  pid=1033 comm="alsactl" name="controlC1" dev=devtmpfs ino=11326 scontext=system_u:system_r:alsa_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file



run "dmesg" and check any error message related to your SB Audigy 2 Platinum in system log when the driver is loaded ( or system boot )

Comment 4 S M 2010-08-06 00:51:41 UTC
(In reply to comment #2)
> If you play around with "alsamixer -c0" can you make it work?    

No. When I initially started alsamixer -c0, it showed my "Front" and "Master Front" channels as having 0 volume, but changing the volume levels in the mixer did not have any effect on the speakers.

Comment 5 S M 2010-08-06 01:10:23 UTC
(In reply to comment #3)
> run "dmesg" and check any error message related to your SB Audigy 2 Platinum in
> system log when the driver is loaded ( or system boot )    

----------------
]# dmesg | grep -i audigy
EMU10K1_Audigy 0000:04:05.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
ALSA sound/pci/emu10k1/emufx.c:1546: Installing spdif_bug patch: SB Audigy 2 Platinum [SB0240P]
----------------

This seems normal to me.

----------------
]# dmesg | grep -i ALSA
ALSA sound/pci/hda/hda_codec.c:4284: autoconfig: line_outs=4 (0x1c/0x19/0x22/0x23/0x0)
ALSA sound/pci/hda/hda_codec.c:4288:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
ALSA sound/pci/hda/hda_codec.c:4292:    hp_outs=1 (0x1d/0x0/0x0/0x0/0x0)
ALSA sound/pci/hda/hda_codec.c:4293:    mono: mono_out=0x0
ALSA sound/pci/hda/hda_codec.c:4296:    dig-out=0x20/0x21
ALSA sound/pci/hda/hda_codec.c:4304:    inputs: mic=0x1a, fmic=0x1e, line=0x1b, fline=0x0, cd=0x1f, aux=0x0
ALSA sound/pci/emu10k1/emufx.c:1546: Installing spdif_bug patch: SB Audigy 2 Platinum [SB0240P]
type=1400 audit(1281047848.259:5): avc:  denied  { read } for  pid=954 comm="alsactl" name="controlC0" dev=devtmpfs ino=11105 scontext=system_u:system_r:alsa_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file
type=1400 audit(1281047848.364:6): avc:  denied  { read } for  pid=981 comm="alsactl" name="controlC0" dev=devtmpfs ino=11105 scontext=system_u:system_r:alsa_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file
ALSA sound/pci/hda/hda_intel.c:712: azx_get_response timeout, switching to polling mode: last cmd=0x000f0001
type=1400 audit(1281047850.688:7): avc:  denied  { read } for  pid=1033 comm="alsactl" name="controlC1" dev=devtmpfs ino=11567 scontext=system_u:system_r:alsa_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file
------------

This one looked like there was an selinux issue (or am I way off?) so I turned off selinux. That seems to have taken most of the issue away. 'ALSA' section of dmesg is now:

------------
HDA Intel 0000:00:14.2: PCI INT A -> GSI 16 (level, low) -> IRQ 16
  alloc irq_desc for 20 on node 0
  alloc kstat_irqs on node 0
EMU10K1_Audigy 0000:04:05.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
ALSA sound/pci/emu10k1/emufx.c:1546: Installing spdif_bug patch: SB Audigy 2 Platinum [SB0240P]
ALSA sound/pci/hda/hda_codec.c:4284: autoconfig: line_outs=4 (0x1c/0x19/0x22/0x23/0x0)
ALSA sound/pci/hda/hda_codec.c:4288:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
ALSA sound/pci/hda/hda_codec.c:4292:    hp_outs=1 (0x1d/0x0/0x0/0x0/0x0)
ALSA sound/pci/hda/hda_codec.c:4293:    mono: mono_out=0x0
ALSA sound/pci/hda/hda_codec.c:4296:    dig-out=0x20/0x21
ALSA sound/pci/hda/hda_codec.c:4304:    inputs: mic=0x1a, fmic=0x1e, line=0x1b, fline=0x0, cd=0x1f, aux=0x0
HDA Intel 0000:01:05.1: PCI INT B -> GSI 19 (level, low) -> IRQ 19
  alloc irq_desc for 26 on node 0
  alloc kstat_irqs on node 0
HDA Intel 0000:01:05.1: irq 26 for MSI/MSI-X
HDA Intel 0000:01:05.1: setting latency timer to 64
usbcore: registered new interface driver snd-usb-audio
ALSA sound/pci/hda/hda_intel.c:712: azx_get_response timeout, switching to polling mode: last cmd=0x000f0001
---------------

Comment 6 S M 2010-08-06 01:14:34 UTC
Please note that the sound issue still remains. I just don't see the "denied { read }" messages any more.

Comment 7 Raymond 2010-08-06 02:25:23 UTC
unmute and adjust the volume using "alsamixer -c 0" , "alsamixer -c 1"

speaker-test -c 2 -t wav -Dfront:0

speaker-test -c 2 -t wav -Dfront:1

Comment 8 Raymond 2010-08-08 04:15:15 UTC
(In reply to comment #6)
> Please note that the sound issue still remains. I just don't see the "denied {
> read }" messages any more.    

Did you see module-udev-detect find your sound cards ? 

Post the output of "pactl list"

Comment 9 S M 2010-08-10 22:45:58 UTC
(In reply to comment #7)
> unmute and adjust the volume using "alsamixer -c 0" , "alsamixer -c 1"
Done. Though alsamixer -c1 has no controls.

> 
> speaker-test -c 2 -t wav -Dfront:0
]# speaker-test -c 2 -t wav -Dfront:0

speaker-test 1.0.23

Playback device is front:0
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 1048576
Period size range from 32 to 524288
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right
Time per period = 10.959935
 0 - Front Left
 1 - Front Right
Time per period = 10.965700
 0 - Front Left
 1 - Front Right
Time per period = 10.963932
 0 - Front Left
 1 - Front Right
( keeps going )

There's no sound

> 
> speaker-test -c 2 -t wav -Dfront:1

]# speaker-test -c 2 -t wav -Dfront:1

speaker-test 1.0.23

Playback device is front:1
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Playback open error: -2,No such file or directory
Playback open error: -2,No such file or directory
Playback open error: -2,No such file or directory
( keeps going )

Comment 10 S M 2010-08-11 01:28:09 UTC
(In reply to comment #8)
> (In reply to comment #6)
> > Please note that the sound issue still remains. I just don't see the "denied {
> > read }" messages any more.    
> 
> Did you see module-udev-detect find your sound cards ? 

How do I check that? I don't see any module-udev-detect lines in dmesg and I've already shown all the lines with audigy in it (am I missing something?)

> 
> Post the output of "pactl list"    

I've added this output as an attachment.

Comment 11 S M 2010-08-11 01:29:06 UTC
Created attachment 438044 [details]
output of "pactl list" command

Comment 12 Raymond 2010-08-12 02:33:32 UTC
(In reply to comment #10)
> (In reply to comment #8)
> > (In reply to comment #6)
> > > Please note that the sound issue still remains. I just don't see the "denied {
> > > read }" messages any more.    
> > 
> > Did you see module-udev-detect find your sound cards ? 
> 
> How do I check that? I don't see any module-udev-detect lines in dmesg and I've
> already shown all the lines with audigy in it (am I missing something?)
> 

it is in pulseaudio.log since PA use udev to find out the sound cards 

it seem that PA only found card 3 "hdmi" in your log, 



D: cli-command.c: Checking for existance of '/usr/lib64/pulse-0.9.21/modules/module-udev-detect.so': success
D: module-udev-detect.c: /dev/snd/controlC3 is accessible: yes
D: module-udev-detect.c: /devices/pci0000:00/0000:00:01.0/0000:01:05.1/sound/card3 is busy: no
D: module-udev-detect.c: Loading module-alsa-card with arguments 'device_id="3" name="pci-0000_01_05.1"

Comment 13 S M 2010-08-17 00:45:56 UTC
> it is in pulseaudio.log since PA use udev to find out the sound cards 

I can't find pulseaudio.log anywhere on my system. Where is it?
I also don't know how pulseaudio is lunched so I can change its logging configuration.

Comment 14 Raymond 2010-08-18 01:56:54 UTC
(In reply to comment #13)
> > it is in pulseaudio.log since PA use udev to find out the sound cards 
> 
> I can't find pulseaudio.log anywhere on my system. Where is it?
> I also don't know how pulseaudio is lunched so I can change its logging
> configuration.



output of "alsa-info.sh -no-upload" and "pulseaudio -vvvvv"   (11.58 KB, application/x-gzip)
2010-06-28 20:22 EDT, S M 


how do you get the pulseaudio log in your attachment ?

Are there any application using the other three sound cards to prevent module-udev-detect to find the card 0 , card 1 and card 2 in alsa-info.sh


Beware that changing "notice" to "debug" may generate a log of message

/etc/pulse/daemon.conf
 log-level = debug


it is strange that you cannot get any sound when using front device of your Audigy II Platinum

card 0: Audigy2 [SB Audigy 2 Platinum [SB0240P]], device 0: emu10k1 [ADC Capture/Standard PCM Playback]
  Subdevices: 32/32

Comment 15 S M 2010-08-19 00:56:42 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > > it is in pulseaudio.log since PA use udev to find out the sound cards 
> > 
> > I can't find pulseaudio.log anywhere on my system. Where is it?
> > I also don't know how pulseaudio is lunched so I can change its logging
> > configuration.
> 
> 
> 
> output of "alsa-info.sh -no-upload" and "pulseaudio -vvvvv"   (11.58 KB,
> application/x-gzip)
> 2010-06-28 20:22 EDT, S M 
> 
> 
> how do you get the pulseaudio log in your attachment ?

I see. I guess I forgot I did that.
> 
> Are there any application using the other three sound cards to prevent
> module-udev-detect to find the card 0 , card 1 and card 2 in alsa-info.sh

I don't think so. The other cards are disabled. In any case, could an application cause a failure in only 3 of the 5 speakers?

Though it would make sense: If some application/driver initialized my sound card as a 2.1 setup and wouldn't let pulseaudio use those speakers.

How do I test this theory?

> 
> Beware that changing "notice" to "debug" may generate a log of message
> 
> /etc/pulse/daemon.conf
>  log-level = debug

Should I do this? I thought the "-vvvvv" option already set the log level to its maximum.
> 
> 
> it is strange that you cannot get any sound when using front device of your
> Audigy II Platinum
> 
> card 0: Audigy2 [SB Audigy 2 Platinum [SB0240P]], device 0: emu10k1 [ADC
> Capture/Standard PCM Playback]
>   Subdevices: 32/32

Comment 16 Raymond 2010-08-20 02:35:16 UTC
(In reply to comment #15)
> > 
> > Are there any application using the other three sound cards to prevent
> > module-udev-detect to find the card 0 , card 1 and card 2 in alsa-info.sh
> 
> I don't think so. The other cards are disabled. In any case, could an
> application cause a failure in only 3 of the 5 speakers?

Refer to your alsa-info , 

do you mean that you disabled the cards in PA or udev ?

There is no application using the card when you are running alsa-info.sh since the number of the available subdevice is equal to the subdevice count


!!Soundcards recognised by ALSA
!!-----------------------------

 0 [Audigy2        ]: Audigy2 - SB Audigy 2 Platinum [SB0240P]
                      SB Audigy 2 Platinum [SB0240P] (rev.4, serial:0x10021102) at 0xe880, irq 20
 1 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xfbaf4000 irq 16
 2 [U0x46d0x8b2    ]: USB-Audio - USB Device 0x46d:0x8b2
                      USB Device 0x46d:0x8b2 at usb-0000:00:12.1-3, full speed
 3 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfbcfc000 irq 26



> 
> Though it would make sense: If some application/driver initialized my sound
> card as a 2.1 setup and wouldn't let pulseaudio use those speakers.
> 
> How do I test this theory?

The point is your Audigy 2 Platinum has 32 playback subdevices , it is unlikely that you have enough applications to block it

grep -ir "controlC" *
module-udev-detect.c:    cd = pa_sprintf_malloc("%s/snd/controlC%s", udev_get_dev_path(u->udev), path_get_card_id(d->path));
module-udev-detect.c:    cd = pa_sprintf_malloc("controlC%s", path_get_card_id(d->path));
module-udev-detect.c:            if (((event->mask & IN_ATTRIB) && pa_startswith(event->name, "controlC")))

>> This one looked like there was an selinux issue (or am I way off?) so I 
>> turned off selinux. That seems to have taken most of the issue away. 


I guess the module-udev-detect start working when you turn off selinux 

but why do user need to turn off selinux for running alsactl ?

may be race between alsactl and module-udev-detect since both need to access "snd/controlC" 

can you post the pulseaudio log again to verify that module-udev-detect find all your cards

Comment 17 S M 2010-09-06 18:32:07 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > > 
> > > Are there any application using the other three sound cards to prevent
> > > module-udev-detect to find the card 0 , card 1 and card 2 in alsa-info.sh
> > 
> > I don't think so. The other cards are disabled. In any case, could an
> > application cause a failure in only 3 of the 5 speakers?
> 
> Refer to your alsa-info , 
> 
> do you mean that you disabled the cards in PA or udev ?

I disabled them in the gnome audio preferences dialog (which hooks into PA, right?). I also disabled all of the motherboard's on-board audio chips.

I will attach the new pulseaudio -vvvvv output shortly.

If you have the time/this bug is important enough, would one of you guys like to spend some time diagnosing this more directly (through chat or skype or something)?

Comment 18 S M 2010-09-06 18:38:29 UTC
Created attachment 443351 [details]
More recent output of "pulseaudio -vvvvv" as requested

Comment 19 Raymond 2010-09-07 14:41:15 UTC
your case is similar to https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5018

PA server seem ignore the EBADFD error

I: (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_START failed (-77)



I: alsa-sink.c: Using 4.0 fragments of size 13224 bytes (24.99ms), buffer size is 52896 bytes (99.95ms)
D: alsa-sink.c: hwbuf_unused=0
D: alsa-sink.c: setting avail_min=1
D: alsa-mixer.c: Activating path analog-output
D: alsa-mixer.c: Path analog-output (Analog Output), direction=1, priority=99, probed=yes, supported=yes, has_mute=no, has_volume=yes, has_dB=yes, min_volume=0, max_volume=100, min_dB=-80, max_dB=0
D: alsa-mixer.c: Element Master, direction=1, switch=0, volume=1, enumeration=0, required=0, required_absent=0, mask=0x7ffffffffffff, n_channels=1, override_map=yes
D: alsa-mixer.c: Element Front, direction=1, switch=0, volume=1, enumeration=0, required=0, required_absent=0, mask=0x6, n_channels=2, override_map=yes
D: alsa-mixer.c: Element Surround, direction=1, switch=0, volume=1, enumeration=0, required=0, required_absent=0, mask=0x60, n_channels=2, override_map=yes
D: alsa-mixer.c: Element Side, direction=1, switch=0, volume=1, enumeration=0, required=0, required_absent=0, mask=0xc00, n_channels=2, override_map=yes
D: alsa-mixer.c: Element Center, direction=1, switch=0, volume=1, enumeration=0, required=0, required_absent=0, mask=0x4900000000018, n_channels=1, override_map=yes
D: alsa-mixer.c: Element LFE, direction=1, switch=0, volume=1, enumeration=0, required=0, required_absent=0, mask=0x80, n_channels=1, override_map=yes
D: alsa-mixer.c: Element External Amplifier, direction=1, switch=4, volume=0, enumeration=0, required=0, required_absent=0, mask=0x0, n_channels=0, override_map=no
D: alsa-mixer.c: Option on (output-amplifier-on/Amplifier) index=1, priority=10
D: alsa-mixer.c: Option off (output-amplifier-off/No Amplifier) index=0, priority=0
D: alsa-mixer.c: Setting output-amplifier-on (Amplifier) priority=10
D: alsa-mixer.c: Setting output-amplifier-off (No Amplifier) priority=0
I: alsa-sink.c: Hardware volume ranges from -80.00 dB to 0.00 dB.
I: alsa-sink.c: No particular base volume set, fixing to 0 dB
I: alsa-sink.c: Using hardware volume control. Hardware dB scale supported.
I: alsa-sink.c: Driver does not support hardware mute control, falling back to software mute control.
D: alsa-util.c: snd_pcm_dump():
D: alsa-util.c: Multi PCM
D: alsa-util.c:   Channel bindings:
D: alsa-util.c:     0: slave 0, channel 0
D: alsa-util.c:     1: slave 0, channel 1
D: alsa-util.c:     2: slave 1, channel 0
D: alsa-util.c:     3: slave 1, channel 1
D: alsa-util.c:     4: slave 2, channel 0
D: alsa-util.c:     5: slave 2, channel 1
D: alsa-util.c: Its setup is:
D: alsa-util.c:   stream       : PLAYBACK
D: alsa-util.c:   access       : RW_INTERLEAVED
D: alsa-util.c:   format       : S16_LE
D: alsa-util.c:   subformat    : STD
D: alsa-util.c:   channels     : 6
D: alsa-util.c:   rate         : 44100
D: alsa-util.c:   exact rate   : 44100 (44100/1)
D: alsa-util.c:   msbits       : 16
D: alsa-util.c:   buffer_size  : 4408
D: alsa-util.c:   period_size  : 1102
D: alsa-util.c:   period_time  : 24988
D: alsa-util.c:   tstamp_mode  : ENABLE
D: alsa-util.c:   period_step  : 1
D: alsa-util.c:   avail_min    : 1102
D: alsa-util.c:   period_event : 1
D: alsa-util.c:   start_threshold  : -1
D: alsa-util.c:   stop_threshold   : 4962966789362286592
D: alsa-util.c:   silence_threshold: 0
D: alsa-util.c:   silence_size : 0
D: alsa-util.c:   boundary     : 4962966789362286592
D: alsa-util.c: Slave #0: Hooks PCM
D: alsa-util.c: Its setup is:
D: alsa-util.c:   stream       : PLAYBACK
D: alsa-util.c:   access       : MMAP_INTERLEAVED
D: alsa-util.c:   format       : S16_LE
D: alsa-util.c:   subformat    : STD
D: alsa-util.c:   channels     : 2
D: alsa-util.c:   rate         : 44100
D: alsa-util.c:   exact rate   : 44100 (44100/1)
D: alsa-util.c:   msbits       : 16
D: alsa-util.c:   buffer_size  : 4408
D: alsa-util.c:   period_size  : 1102
D: alsa-util.c:   period_time  : 24988
D: alsa-util.c:   tstamp_mode  : ENABLE
D: alsa-util.c:   period_step  : 1
D: alsa-util.c:   avail_min    : 1102
D: alsa-util.c:   period_event : 1
D: alsa-util.c:   start_threshold  : -1
D: alsa-util.c:   stop_threshold   : 4962966789362286592
D: alsa-util.c:   silence_threshold: 0
D: alsa-util.c:   silence_size : 0
D: alsa-util.c:   boundary     : 4962966789362286592
D: alsa-util.c: Slave: Hardware PCM card 0 'SB Audigy 2 Platinum [SB0240P]' device 0 subdevice 0
D: alsa-util.c: Its setup is:
D: alsa-util.c:   stream       : PLAYBACK
D: alsa-util.c:   access       : MMAP_INTERLEAVED
D: alsa-util.c:   format       : S16_LE
D: alsa-util.c:   subformat    : STD
D: alsa-util.c:   channels     : 2
D: alsa-util.c:   rate         : 44100
D: alsa-util.c:   exact rate   : 44100 (44100/1)
D: alsa-util.c:   msbits       : 16
D: alsa-util.c:   buffer_size  : 4408
D: alsa-util.c:   period_size  : 1102
D: alsa-util.c:   period_time  : 24988
D: alsa-util.c:   tstamp_mode  : ENABLE
D: alsa-util.c:   period_step  : 1
D: alsa-util.c:   avail_min    : 1102
D: alsa-util.c:   period_event : 1
D: alsa-util.c:   start_threshold  : -1
D: alsa-util.c:   stop_threshold   : 4962966789362286592
D: alsa-util.c:   silence_threshold: 0
D: alsa-util.c:   silence_size : 0
D: alsa-util.c:   boundary     : 4962966789362286592
D: alsa-util.c:   appl_ptr     : 0
D: alsa-util.c:   hw_ptr       : 0
D: alsa-util.c: Slave #1: Hooks PCM
D: alsa-util.c: Its setup is:
D: alsa-util.c:   stream       : PLAYBACK
D: alsa-util.c:   access       : MMAP_INTERLEAVED
D: alsa-util.c:   format       : S16_LE
D: alsa-util.c:   subformat    : STD
D: alsa-util.c:   channels     : 2
D: alsa-util.c:   rate         : 44100
D: alsa-util.c:   exact rate   : 44100 (44100/1)
D: alsa-util.c:   msbits       : 16
D: alsa-util.c:   buffer_size  : 4408
D: alsa-util.c:   period_size  : 1102
D: alsa-util.c:   period_time  : 24988
D: alsa-util.c:   tstamp_mode  : ENABLE
D: alsa-util.c:   period_step  : 1
D: alsa-util.c:   avail_min    : 1102
D: alsa-util.c:   period_event : 1
D: alsa-util.c:   start_threshold  : -1
D: alsa-util.c:   stop_threshold   : 4962966789362286592
D: alsa-util.c:   silence_threshold: 0
D: alsa-util.c:   silence_size : 0
D: alsa-util.c:   boundary     : 4962966789362286592
D: alsa-util.c: Slave: Hardware PCM card 0 'SB Audigy 2 Platinum [SB0240P]' device 0 subdevice 1
D: alsa-util.c: Its setup is:
D: alsa-util.c:   stream       : PLAYBACK
D: alsa-util.c:   access       : MMAP_INTERLEAVED
D: alsa-util.c:   format       : S16_LE
D: alsa-util.c:   subformat    : STD
D: alsa-util.c:   channels     : 2
D: alsa-util.c:   rate         : 44100
D: alsa-util.c:   exact rate   : 44100 (44100/1)
D: alsa-util.c:   msbits       : 16
D: alsa-util.c:   buffer_size  : 4408
D: alsa-util.c:   period_size  : 1102
D: alsa-util.c:   period_time  : 24988
D: alsa-util.c:   tstamp_mode  : ENABLE
D: alsa-util.c:   period_step  : 1
D: alsa-util.c:   avail_min    : 1102
D: alsa-util.c:   period_event : 1
D: alsa-util.c:   start_threshold  : -1
D: alsa-util.c:   stop_threshold   : 4962966789362286592
D: alsa-util.c:   silence_threshold: 0
D: alsa-util.c:   silence_size : 0
D: alsa-util.c:   boundary     : 4962966789362286592
D: alsa-util.c:   appl_ptr     : 0
D: alsa-util.c:   hw_ptr       : 0
D: alsa-util.c: Slave #2: Hooks PCM
D: alsa-util.c: Its setup is:
D: alsa-util.c:   stream       : PLAYBACK
D: alsa-util.c:   access       : MMAP_INTERLEAVED
D: alsa-util.c:   format       : S16_LE
D: alsa-util.c:   subformat    : STD
D: alsa-util.c:   channels     : 2
D: alsa-util.c:   rate         : 44100
D: alsa-util.c:   exact rate   : 44100 (44100/1)
D: alsa-util.c:   msbits       : 16
D: alsa-util.c:   buffer_size  : 4408
D: alsa-util.c:   period_size  : 1102
D: alsa-util.c:   period_time  : 24988
D: alsa-util.c:   tstamp_mode  : ENABLE
D: alsa-util.c:   period_step  : 1
D: alsa-util.c:   avail_min    : 1102
D: alsa-util.c:   period_event : 1
D: alsa-util.c:   start_threshold  : -1
D: alsa-util.c:   stop_threshold   : 4962966789362286592
D: alsa-util.c:   silence_threshold: 0
D: alsa-util.c:   silence_size : 0
D: alsa-util.c:   boundary     : 4962966789362286592
D: alsa-util.c: Slave: Hardware PCM card 0 'SB Audigy 2 Platinum [SB0240P]' device 0 subdevice 2
D: alsa-util.c: Its setup is:
D: alsa-util.c:   stream       : PLAYBACK
D: alsa-util.c:   access       : MMAP_INTERLEAVED
D: alsa-util.c:   format       : S16_LE
D: alsa-util.c:   subformat    : STD
D: alsa-util.c:   channels     : 2
D: alsa-util.c:   rate         : 44100
D: alsa-util.c:   exact rate   : 44100 (44100/1)
D: alsa-util.c:   msbits       : 16
D: alsa-util.c:   buffer_size  : 4408
D: alsa-util.c:   period_size  : 1102
D: alsa-util.c:   period_time  : 24988
D: alsa-util.c:   tstamp_mode  : ENABLE
D: alsa-util.c:   period_step  : 1
D: alsa-util.c:   avail_min    : 1102
D: alsa-util.c:   period_event : 1
D: alsa-util.c:   start_threshold  : -1
D: alsa-util.c:   stop_threshold   : 4962966789362286592
D: alsa-util.c:   silence_threshold: 0
D: alsa-util.c:   silence_size : 0
D: alsa-util.c:   boundary     : 4962966789362286592
D: alsa-util.c:   appl_ptr     : 0
D: alsa-util.c:   hw_ptr       : 0
D: alsa-sink.c: Requested volume: 0:  46% 1:  46% 2:  46% 3:  46% 4:  46% 5:  46%
D: alsa-sink.c: Thread starting up
D: alsa-sink.c: Got hardware volume: 0:  46% 1:  46% 2:  46% 3:  46% 4:  46% 5:  46%
D: alsa-sink.c: Calculated software volume: 0:  99% 1:  99% 2:  99% 3:  99% 4:  99% 5:  99% (accurate-enough=yes)
D: core-util.c: RealtimeKit worked.
I: core-util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
I: alsa-sink.c: Starting playback.
I: (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_START failed (-77)

Comment 20 S M 2010-09-14 01:48:30 UTC
Ok. Should I report this as an ALSA bug?
PA should be changed to not ignore the error, no?

Comment 21 Raymond 2010-09-14 07:20:40 UTC
it seem that the PCM Out volume of STAC9721 is muted

0:18 = 9f1f





0-0/0: SigmaTel STAC9721,23

PCI Subsys Vendor: 0x0000
PCI Subsys Device: 0x0000

Flags: 0
Capabilities     :
DAC resolution   : 18-bit
ADC resolution   : 18-bit
3D enhancement   : SigmaTel 3D Enhancement


Current setup
Mic gain         : +0dB [+0dB]
POP path         : pre 3D
Sim. stereo      : off
3D enhancement   : off
Loudness         : off
Mono output      : MIX
Mic select       : Mic1
ADC/DAC loopback : off
Extended ID      : codec=0 rev=0 AMAP DSA=0
Extended status  : PRJ

0:00 = 6940
0:02 = 0000
0:04 = 8000
0:06 = 801f
0:08 = 0000
0:0a = 801e
0:0c = 801f
0:0e = 801f
0:10 = 9f1f
0:12 = 9f1f
0:14 = 9f1f
0:16 = 9f1f
0:18 = 9f1f

Comment 22 S M 2010-09-14 23:04:05 UTC
Which means?

Comment 23 Raymond 2010-09-15 02:17:26 UTC
you may need to uncomment line 1411 to find out the value of work_done since
according to http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html

Start threshold

f you want to use explicit start (snd_pcm_start), you can set this value greater than ring buffer size (in samples), but use the constant MAXINT is not a bad idea

so if PA want to explicit start by snd_pcm_start in line 1417, it must ensure that enough data in the buffer and it cannot ignore the error returned by snd_pcm_start


1403             if (u->use_mmap)
1404                 work_done = mmap_write(u, &sleep_usec, revents & POLLOUT, on_timeout);
1405             else
1406                 work_done = unix_write(u, &sleep_usec, revents & POLLOUT, on_timeout);
1407 
1408             if (work_done < 0)

1409                 goto fail;
1410 
1411 /*             pa_log_debug("work_done = %i", work_done); */
1412 
1413             if (work_done) {
1414 
1415                 if (u->first) {
1416                     pa_log_info("Starting playback.");
1417                     snd_pcm_start(u->pcm_handle);
1418 
1419                     pa_smoother_resume(u->smoother, pa_rtclock_now(), TRUE);
1420 
1421                     u->first = FALSE;
1422                 }
1423 
1424                 update_smoother(u);
1425             }
1426

Comment 24 S M 2010-09-16 22:58:10 UTC
Ok. How do I build and install?

Comment 25 Raymond 2010-09-18 02:27:57 UTC
I: (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_START failed (-77)


you will need to uncomment the following line from alsa-sink.c to enable DEBUG_TIMING to find out how much data had been written by PA server before PA call snd_pcm_start()


alsa-sink.c:/* #define DEBUG_TIMING */

Comment 26 S M 2010-10-10 18:54:48 UTC
This is progressing too slowly. I respectfully request that you would email me an msn/gtalk/irc/skype contact so we can get things going faster.

FYI, I am a computer engineer with a graduate degree and over 10 years of C/C++ programming experience. I am also familiar with python and Java (if at all necessary). I genuinely want to help make PA better, but just don't have the time to continue this way.

Otherwise please let me know which sound-cards PA is designed/tested for and I will buy a new card.

Comment 27 S M 2010-12-05 21:06:07 UTC
An update:
I have just switched to fedora 14 and now sound does not work _at all_.

Comment 28 Terry Cole 2011-01-03 11:03:10 UTC
From TC:

I can confirm this. The last versions of Fedora worked fine in stereo mode, but the SB0400 Audigy2 value no longer works AT ALL in Fedora 14. This is a very strange state of affairs. All the usual system tools seem to confirm the card is correctly initialized. There is simply no sound.

Comment 29 Terry Cole 2011-01-03 11:26:23 UTC
Even  more mysterious: by proceeding to "Sound Preferences" (ie. /usr/bin/gnome-volume-control) "Hardware" tab, selecting the "SB0400 Audigy2 Value" card and changing the "Settings for the selected device" from "Analog Stereo Duplex" to "Digital Stereo Duplex (IEC958)", the sound is restored. 

And yet the cable to the speakers is connected to the analogue outputs on the back of the card.

Comment 30 S M 2011-01-04 23:46:10 UTC
Interesting.

I switched mine to "Digital Stereo (IEC958) Output + Analog Mono Input" and now I have the front speakers (not center, not real subwoofer) working.

I just hadn't though to use this option since there's no digital 5.1 option and the old 5.1 analog worked in older versions. I wonder if this is a new "feature/improvement".

Thanks Terry!!

A question though: why is there no Digital 5.1 option? I've googled around an other people definitely have the same problem (and no solutions). Also, the 5.1 worked before, so it can't really be a driver issue.

Thoughts?

Comment 31 Terry Cole 2011-01-05 02:49:32 UTC
First, the issue of Digital working when Analogue outputs are connected. It's quite simply a bug, and a change from Fedora 13. 

We could probably find it by comparing the code from the snd_emu10k1 modules from the two distributions. In particular, look at this from emu10k1.h;


// Audigy output/GPIO stuff taken from the kX drivers
#define A_IOCFG_GPOUT0		0x0044		/* analog/digital				*/
#define A_IOCFG_DISABLE_ANALOG	0x0040		/* = 'enable' for Audigy2 (chiprev=4)		*/
#define A_IOCFG_ENABLE_DIGITAL	0x0004
#define A_IOCFG_ENABLE_DIGITAL_AUDIGY4	0x0080
#define A_IOCFG_UNKNOWN_20      0x0020
#define A_IOCFG_DISABLE_AC97_FRONT      0x0080  /* turn off ac97 front -> front (10k2.1)	*/
#define A_IOCFG_GPOUT1		0x0002		/* IR? drive's internal bypass (?)		*/
#define A_IOCFG_GPOUT2		0x0001		/* IR */
#define A_IOCFG_MULTIPURPOSE_JACK	0x2000  /* center+lfe+rear_center (a2/a2ex)		*/
                                                /* + digital for generic 10k2			*/
#define A_IOCFG_DIGITAL_JACK    0x1000          /* digital for a2 platinum			*/
#define A_IOCFG_FRONT_JACK      0x4000
#define A_IOCFG_REAR_JACK       0x8000
#define A_IOCFG_PHONES_JACK     0x0100          /* LiveDrive					*/



Second, the reason there's no Digital 5.1 option may have something to do with the required external module. Do you have the digital module? It's a little hardware dongle connecting by 3mm jack to the topmost "Digital output" socket at the back of the card. 

Perhaps the driver probes for the existence of the module, and if not finding it reverts to digital stereo which is all that would be available to a normal jack plugging in to that socket.

Comment 32 S M 2011-01-05 03:21:34 UTC
I'm not sure what qualifies as an external module.

I have my Audigy 2 connected, through the "digital out" port of the sound card, to the decoder/amplifier for Creative's Inspure 5700 speakers (http://ixbtlabs.com/articles/inspire5700vsdtt3500/).

The decoder is set to take "Digital DIN" as its input (the connection in the back is the "coaxial" input under the "digital/pcm audio inputs" set here: http://ixbtlabs.com/articles/inspire5700vsdtt3500/5700decoder-back.jpg), which I assume is true digital (though I can't ever be sure with all the marketing jargon around these things).

Comment 33 Terry Cole 2011-01-05 03:50:39 UTC
Okay, that setup should work through the "Coaxial" input (Sony/Philips DIF) as discussed.

The separate module simply takes the S/PDIF signal from the digital port of the Audigy2, and converts it to other hardware formats (optical out, coax out, optical in, coax in). 

If you don't have the installation diagram which came with your card anymore, there's a copy downloadable (Adobe Illustrator embedded in PDF) from:

http://ccfiles.creative.com/manualdn/Manuals/TSD/8347/0x8CA0AEAE/SB%20Audigy%202_CLA_back.pdf

and:
http://ccfiles.creative.com/manualdn/Manuals/TSD/8346/0x1E778B69/SB%20Audigy%202_CLA_front.pdf

Those show the details. 

The input is indeed true digital at least for 5.1. I don't have any idea why the option isn't showing better than digital stereo input or output.

Comment 34 Terry Cole 2011-01-05 04:18:48 UTC
One thing. Have you been using the "Test Speakers" function in preferences, when you say that only the front L/R speakers work? Or just playing an MP3?

The reason I ask is that with a digital connection you obviously won't get anything other than the front speakers working, if you are only playing (say) a stereo track. 

Stereo won't use all speakers in a 5.1 or 7.1 connection. Unless, that is, the EAX console is invoked to upmix the stereo to the remaining speakers (and that only works in Windows, I believe).

Comment 35 S M 2011-01-05 04:26:04 UTC
I see. It would be really nice to know why 5.1 isn't showing =)

Yes. I've used test speakers. I get nothing unless I set it to digital 2.1, in which case I can only test the front speakers.

Regarding the upmix, this was possible in older versions of Fedora. With ALSA, I could just upmix (I used the file from reply #8 in this thread: http://www.fedoraforum.org/forum/showthread.php?t=187820). I think I could do it with pulseaudio too (I really doubt I would have lived without it for so long), though with pulse, I was as simple as pushing a few sliders.

Comment 36 David 2012-04-29 06:42:03 UTC
It's a year after the last post, but I have a similar issue which I came to record today.


* I also have an Audigy-based card (Marketed as an Audigy 4).
* I also had problems with the front left and right speakers failing to work, while all other speakers work
* However I'm now using Fedora 16

I have an analog 5.1 speaker system with no decoder.  The speaker system uses separate inputs for front left/right, center, rear and subwoofer (from memory!).


I personally have to use the "alsamixer" utility to mute the "S/PDIF Optical Raw" output in order for that output to correctly send analog audio for the left and right channel.

I have to do this manually every time I reboot!

I'm thinking of raising a feature request for Gnome so that when any "Analog Surround 5.1 + Output" the Digital outputs be automatically muted.  If people need Digital 5.1, then Gnome needs a clear "Digital Surround 5.1 + Output" category.

Anyway, I hope this helps you!

Comment 37 David 2012-04-29 07:24:22 UTC
Not sure if it will solve this bug, but I've gone ahead and raised bug 817332 for the problem I found with front left/right audio from a SB Audigy.

Comment 38 Fedora End Of Life 2012-08-16 18:57:16 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping