Bug 475251 - ALSA Bug: sound doesn't work in Fedora 10 (and didn't work in later kernels in Fedora 9)
ALSA Bug: sound doesn't work in Fedora 10 (and didn't work in later kernels i...
Status: CLOSED DUPLICATE of bug 489828
Product: Fedora
Classification: Fedora
Component: alsa-lib (Show other bugs)
10
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Jaroslav Kysela
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-08 12:27 EST by Aditya Kadambi
Modified: 2013-01-21 15:20 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
uname -a Linux localhost 2.6.27.5-117.fc10.x86_64 #1 SMP Tue Nov 18 11:58:53 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-17 10:03:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
alsa-info for failing sound on Asus M3A78-T (30.45 KB, text/plain)
2009-03-13 19:38 EDT, Wolfgang Rupprecht
no flags Details
Show proper error message for bad rates/formats in hda_codec (1.66 KB, patch)
2009-03-16 14:45 EDT, Jaroslav Kysela
no flags Details | Diff
Show error messages in snd_hda_query_supported_pcm() and reorder local variables declaration (2.50 KB, patch)
2009-03-17 06:17 EDT, Jaroslav Kysela
no flags Details | Diff
Test patch (3.11 KB, patch)
2009-03-17 07:41 EDT, Jaroslav Kysela
no flags Details | Diff
Test patch #2 (3.27 KB, patch)
2009-03-17 08:18 EDT, Jaroslav Kysela
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
ALSA Project 4321 None None None Never

  None (edit)
Description Aditya Kadambi 2008-12-08 12:27:06 EST
Description of problem:
----------------------

Sound has not worked on my machine for sometime (since Fedora 9 later kernels). I had (mistakenly) assumed this would be fixed.


Versions of software:
---------------------

My current system is Fedora 10:

`uname -a`

Linux localhost 2.6.27.5-117.fc10.x86_64 #1 SMP Tue Nov 18 11:58:53 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

ALSA versions:

yum info alsa-lib.x86_64

Loaded plugins: refresh-packagekit
Installed Packages
Name       : alsa-lib
Arch       : x86_64
Version    : 1.0.18
Release    : 6.rc3.fc10
Size       : 1.1 M
Repo       : installed
Summary    : The Advanced Linux Sound Architecture (ALSA) library
URL        : http://www.alsa-project.org/
License    : LGPLv2+
Description: The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI functionality to the Linux operating system.  This package includes the ALSA runtime libraries to simplify application
           : programming and provide higher level functionality as well as support for the older OSS API, providing binary compatibility for most OSS programs.

yum info alsa-firmware

Loaded plugins: refresh-packagekit
Available Packages
Name       : alsa-firmware
Arch       : noarch
Version    : 1.0.17
Release    : 1.fc10
Size       : 3.1 M
Repo       : fedora
Summary    : Firmware for several ALSA-supported sound cards
URL        : http://www.alsa-project.org/
License    : GPL+ and BSD and GPLv2+ and GPLv2 and LGPLv2+
Description: This package contains the firmware binaries for a number of sound cards. Some (but not all of these) require firmware loaders which are included in the alsa-tools-firmware package.

Information from alsa-info.sh script:

upload=true&script=true&cardinfo=
!!################################
!!ALSA Information Script v 0.4.52
!!################################

!!Script ran on: Mon Dec  8 12:07:47 EST 2008


!!Linux Distribution
!!------------------

Fedora release 10 (Cambridge) Fedora release 10 (Cambridge) Fedora release 10 (Cambridge) Fedora release 10 (Cambridge)


!!Kernel Information
!!------------------

Kernel release:    2.6.27.5-117.fc10.x86_64
Operating System:  GNU/Linux
Architecture:      x86_64
Processor:         x86_64
SMP Enabled:       Yes


!!ALSA Version
!!------------

Driver version:     1.0.17
Library version:    
Utilities version:  1.0.18


!!Loaded ALSA modules
!!-------------------

snd_hda_intel


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

 0 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xfe020000 irq 16


!!PCI Soundcards installed in the system
!!--------------------------------------

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia


!!Advanced information - PCI Vendor/Device/Susbsystem ID's
!!--------------------------------------------------------

00:14.2 0403: 1002:4383
	Subsystem: 1043:8249


!!Modprobe options (Sound related)
!!--------------------------------

snd_hda_intel: index=0 model=3stack-dig
snd_hda_intel: single_cmd=1
snd_hda_intel: probe_mask=1


!!Loaded sound module options
!!--------------------------

!!Module: snd_hda_intel
bdl_pos_adj : 32,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
enable : Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y
enable_msi : 0
id : <NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
index : 0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
model : 3stack-dig,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
position_fix : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
power_save : 0
power_save_controller : Y
probe_mask : 1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
single_cmd : Y


!!HDA-Intel Codec information
!!---------------------------
--startcollapse--

Codec: Realtek ALC883
Address: 0
Vendor Id: 0x10ec0883
Subsystem Id: 0x10438232
Revision Id: 0x100002
No Modem Function Group found
Default PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=2, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0
Node 0x02 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x03 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x04 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x05 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x06 [Audio Output] wcaps 0x211: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0x1e]: 16 20 24 32
    formats [0x1]: PCM
Node 0x07 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x08 [Audio Input] wcaps 0x10011b: Stereo Amp-In
  Amp-In caps: ofs=0x08, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x15 0x15]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x160]: 44100 48000 96000
    bits [0x6]: 16 20
    formats [0x1]: PCM
  Connection: 1
     0x23
Node 0x09 [Audio Input] wcaps 0x10011b: Stereo Amp-In
  Amp-In caps: ofs=0x08, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x80 0x80]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x160]: 44100 48000 96000
    bits [0x6]: 16 20
    formats [0x1]: PCM
  Connection: 1
     0x22
Node 0x0a [Audio Input] wcaps 0x100391: Stereo Digital
  Converter: stream=0, channel=0
  SDI-Select: 0
  Digital:
  Digital category: 0x0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0x1e]: 16 20 24 32
    formats [0x1]: PCM
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x1f
Node 0x0b [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x80 0x80] [0x00 0x80] [0x00 0x00] [0x80 0x80] [0x09 0x09] [0x09 0x09] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Connection: 10
     0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17
Node 0x0c [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x80 0x00]
  Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0
  Amp-Out vals:  [0x04 0x04]
  Connection: 2
     0x02 0x0b
Node 0x0d [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80]
  Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0
  Amp-Out vals:  [0x00 0x00]
  Connection: 2
     0x03 0x0b
Node 0x0e [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80]
  Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0
  Amp-Out vals:  [0x00 0x00]
  Connection: 2
     0x04 0x0b
Node 0x0f [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80]
  Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0
  Amp-Out vals:  [0x00 0x00]
  Connection: 2
     0x05 0x0b
Node 0x10 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x11 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x12 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x13 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x14 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x083e: IN OUT HP Detect Trigger
  Pin Default 0x01014410: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Green
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x15 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x083e: IN OUT HP Detect Trigger
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c 0x0d* 0x0e 0x0f 0x26
Node 0x16 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x083e: IN OUT HP Detect Trigger
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c 0x0d 0x0e* 0x0f 0x26
Node 0x17 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x083e: IN OUT HP Detect Trigger
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c 0x0d 0x0e 0x0f* 0x26
Node 0x18 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x08173e: IN OUT HP Detect Trigger
    Vref caps: HIZ 50 GRD 80
  Pin Default 0x01a19c40: [Jack] Mic at Ext Rear
    Conn = 1/8, Color = Pink
    DefAssociation = 0x4, Sequence = 0x0
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x19 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x08173e: IN OUT HP Detect Trigger
    Vref caps: HIZ 50 GRD 80
  Pin Default 0x02a19c50: [Jack] Mic at Ext Front
    Conn = 1/8, Color = Pink
    DefAssociation = 0x5, Sequence = 0x0
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1a [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x08173e: IN OUT HP Detect Trigger
    Vref caps: HIZ 50 GRD 80
  Pin Default 0x0181344f: [Jack] Line In at Ext Rear
    Conn = 1/8, Color = Blue
    DefAssociation = 0x4, Sequence = 0xf
  Pin-ctls: 0x20: IN VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1b [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x08173e: IN OUT HP Detect Trigger
    Vref caps: HIZ 50 GRD 80
  Pin Default 0x02214c20: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Green
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1c [Pin Complex] wcaps 0x400001: Stereo
  Pincap 0x0820: IN
  Pin Default 0x593301f0: [N/A] CD at Int ATAPI
    Conn = ATAPI, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
Node 0x1d [Pin Complex] wcaps 0x400000: Mono
  Pincap 0x0820: IN
  Pin Default 0x4005c603: [N/A] Line Out at Ext N/A
    Conn = Optical, Color = UNKNOWN
    DefAssociation = 0x0, Sequence = 0x3
  Pin-ctls: 0x00:
Node 0x1e [Pin Complex] wcaps 0x400300: Mono Digital
  Pincap 0x0810: OUT
  Pin Default 0x014b1130: [Jack] SPDIF Out at Ext Rear
    Conn = Comb, Color = Black
    DefAssociation = 0x3, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
  Connection: 1
     0x06
Node 0x1f [Pin Complex] wcaps 0x400200: Mono Digital
  Pincap 0x0820: IN
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
  Processing caps: benign=0, ncoeff=17
Node 0x21 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x22 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Amp-Out caps: N/A
  Amp-Out vals:  [0x00 0x00]
  Connection: 11
     0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b
Node 0x23 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Amp-Out caps: N/A
  Amp-Out vals:  [0x00 0x00]
  Connection: 11
     0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b
Node 0x24 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x25 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x26 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x00 0x00] [0x80 0x80]
  Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0
  Amp-Out vals:  [0x00 0x00]
  Connection: 2
     0x25 0x0b
--endcollapse--



How reproducible:

Fedora 10 wouldn't even detect the sound cards on my system. I had to add these lines to /etc/modprobe.conf

options snd_hda_intel single_cmd=1
options snd_hda_intel probe_mask=1

The sound card was detected then.


Steps to Reproduce:
1. Start any multimedia program. I used RhythmBox.


2. Play any track

3. You will see these lines from dmesg:

ALSA sound/core/pcm_native.c:1940: BUG? (err >= 0)
Pid: 2817, comm: rhythmbox Not tainted 2.6.27.5-117.fc10.x86_64 #1

Call Trace:
 [<ffffffffa013351f>] snd_pcm_hw_constraints_complete+0xc2/0x2bc [snd_pcm]
 [<ffffffffa013378b>] snd_pcm_open_substream+0x72/0xb3 [snd_pcm]
 [<ffffffffa0133890>] snd_pcm_open+0xc4/0x1cb [snd_pcm]
 [<ffffffff8103a5b8>] ? default_wake_function+0x0/0xf
 [<ffffffffa01339f7>] snd_pcm_playback_open+0x2c/0x31 [snd_pcm]
 [<ffffffffa00af5f5>] snd_open+0xe7/0x156 [snd]
 [<ffffffff810c27f5>] chrdev_open+0x14a/0x169
 [<ffffffff810c26ab>] ? chrdev_open+0x0/0x169
 [<ffffffff810be626>] __dentry_open+0x13a/0x249
 [<ffffffff810be7eb>] nameidata_to_filp+0x2e/0x40
 [<ffffffff810c9b1f>] do_filp_open+0x3e4/0x7db
 [<ffffffff81031023>] ? need_resched+0x1e/0x28
 [<ffffffff81330632>] ? _cond_resched+0x9/0x38
 [<ffffffff8116d894>] ? __strncpy_from_user+0x2c/0x53
 [<ffffffff810d470d>] ? alloc_fd+0x110/0x123
 [<ffffffff810be42f>] do_sys_open+0x53/0xd3
 [<ffffffff810be4d8>] sys_open+0x1b/0x1d
 [<ffffffff8101024a>] system_call_fastpath+0x16/0x1b

ALSA sound/core/pcm_native.c:2046: snd_pcm_hw_constraints_complete failed
ALSA sound/core/pcm_native.c:1940: BUG? (err >= 0)
Pid: 2817, comm: rhythmbox Not tainted 2.6.27.5-117.fc10.x86_64 #1

Call Trace:
 [<ffffffffa013351f>] snd_pcm_hw_constraints_complete+0xc2/0x2bc [snd_pcm]
 [<ffffffffa013378b>] snd_pcm_open_substream+0x72/0xb3 [snd_pcm]
 [<ffffffffa0133890>] snd_pcm_open+0xc4/0x1cb [snd_pcm]
 [<ffffffff8103a5b8>] ? default_wake_function+0x0/0xf
 [<ffffffffa01339f7>] snd_pcm_playback_open+0x2c/0x31 [snd_pcm]
 [<ffffffffa00af5f5>] snd_open+0xe7/0x156 [snd]
 [<ffffffff810c27f5>] chrdev_open+0x14a/0x169
 [<ffffffff810c26ab>] ? chrdev_open+0x0/0x169
 [<ffffffff810be626>] __dentry_open+0x13a/0x249
 [<ffffffff810be7eb>] nameidata_to_filp+0x2e/0x40
 [<ffffffff810c9b1f>] do_filp_open+0x3e4/0x7db
 [<ffffffff81031023>] ? need_resched+0x1e/0x28
 [<ffffffff81330632>] ? _cond_resched+0x9/0x38
 [<ffffffff8116d894>] ? __strncpy_from_user+0x2c/0x53
 [<ffffffff810d470d>] ? alloc_fd+0x110/0x123
 [<ffffffff810be42f>] do_sys_open+0x53/0xd3
 [<ffffffff810be4d8>] sys_open+0x1b/0x1d
 [<ffffffff8101024a>] system_call_fastpath+0x16/0x1b

ALSA sound/core/pcm_native.c:2046: snd_pcm_hw_constraints_complete failed
ALSA sound/core/pcm_native.c:1940: BUG? (err >= 0)
Pid: 2817, comm: rhythmbox Not tainted 2.6.27.5-117.fc10.x86_64 #1

Call Trace:
 [<ffffffffa013351f>] snd_pcm_hw_constraints_complete+0xc2/0x2bc [snd_pcm]
 [<ffffffffa013378b>] snd_pcm_open_substream+0x72/0xb3 [snd_pcm]
 [<ffffffffa0133890>] snd_pcm_open+0xc4/0x1cb [snd_pcm]
 [<ffffffff8103a5b8>] ? default_wake_function+0x0/0xf
 [<ffffffffa01339f7>] snd_pcm_playback_open+0x2c/0x31 [snd_pcm]
 [<ffffffffa00af5f5>] snd_open+0xe7/0x156 [snd]
 [<ffffffff810c27f5>] chrdev_open+0x14a/0x169
 [<ffffffff810c26ab>] ? chrdev_open+0x0/0x169
 [<ffffffff810be626>] __dentry_open+0x13a/0x249
 [<ffffffff810be7eb>] nameidata_to_filp+0x2e/0x40
 [<ffffffff810c9b1f>] do_filp_open+0x3e4/0x7db
 [<ffffffff81031023>] ? need_resched+0x1e/0x28
 [<ffffffff81330632>] ? _cond_resched+0x9/0x38
 [<ffffffff8116d894>] ? __strncpy_from_user+0x2c/0x53
 [<ffffffff810d470d>] ? alloc_fd+0x110/0x123
 [<ffffffff810be42f>] do_sys_open+0x53/0xd3
 [<ffffffff810be4d8>] sys_open+0x1b/0x1d
 [<ffffffff8101024a>] system_call_fastpath+0x16/0x1b

ALSA sound/core/pcm_native.c:2046: snd_pcm_hw_constraints_complete failed
Comment 1 Aditya Kadambi 2008-12-08 18:05:33 EST
Latest fedora kernel:

Linux localhost 2.6.27.7-134.fc10.x86_64 #1 SMP Mon Dec 1 22:21:35 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

Same results. No sound. As bad as ever.
Comment 2 Aditya Kadambi 2008-12-09 09:59:42 EST
Kernel version on which sound worked:

2.6.25-14.fc9.x86_64

I think sound stopped working after 2.6.26 series hit Fedora 9.
Comment 3 devangdevang 2008-12-09 21:38:33 EST
I added one thread at FedoraForum.org linked below, just read the responses.

http://forums.fedoraforum.org/showthread.php?t=205685&goto=newpost
Comment 4 Aditya Kadambi 2008-12-15 09:54:22 EST
Will this get any attention? It clearly looks like a regression.
Comment 5 Aditya Kadambi 2008-12-22 11:58:24 EST
Can this get some attention, please?
Comment 6 Aditya Kadambi 2008-12-25 06:49:15 EST
With the latest kernel update: 2.6.27.9-159.fc10.x86_64, no sound. 

dmesg doesn't give any stacktrace. Only this:

ALSA sound/core/pcm_native.c:2041: snd_pcm_hw_constraints_complete failed
Comment 7 Aditya Kadambi 2009-01-02 08:59:55 EST
This bug report says it should be fixed. But it doesn't seem to be:

http://bugzilla.kernel.org/show_bug.cgi?id=11643
Comment 8 Aditya Kadambi 2009-01-05 17:20:30 EST
Will the high priests take a look at this?
Comment 9 Aditya Kadambi 2009-01-06 10:19:19 EST
I created a bug report at ALSA project since nobody here gives a damm.

https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4321
Comment 10 Aditya Kadambi 2009-01-23 09:24:53 EST
1.0.19. No Sound still. Amazing incompetence.
Comment 11 Aditya Kadambi 2009-01-27 14:55:05 EST
Wow! new kernel and repeat of same dmesg

ALSA sound/core/pcm_native.c:2046: snd_pcm_hw_constraints_complete failed
ALSA sound/core/pcm_native.c:1940: BUG? (err >= 0)
Pid: 2678, comm: pulseaudio Not tainted 2.6.27.12-170.2.5.fc10.x86_64 #1

Call Trace:
 [<ffffffffa015751f>] snd_pcm_hw_constraints_complete+0xc2/0x2bc [snd_pcm]
 [<ffffffffa015778b>] snd_pcm_open_substream+0x72/0xb3 [snd_pcm]
 [<ffffffffa0157890>] snd_pcm_open+0xc4/0x1cb [snd_pcm]
 [<ffffffff8103a651>] ? default_wake_function+0x0/0xf
 [<ffffffffa01579c6>] snd_pcm_capture_open+0x2f/0x34 [snd_pcm]
 [<ffffffffa01145f5>] snd_open+0xe7/0x156 [snd]
 [<ffffffff810c2d6d>] chrdev_open+0x14a/0x169
 [<ffffffff810c2c23>] ? chrdev_open+0x0/0x169
 [<ffffffff810beb9a>] __dentry_open+0x13a/0x249
 [<ffffffff810bed5f>] nameidata_to_filp+0x2e/0x40
 [<ffffffff810ca0c3>] do_filp_open+0x3e4/0x7db
 [<ffffffff81031083>] ? need_resched+0x1e/0x28
 [<ffffffff8133196a>] ? _cond_resched+0x9/0x38
 [<ffffffff8116e314>] ? __strncpy_from_user+0x2c/0x53
 [<ffffffff810d4c79>] ? alloc_fd+0x110/0x123
 [<ffffffff810be9a3>] do_sys_open+0x53/0xd3
 [<ffffffff810bea4c>] sys_open+0x1b/0x1d
 [<ffffffff8101024a>] system_call_fastpath+0x16/0x1b

ALSA sound/core/pcm_native.c:2046: snd_pcm_hw_constraints_complete failed


Assholes don't even care. I don't want to be nice to these "developers"
Comment 12 Richard Hughes 2009-01-28 11:21:51 EST
Aditya, You have to bear in mind that Fedora (the distro) is made up of lots of different teams working on upstream software. We only have a few people (1?) working on "alsa" for Fedora whilst there are many hundreds on the upstream mailing list.

The way I would have tried to fix this would be to open a bug upstream with ALSA, and then work with upstream. Once upstream is fixed, open a bug here asking somebody to patch the kernel with the hot-fix until we get the fixed kernel in a few weeks time.

As maintainers, we get hundreds of bug reports every day, some valid, some invalid. Ranting about us being Assholes certainly won't speed things along.
Comment 13 Aditya Kadambi 2009-01-28 11:41:35 EST
I'm sorry. I offer unqualified apologies.
Comment 14 Aditya Kadambi 2009-02-09 13:51:36 EST
Months and months and months. No sound. I have forgotten the time when "standard" things like sound worked on Fedora.

Just plugged in another box (i686) running Fedora 9 and it took 2.6.27.xx and sound failed on that too.

Ah well...
Comment 15 Aditya Kadambi 2009-02-09 14:08:51 EST
OK, he last kernel that worked was: 2.6.25.11-97.
Comment 16 Aditya Kadambi 2009-02-16 16:33:38 EST
OK. I got alsa-driver-20090213.tar.bz2 from kernel.org, compiled it with --with-debug=verbose. When I loaded the module, these are the messages, I got:

ALSA /home/rak/Download/alsa-driver/pci/hda/hda_intel.c:2218: chipset global capabilities = 0x4401
ALSA /home/rak/Download/alsa-driver/pci/hda/hda_intel.c:786: codec_mask = 0x1
ALSA /home/rak/Download/alsa-driver/pci/hda/hda_intel.c:1214: hda_intel: codec #0 probed OK
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:2725: hda_codec: model '3stack-6ch-dig' is selected
input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:14.2/input/input6
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:1371: Cannot find slave Side Playback Volume, skipped
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:1371: Cannot find slave Headphone Playback Volume, skipped
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:1371: Cannot find slave Speaker Playback Volume, skipped
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:1371: Cannot find slave Mono Playback Volume, skipped
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:1371: Cannot find slave Line-Out Playback Volume, skipped
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:1371: Cannot find slave PCM Playback Volume, skipped
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:1371: Cannot find slave Side Playback Switch, skipped
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:1371: Cannot find slave Speaker Playback Switch, skipped
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:1371: Cannot find slave Mono Playback Switch, skipped
ALSA /home/rak/Download/alsa-driver/acore/pcm_native.c:2050: snd_pcm_hw_constraints_complete failed
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:895: hda_codec_cleanup_stream: NID=0x8
ALSA /home/rak/Download/alsa-driver/acore/pcm_native.c:2050: snd_pcm_hw_constraints_complete failed
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:895: hda_codec_cleanup_stream: NID=0x8
ALSA /home/rak/Download/alsa-driver/acore/pcm_native.c:2050: snd_pcm_hw_constraints_complete failed
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:895: hda_codec_cleanup_stream: NID=0x8
ALSA /home/rak/Download/alsa-driver/acore/pcm_native.c:2050: snd_pcm_hw_constraints_complete failed
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:895: hda_codec_cleanup_stream: NID=0x8
ALSA /home/rak/Download/alsa-driver/acore/pcm_native.c:2050: snd_pcm_hw_constraints_complete failed
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:895: hda_codec_cleanup_stream: NID=0x8
ALSA /home/rak/Download/alsa-driver/acore/pcm_native.c:2050: snd_pcm_hw_constraints_complete failed
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:895: hda_codec_cleanup_stream: NID=0x8
ALSA /home/rak/Download/alsa-driver/acore/pcm_native.c:2050: snd_pcm_hw_constraints_complete failed
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:895: hda_codec_cleanup_stream: NID=0x8
ALSA /home/rak/Download/alsa-driver/acore/pcm_native.c:2050: snd_pcm_hw_constraints_complete failed
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:895: hda_codec_cleanup_stream: NID=0x2
ALSA /home/rak/Download/alsa-driver/acore/pcm_native.c:2050: snd_pcm_hw_constraints_complete failed
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:895: hda_codec_cleanup_stream: NID=0x2
ALSA /home/rak/Download/alsa-driver/acore/pcm_native.c:2050: snd_pcm_hw_constraints_complete failed
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:895: hda_codec_cleanup_stream: NID=0x2
ALSA /home/rak/Download/alsa-driver/acore/pcm_native.c:2050: snd_pcm_hw_constraints_complete failed
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:895: hda_codec_cleanup_stream: NID=0x2
ALSA /home/rak/Download/alsa-driver/acore/pcm_native.c:2050: snd_pcm_hw_constraints_complete failed
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:895: hda_codec_cleanup_stream: NID=0x2
ALSA /home/rak/Download/alsa-driver/acore/pcm_native.c:2050: snd_pcm_hw_constraints_complete failed
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:895: hda_codec_cleanup_stream: NID=0x2
Comment 17 Chuck Ebbert 2009-02-16 17:10:19 EST
kernel maintainers automatically get copies of kernel-maint messages...
Comment 18 Aditya Kadambi 2009-02-21 10:26:24 EST
On Alsa bug tracker, "Raymond" mentioned these two patches:

http://git.alsa-project.org/?p=alsa-kernel.git;a=commit;h=11370ee2c1c578a704f47d5513d57274c335db43

Could this patch be causing it? 

http://git.alsa-project.org/?p=alsa-kernel.git;a=commit;h=f32a19e3e7e72cc896d02c3d104f58dc972d43ea

I have posted other info over there too.
Comment 19 Aditya Kadambi 2009-03-03 08:04:00 EST
Will the developers please please please please look into this. It has been very long since I have had sound. Please!
Comment 20 Aditya Kadambi 2009-03-12 19:14:40 EDT
OK, I have determined the failure is in the 64 bit systems in this function in

alsa-kernel/core/pcm_lib.c: function snd_pcm_hw_constraint_mask64:

In snd_pcm_hw_constraint_mask64: Before memset: maskp->bits[0] = 0, maskp->bits[1] = 0
In snd_pcm_hw_constraint_mask64: After memset: maskp->bits[0] = 0, maskp->bits[1] = 0

Hence it returns -EINVAL.

Will Jaroslav Kysela please take a look at this. I can do some more debugging if you tell me where to look for. PLEASE!
Comment 21 Wolfgang Rupprecht 2009-03-13 19:38:50 EDT
Created attachment 335179 [details]
alsa-info for failing sound on Asus M3A78-T

Another 64-bit system with an intel azalia subsystem that fails to play sound due to severely low volume.  With external speakers one can turn the volume all the way up on the board and on the speakers and hear *some* sound.
Comment 22 Jaroslav Kysela 2009-03-16 09:42:02 EDT
mask64 is used to set value from runtime->hw.formats . Could you check this value in azx_pcm_open() function? File pci/hda/hda_intel.c .

Also, if it's zero, then look to snd_hda_query_supported_pcm() function in hda_codec.c - print rates value at the end of "if (ratep)" block.
Comment 23 Jaroslav Kysela 2009-03-16 10:34:47 EDT
wolfgang: no idea, try hda-analyzer (see www.alsa-project.org for more details) to  play with codec registers directly
Comment 24 Aditya Kadambi 2009-03-16 10:40:02 EDT
Thanks! thanks! for the response.

(In reply to comment #22)
> mask64 is used to set value from runtime->hw.formats . Could you check this
> value in azx_pcm_open() function? File pci/hda/hda_intel.c .

It is set to 0.

> Also, if it's zero, then look to snd_hda_query_supported_pcm() function in
> hda_codec.c - print rates value at the end of "if (ratep)" block.  

Did you mean ratesp? There isn't a ratep variable in that function. If it is ratesp, this is the result of my printk in this block:
--------------------------------------------------------------------------
	if (ratesp) {
		u32 rates = 0;
		for (i = 0; i < AC_PAR_PCM_RATE_BITS; i++) {
			if (val & (1 << i))
				rates |= rate_bits[i].alsa_bits;
		}
		*ratesp = rates;
		printk(KERN_INFO "Value of ratesp in function %s is %#x\n", __FUNCTION__, *ratesp);
	}
----------------------------------------------------------------------------


Value of ratesp in function snd_hda_query_supported_pcm is 0x14c0
Value of ratesp in function snd_hda_query_supported_pcm is 0x2
Value of ratesp in function snd_hda_query_supported_pcm is 0x14c0
Value of ratesp in function snd_hda_query_supported_pcm is 0x14c0
Value of ratesp in function snd_hda_query_supported_pcm is 0x4c0
Value of ratesp in function snd_hda_query_supported_pcm is 0x14c0
Comment 25 Jaroslav Kysela 2009-03-16 11:43:24 EDT
OK, yes ratesp is correct name. No zero there, so I wonder who zeroed this value.

Please, add printk for nid to ratesp in snd_hda_query_supported_pcm and azx_pcm_open (hinfo->nid value).

Also, change snd_pcm_set_ops block to something like this in azx_attach_pcm_stream (hda_intel.c):

if (cpcm->stream[s].substream) {
  printk(KERN_INFO "attach_pcm: nid=0x%x, formats=0x%x\n", apcm->hinfo[s].nid, apcm->hinfo[s].formats);
  snd_pcm_set_ops(pcm, s, &azx_pcm_ops);
}
Comment 26 Aditya Kadambi 2009-03-16 12:40:12 EDT
(In reply to comment #25)
> OK, yes ratesp is correct name. No zero there, so I wonder who zeroed this
> value.
> 
> Please, add printk for nid to ratesp in snd_hda_query_supported_pcm and
> azx_pcm_open (hinfo->nid value).

Added this printk:

printk(KERN_INFO "Value of ratesp and nid in function %s: ratesp = %#x, nid = %#x\n", __FUNCTION__, *ratesp, nid);

Output is:

Value of ratesp and nid in function snd_hda_query_supported_pcm: ratesp = 0x14c0, nid = 0x2
Value of ratesp and nid in function snd_hda_query_supported_pcm: ratesp = 0x2, nid = 0x8
Value of ratesp and nid in function snd_hda_query_supported_pcm: ratesp = 0x14c0, nid = 0x6
Value of ratesp and nid in function snd_hda_query_supported_pcm: ratesp = 0x14c0, nid = 0xa
Value of ratesp and nid in function snd_hda_query_supported_pcm: ratesp = 0x4c0, nid = 0x9
Value of ratesp and nid in function snd_hda_query_supported_pcm: ratesp = 0x14c0, nid = 0x6

Added this printk in azx_pcm_open

printk(KERN_INFO "Value of runtime->hw.formats and hinti->nid in function %s: runtime->hw.formats = %llu, hinfo->nid = %#x\n", __FUNCTION__, runtime->hw.formats, hinfo->nid);

Output is:

Value of runtime->hw.formats and hinti->nid in function azx_pcm_open: runtime->hw.formats = 0, hinfo->nid = 0x2
Value of runtime->hw.formats and hinti->nid in function azx_pcm_open: runtime->hw.formats = 0, hinfo->nid = 0x2
Value of runtime->hw.formats and hinti->nid in function azx_pcm_open: runtime->hw.formats = 0, hinfo->nid = 0x2
Value of runtime->hw.formats and hinti->nid in function azx_pcm_open: runtime->hw.formats = 0, hinfo->nid = 0x2
Value of runtime->hw.formats and hinti->nid in function azx_pcm_open: runtime->hw.formats = 0, hinfo->nid = 0x2
Value of runtime->hw.formats and hinti->nid in function azx_pcm_open: runtime->hw.formats = 0, hinfo->nid = 0x2
Value of runtime->hw.formats and hinti->nid in function azx_pcm_open: runtime->hw.formats = 0, hinfo->nid = 0x2
Value of runtime->hw.formats and hinti->nid in function azx_pcm_open: runtime->hw.formats = 0, hinfo->nid = 0x8
Value of runtime->hw.formats and hinti->nid in function azx_pcm_open: runtime->hw.formats = 0, hinfo->nid = 0x8
Value of runtime->hw.formats and hinti->nid in function azx_pcm_open: runtime->hw.formats = 0, hinfo->nid = 0x8
Value of runtime->hw.formats and hinti->nid in function azx_pcm_open: runtime->hw.formats = 0, hinfo->nid = 0x8
Value of runtime->hw.formats and hinti->nid in function azx_pcm_open: runtime->hw.formats = 0, hinfo->nid = 0x8
Value of runtime->hw.formats and hinti->nid in function azx_pcm_open: runtime->hw.formats = 0, hinfo->nid = 0x8
Value of runtime->hw.formats and hinti->nid in function azx_pcm_open: runtime->hw.formats = 0, hinfo->nid = 0x8


> 
> Also, change snd_pcm_set_ops block to something like this in
> azx_attach_pcm_stream (hda_intel.c):
> 
> if (cpcm->stream[s].substream) {
>   printk(KERN_INFO "attach_pcm: nid=0x%x, formats=0x%x\n", apcm->hinfo[s].nid,
> apcm->hinfo[s].formats);
>   snd_pcm_set_ops(pcm, s, &azx_pcm_ops);
> }  

The output for this is:

attach_pcm: nid=0x2, formats=0x0
attach_pcm: nid=0x8, formats=0x0
attach_pcm: nid=0x6, formats=0x40404
attach_pcm: nid=0xa, formats=0x40404
attach_pcm: nid=0x9, formats=0x404
Comment 27 Jaroslav Kysela 2009-03-16 14:45:08 EDT
Created attachment 335389 [details]
Show proper error message for bad rates/formats in hda_codec
Comment 28 Jaroslav Kysela 2009-03-16 14:46:24 EDT
Please, try patch from comment#27 and attach error messages.
Comment 29 Aditya Kadambi 2009-03-16 16:21:03 EDT
It failed in the formats == 0 section. The rates == 0 section seem to have succeeded.

Output:

ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:2612: hda_codec: formats == 0 (nid=0x2, val=0xe0560, ovrd=1, streams=0xe0560)
Comment 30 Jaroslav Kysela 2009-03-16 16:56:53 EDT
Interesting, val should not be equal to streams... it looks like that streams value is broken..

Could you duplicate "streams = snd_hda_param_read(codec, nid, AC_PAR_STREAM);" in snd_hda_query_supported_pcm() function?
Comment 31 Aditya Kadambi 2009-03-16 17:11:53 EDT
I don't understand the question! How do you "duplicate" that function call? I see calls like this in the function snd_hda_query_supported_pcm()

streams = snd_hda_param_read(codec, nid, AC_PAR_STREAM);

Do you want me to print the values of "streams"?
Comment 32 Jaroslav Kysela 2009-03-16 17:55:53 EDT
Just write same line bellow in the source file to read value from hardware twice:

streams = snd_hda_param_read(codec, nid, AC_PAR_STREAM);
streams = snd_hda_param_read(codec, nid, AC_PAR_STREAM);
Comment 33 Aditya Kadambi 2009-03-16 18:47:11 EDT
I duplicated the function call as per below:
	
if (formatsp || bpsp) {
		u64 formats = 0;
		unsigned int bps;
		unsigned int wcaps;

		wcaps = get_wcaps(codec, nid);
		streams = snd_hda_param_read(codec, nid, AC_PAR_STREAM);
		streams = snd_hda_param_read(codec, nid, AC_PAR_STREAM);
		if (streams == -1)
			return -EIO;
		if (!streams) {
			streams = snd_hda_param_read(codec, codec->afg, AC_PAR_STREAM);
			streams = snd_hda_param_read(codec, codec->afg, AC_PAR_STREAM);
			if (streams == -1)
				return -EIO;
		}

These are the results:

ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:2616: hda_codec: formats == 0 (nid=0x8, val=0x1, ovrd=1, streams=0x1)
Comment 34 Jaroslav Kysela 2009-03-17 06:17:37 EDT
Created attachment 335497 [details]
Show error messages in snd_hda_query_supported_pcm() and reorder local variables declaration
Comment 35 Jaroslav Kysela 2009-03-17 06:18:18 EDT
Please, test patch from comment#34 .
Comment 36 Aditya Kadambi 2009-03-17 07:31:18 EDT
I applied the patch. The results seem to look like before:

Output:

ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:2617: hda_codec: formats == 0 (nid=0x2, val=0xe0560, ovrd=1, streams=0xe0560)
Comment 37 Jaroslav Kysela 2009-03-17 07:41:17 EDT
Created attachment 335511 [details]
Test patch
Comment 38 Jaroslav Kysela 2009-03-17 07:44:18 EDT
Ok, added more printk-s to show timing. Please show output from patch from comment#37. But I'm getting out of ideas - how can be val == streams in your all test outputs? GCC bug?
Comment 39 Aditya Kadambi 2009-03-17 08:10:39 EDT
OK, it seems to "read" the same value for val and streams.

A1: val = 0x0, streams = 0x0
A2: val = 0x0, streams = 0x0
A3: val = 0xe0560, streams = 0x0
A4: val = 0xe0560, streams = 0x0
A5: val = 0xe0560, streams = 0xe0560
A6: val = 0xe0560, streams = 0xe0560
A7: val = 0xe0560, streams = 0xe0560

ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:2624: hda_codec: formats == 0 (nid=0x2, val=0xe0560, ovrd=1, streams=0xe0560)

My gcc is:


Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-cpu=generic --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
Comment 40 Jaroslav Kysela 2009-03-17 08:18:30 EDT
Created attachment 335514 [details]
Test patch #2
Comment 41 Jaroslav Kysela 2009-03-17 08:20:49 EDT
Yes, now try a little bit modified patch from comment#40. I don't understand why val == 0x01 in your comment#33 and not 0xe0560.
Comment 42 Aditya Kadambi 2009-03-17 08:36:09 EDT
This is the output: The values seem to be shifting:

A1: val = 0x0, streams = 0x0
A2: val = 0x0, streams = 0x0
A3: val = 0xe0560, streams = 0x0
A4: val = 0xe0560, streams = 0x0
A5: val = 0xe0560, streams = 0xe0560
A5-1: val = 0xe0560, streams = 0x1
A6: val = 0xe0560, streams = 0x1
A7: val = 0xe0560, streams = 0x1
A1: val = 0x0, streams = 0x0
A2: val = 0x1, streams = 0x0
A3: val = 0x1, streams = 0x0
A4: val = 0x1, streams = 0x0
A5: val = 0x1, streams = 0x60160
A5-1: val = 0x1, streams = 0x1
A6: val = 0x1, streams = 0x1
A7: val = 0x1, streams = 0x1
ALSA /home/rak/Download/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/hda_codec.c:2628: hda_codec: formats == 0 (nid=0x8, val=0x1, ovrd=1, streams=0x1)
Comment 43 Jaroslav Kysela 2009-03-17 08:54:43 EDT
Could you try pass 'single_cmd=1' module option to snd-hda-intel ?

modprobe snd-hda-intel single_cmd=1
Comment 44 Aditya Kadambi 2009-03-17 09:08:29 EDT
I actually have the option now. Without that option, the sound card is not recognized.
Comment 45 Jaroslav Kysela 2009-03-17 09:25:49 EDT
I'm sorry, I overlooked this in your report.

Do you have more than 4GB RAM, right?

In this case the bug seems duplicate to bug#489828 where a fix is also proposed. Actually we integrating this fix to the ALSA driver tree.

Also, do not use 'single_cmd' after applying the code from bug#489828 .

Please, report back your result.
Comment 46 Jaroslav Kysela 2009-03-17 09:43:41 EDT
BTW: New driver snapshot from http://www.alsa-project.org/snapshot/ should have this issue also fixed.
Comment 47 Aditya Kadambi 2009-03-17 09:58:58 EDT
Wow! I applied these lines and disabled single_cmd=1 in modprobe.conf and sound is back!

<       if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK))
<               pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK);
---
>       /*      if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK))
>               pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK); */
>       pci_set_dma_mask(pci, DMA_32BIT_MASK);
>       pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK);

Thank you! thank you! thank you! thanks a ton!! I really appreciate this!
Comment 48 Jaroslav Kysela 2009-03-17 10:03:46 EDT

*** This bug has been marked as a duplicate of bug 489828 ***

Note You need to log in before you can comment on or make changes to this bug.