All of lore.kernel.org
 help / color / mirror / Atom feed
* ALSA hang on 4.13.0-rc7
@ 2017-08-30 10:03 Markus Trippelsdorf
  2017-08-30 10:05 ` Markus Trippelsdorf
  2017-08-30 11:23 ` Takashi Iwai
  0 siblings, 2 replies; 13+ messages in thread
From: Markus Trippelsdorf @ 2017-08-30 10:03 UTC (permalink / raw)
  To: alsa-devel; +Cc: Takashi Iwai

On my system ALSA sometimes hangs:

 sysrq: SysRq : Show Blocked State                                         
   task                        PC stack   pid father                       
 output:ALSA def D    0   171      1 0x00000000                            
 Call Trace:                  
  ? __schedule+0x17c/0x720    
  ? schedule_preempt_disabled+0x2d/0x80                                    
  ? __mutex_lock_slowpath+0x141/0x420                                      
  ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
  ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
  ? snd_card_file_remove+0x76/0x120                                        
  ? snd_pcm_playback_ioctl+0x1c7/0x560                                     
  ? dput+0xb6/0x1e0           
  ? SyS_ioctl+0xa7/0x860      
  ? task_work_run+0x70/0xa0   
  ? entry_SYSCALL_64_fastpath+0x13/0x94  

Only a reboot will fix the issue.

-- 
Markus

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: ALSA hang on 4.13.0-rc7
  2017-08-30 10:03 ALSA hang on 4.13.0-rc7 Markus Trippelsdorf
@ 2017-08-30 10:05 ` Markus Trippelsdorf
  2017-08-30 10:15   ` Markus Trippelsdorf
  2017-08-30 11:23 ` Takashi Iwai
  1 sibling, 1 reply; 13+ messages in thread
From: Markus Trippelsdorf @ 2017-08-30 10:05 UTC (permalink / raw)
  To: alsa-devel; +Cc: Takashi Iwai

[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]

On 2017.08.30 at 12:03 +0200, Markus Trippelsdorf wrote:
> On my system ALSA sometimes hangs:
> 
>  sysrq: SysRq : Show Blocked State                                         
>    task                        PC stack   pid father                       
>  output:ALSA def D    0   171      1 0x00000000                            
>  Call Trace:                  
>   ? __schedule+0x17c/0x720    
>   ? schedule_preempt_disabled+0x2d/0x80                                    
>   ? __mutex_lock_slowpath+0x141/0x420                                      
>   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
>   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
>   ? snd_card_file_remove+0x76/0x120                                        
>   ? snd_pcm_playback_ioctl+0x1c7/0x560                                     
>   ? dput+0xb6/0x1e0           
>   ? SyS_ioctl+0xa7/0x860      
>   ? task_work_run+0x70/0xa0   
>   ? entry_SYSCALL_64_fastpath+0x13/0x94  
> 
> Only a reboot will fix the issue.

I've attached the output of "alsa-info.sh --no-upload".

-- 
Markus

[-- Attachment #2: alsa-info.txt.iY1PCMBntJ --]
[-- Type: text/plain, Size: 37511 bytes --]

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

!!Script ran on: Wed Aug 30 10:04:35 UTC 2017


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

Gentoo Base System release 2.0.3 NAME=Gentoo ID=gentoo PRETTY_NAME=Gentoo GNU/Linux


!!DMI Information
!!---------------

Manufacturer:      System manufacturer
Product Name:      System Product Name
Product Version:   System Version
Firmware Version:  3503   
Board Vendor:      ASUSTeK Computer INC.
Board Name:        M4A78T-E


!!ACPI Device Status Information
!!---------------

/sys/bus/acpi/devices/ATK0110:00/status 	 15
/sys/bus/acpi/devices/PNP0103:00/status 	 15
/sys/bus/acpi/devices/PNP0C0C:00/status 	 11
/sys/bus/acpi/devices/PNP0C0F:00/status 	 9
/sys/bus/acpi/devices/PNP0C0F:01/status 	 9
/sys/bus/acpi/devices/PNP0C0F:02/status 	 9
/sys/bus/acpi/devices/PNP0C0F:03/status 	 9
/sys/bus/acpi/devices/PNP0C0F:04/status 	 9
/sys/bus/acpi/devices/PNP0C0F:05/status 	 9
/sys/bus/acpi/devices/PNP0C0F:06/status 	 9
/sys/bus/acpi/devices/PNP0C0F:07/status 	 9
/sys/bus/acpi/devices/device:02/status 	 15


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

Kernel release:    4.13.0-rc7-00015-g36fde05f3fb5-dirty
Operating System:  GNU/Linux
Architecture:      x86_64
Processor:         AMD Phenom(tm) II X4 955 Processor
SMP Enabled:       Yes


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

Driver version:     k4.13.0-rc7-00015-g36fde05f3fb5-dirty
Library version:    1.1.4.1
Utilities version:  1.1.4


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



!!Sound Servers on this system
!!----------------------------

No sound servers found.


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

 0 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xfbcf4000 irq 16
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfbefc000 irq 19


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

00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA)
01:05.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] RS780 HDMI Audio [Radeon 3000/3100 / HD 3200/3300]


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

00:14.2 0403: 1002:4383
	Subsystem: 1043:8357
--
01:05.1 0403: 1002:960f
	Subsystem: 1002:960f


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


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

Codec: VIA VT1708S
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x11060397
Subsystem Id: 0x1043836c
Revision Id: 0x100000
No Modem Function Group found
Default PCM:
    rates [0x0]:
    bits [0x0]:
    formats [0x0]:
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
GPIO: io=1, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x10 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Front Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="VT1708S Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x2a, nsteps=0x2a, stepsize=0x05, mute=0
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
Node 0x11 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Surround Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x2a, nsteps=0x2a, stepsize=0x05, mute=0
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
Node 0x12 [Audio Output] wcaps 0x611: Stereo Digital
  Control: name="IEC958 Playback Con Mask", index=0, device=0
  Control: name="IEC958 Playback Pro Mask", index=0, device=0
  Control: name="IEC958 Playback Default", index=0, device=0
  Control: name="IEC958 Playback Switch", index=0, device=0
  Control: name="IEC958 Default PCM Playback Switch", index=0, device=0
  Device: name="VT1708S Digital", type="HDMI", device=3
  Converter: stream=0, channel=0
  Digital: Enabled
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
Node 0x13 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Control: name="Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Device: name="VT1708S Analog", type="Audio", device=0
  Amp-In caps: ofs=0x0b, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x17
Node 0x14 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Amp-In caps: ofs=0x0b, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x8b 0x8b]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x1e
Node 0x15 [Audio Output] wcaps 0x611: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
Node 0x16 [Audio Mixer] wcaps 0x20050b: Stereo Amp-In
  Control: name="Rear Mic Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=2, ofs=0
  Control: name="Rear Mic Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=2, ofs=0
  Control: name="Front Mic Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=4, ofs=0
  Control: name="Front Mic Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=4, ofs=0
  Control: name="Line Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=3, ofs=0
  Control: name="Line Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=3, ofs=0
  Control: name="CD Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=1, ofs=0
  Control: name="CD Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=1, ofs=0
  Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x17 0x17] [0x9f 0x9f] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 7
     0x10 0x1f 0x1a 0x1b 0x1e 0x1d 0x25
Node 0x17 [Audio Selector] wcaps 0x300501: Stereo
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 6
     0x1f 0x1a* 0x1b 0x1e 0x1d 0x16
Node 0x18 [Audio Selector] wcaps 0x30050d: Stereo Amp-Out
  Control: name="Surround Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x11
Node 0x19 [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x00000014: OUT Detect
  Pin Default 0x01011012: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0x2
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=02, enabled=1
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x18
Node 0x1a [Pin Complex] wcaps 0x400581: Stereo
  Control: name="Rear Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Pincap 0x00002334: IN OUT Detect
    Vref caps: HIZ 50 100
  Pin Default 0x01a19036: [Jack] Mic at Ext Rear
    Conn = 1/8, Color = Pink
    DefAssociation = 0x3, Sequence = 0x6
  Pin-ctls: 0x21: IN VREF_50
  Unsolicited: tag=06, enabled=1
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x26
Node 0x1b [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x00002334: IN OUT Detect
    Vref caps: HIZ 50 100
  Pin Default 0x0181303e: [Jack] Line In at Ext Rear
    Conn = 1/8, Color = Blue
    DefAssociation = 0x3, Sequence = 0xe
  Pin-ctls: 0x20: IN VREF_HIZ
  Unsolicited: tag=08, enabled=1
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x18
Node 0x1c [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Front Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x01014010: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Green
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=01, enabled=1
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x16
Node 0x1d [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0000233c: IN OUT HP Detect
    Vref caps: HIZ 50 100
  Pin Default 0x0221401f: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Green
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP VREF_HIZ
  Unsolicited: tag=05, enabled=1
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 2
     0x16* 0x25
Node 0x1e [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Front Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0000233c: IN OUT HP Detect
    Vref caps: HIZ 50 100
  Pin Default 0x02a19038: [Jack] Mic at Ext Front
    Conn = 1/8, Color = Pink
    DefAssociation = 0x3, Sequence = 0x8
  Pin-ctls: 0x21: IN VREF_50
  Unsolicited: tag=07, enabled=1
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 2
     0x16* 0x25
Node 0x1f [Pin Complex] wcaps 0x400401: Stereo
  Pincap 0x00000020: IN
  Pin Default 0x90370137: [Fixed] CD at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x3, Sequence = 0x7
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
Node 0x20 [Pin Complex] wcaps 0x400701: Stereo Digital
  Pincap 0x00000010: OUT
  Pin Default 0x185600f0: [Jack] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x12
Node 0x21 [Pin Complex] wcaps 0x400701: Stereo Digital
  Pincap 0x00000010: OUT
  Pin Default 0x074511f0: [Jack] SPDIF Out at Ext Rear Panel
    Conn = Optical, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x15
Node 0x22 [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x00000014: OUT Detect
  Pin Default 0x01016011: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Orange
    DefAssociation = 0x1, Sequence = 0x1
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=03, enabled=1
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x26
Node 0x23 [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x00000014: OUT Detect
  Pin Default 0x01012014: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Grey
    DefAssociation = 0x1, Sequence = 0x4
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=04, enabled=1
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x27
Node 0x24 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Center Playback Volume", index=0, device=0
    ControlAmp: chs=1, dir=Out, idx=0, ofs=0
  Control: name="LFE Playback Volume", index=0, device=0
    ControlAmp: chs=2, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x2a, nsteps=0x2a, stepsize=0x05, mute=0
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
Node 0x25 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Side Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x2a, nsteps=0x2a, stepsize=0x05, mute=0
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
Node 0x26 [Audio Selector] wcaps 0x30050d: Stereo Amp-Out
  Control: name="Center Playback Switch", index=0, device=0
    ControlAmp: chs=1, dir=Out, idx=0, ofs=0
  Control: name="LFE Playback Switch", index=0, device=0
    ControlAmp: chs=2, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x24
Node 0x27 [Audio Selector] wcaps 0x30050d: Stereo Amp-Out
  Control: name="Side Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x25
Codec: ATI Generic
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x1002791a
Subsystem Id: 0x00791a00
Revision Id: 0x100000
No Modem Function Group found
Default PCM:
    rates [0x40]: 48000
    bits [0x2]: 16
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D3
  Power: setting=D0, actual=D0
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x02 [Audio Output] wcaps 0x201: Stereo Digital
  Control: name="IEC958 Playback Con Mask", index=0, device=0
  Control: name="IEC958 Playback Pro Mask", index=0, device=0
  Control: name="IEC958 Playback Default", index=0, device=0
  Control: name="IEC958 Playback Switch", index=0, device=0
  Device: name="Generic Digital", type="HDMI", device=3
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
Node 0x03 [Pin Complex] wcaps 0x400381: Stereo Digital
  Pincap 0x00000094: OUT Detect HDMI
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=01, enabled=1
  Connection: 1
     0x02
--endcollapse--


!!ALSA Device nodes
!!-----------------

crw-rw---- 1 root audio 116,  5 Aug 30 12:04 /dev/snd/controlC0
crw-rw---- 1 root audio 116,  2 Aug 30 12:04 /dev/snd/controlC1
crw-rw---- 1 root audio 116,  9 Aug 30 12:04 /dev/snd/hwC0D0
crw-rw---- 1 root audio 116,  4 Aug 30 12:04 /dev/snd/hwC1D0
crw-rw---- 1 root audio 116,  7 Aug 30 12:04 /dev/snd/pcmC0D0c
crw-rw---- 1 root audio 116,  6 Aug 30 12:04 /dev/snd/pcmC0D0p
crw-rw---- 1 root audio 116,  8 Aug 30 12:04 /dev/snd/pcmC0D3p
crw-rw---- 1 root audio 116,  3 Aug 30 12:04 /dev/snd/pcmC1D3p
crw-rw---- 1 root audio 116,  1 Aug 30 12:04 /dev/snd/seq
crw-rw---- 1 root audio 116, 33 Aug 30 12:04 /dev/snd/timer

/dev/snd/by-path:
total 0
drwxr-xr-x 2 root root  80 Aug 30 12:04 .
drwxr-xr-x 3 root root 260 Aug 30 12:04 ..
lrwxrwxrwx 1 root root  12 Aug 30 12:04 pci-0000:00:14.2 -> ../controlC0
lrwxrwxrwx 1 root root  12 Aug 30 12:04 pci-0000:01:05.1 -> ../controlC1


!!ALSA configuration files
!!------------------------

!!System wide config file (/etc/asound.conf)

pcm.!default {
  type hw
  card 0
  device 3
}

pcm.!default "hdmi:0"

ctl.!default {
  type hw
  card 0
  device 3
}

pcm.crossfeed {
  type plug
  slave.pcm "ladspa"
}

pcm.guitar {
  type plug
  slave.pcm "ladspa2"
}

pcm.ladspa {
  type ladspa
  slave.pcm "plughw:0,3";
  path "/usr/lib/ladspa";
  plugins [
    {
      label bs2b
      input {
        controls [ 700 4 ]
      }
    }
 ]
}

pcm.ladspa2{
  type ladspa
  slave.pcm "plughw:2,0";
  path "/usr/lib/ladspa";
  plugins [
    {
      label bs2b
      input {
        controls [ 700 4 ]
      }
    }
 ]
}



!!Aplay/Arecord output
!!--------------------

APLAY

**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 3: VT1708S Digital [VT1708S Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: Generic Digital [Generic Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

ARECORD

**** List of CAPTURE Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

!!Amixer output
!!-------------

!!-------Mixer controls for card 0 [SB]

Card hw:0 'SB'/'HDA ATI SB at 0xfbcf4000 irq 16'
  Mixer name	: 'VIA VT1708S'
  Components	: 'HDA:11060397,1043836c,00100000'
  Controls      : 49
  Simple ctrls  : 21
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 42
  Mono: Playback 38 [90%] [-6.00dB] [off]
Simple mixer control 'Headphone',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [off]
  Front Right: Playback [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 42
  Mono:
  Front Left: Playback 0 [0%] [-63.00dB] [off]
  Front Right: Playback 0 [0%] [-63.00dB] [off]
Simple mixer control 'Front Mic',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Mono
  Limits: Playback 0 - 31
  Mono: Capture [off]
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Front Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 42
  Mono:
  Front Left: Playback 42 [100%] [0.00dB] [off]
  Front Right: Playback 42 [100%] [0.00dB] [off]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 42
  Mono: Playback 42 [100%] [0.00dB] [off]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 42
  Mono: Playback 42 [100%] [0.00dB] [off]
Simple mixer control 'Side',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 42
  Mono:
  Front Left: Playback 42 [100%] [0.00dB] [off]
  Front Right: Playback 42 [100%] [0.00dB] [off]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Mono
  Limits: Playback 0 - 31
  Mono: Capture [off]
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'CD',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Mono
  Limits: Playback 0 - 31
  Mono: Capture [off]
  Front Left: Playback 31 [100%] [12.00dB] [off]
  Front Right: Playback 31 [100%] [12.00dB] [off]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 31
  Front Left: Capture 0 [0%] [-16.50dB] [on]
  Front Right: Capture 0 [0%] [-16.50dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
Simple mixer control 'Dynamic Power-Control',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
Simple mixer control 'Loopback Mixing',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Rear Mic',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Mono
  Limits: Playback 0 - 31
  Mono: Capture [on]
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Rear Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Stereo Mix',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Mono
  Mono: Capture [off]

!!-------Mixer controls for card 1 [HDMI]

Card hw:1 'HDMI'/'HDA ATI HDMI at 0xfbefc000 irq 19'
  Mixer name	: 'ATI Generic'
  Components	: 'HDA:1002791a,00791a00,00100000'
  Controls      : 6
  Simple ctrls  : 1
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]


!!Alsactl output
!!--------------

--startcollapse--
state.SB {
	control.1 {
		iface MIXER
		name 'Front Playback Volume'
		value.0 0
		value.1 0
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 42'
			dbmin -6300
			dbmax 0
			dbvalue.0 -6300
			dbvalue.1 -6300
		}
	}
	control.2 {
		iface MIXER
		name 'Front Playback Switch'
		value.0 false
		value.1 false
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.3 {
		iface MIXER
		name 'Surround Playback Volume'
		value.0 42
		value.1 42
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 42'
			dbmin -6300
			dbmax 0
			dbvalue.0 0
			dbvalue.1 0
		}
	}
	control.4 {
		iface MIXER
		name 'Surround Playback Switch'
		value.0 false
		value.1 false
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.5 {
		iface MIXER
		name 'Center Playback Volume'
		value 42
		comment {
			access 'read write'
			type INTEGER
			count 1
			range '0 - 42'
			dbmin -6300
			dbmax 0
			dbvalue.0 0
		}
	}
	control.6 {
		iface MIXER
		name 'LFE Playback Volume'
		value 42
		comment {
			access 'read write'
			type INTEGER
			count 1
			range '0 - 42'
			dbmin -6300
			dbmax 0
			dbvalue.0 0
		}
	}
	control.7 {
		iface MIXER
		name 'Center Playback Switch'
		value false
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.8 {
		iface MIXER
		name 'LFE Playback Switch'
		value false
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.9 {
		iface MIXER
		name 'Side Playback Volume'
		value.0 42
		value.1 42
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 42'
			dbmin -6300
			dbmax 0
			dbvalue.0 0
			dbvalue.1 0
		}
	}
	control.10 {
		iface MIXER
		name 'Side Playback Switch'
		value.0 false
		value.1 false
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.11 {
		iface MIXER
		name 'Headphone Playback Switch'
		value.0 false
		value.1 false
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.12 {
		iface MIXER
		name 'Loopback Mixing'
		value Disabled
		comment {
			access 'read write'
			type ENUMERATED
			count 1
			item.0 Disabled
			item.1 Enabled
		}
	}
	control.13 {
		iface MIXER
		name 'Rear Mic Playback Volume'
		value.0 0
		value.1 0
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 31'
			dbmin -3450
			dbmax 1200
			dbvalue.0 -3450
			dbvalue.1 -3450
		}
	}
	control.14 {
		iface MIXER
		name 'Rear Mic Playback Switch'
		value.0 false
		value.1 false
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.15 {
		iface MIXER
		name 'Front Mic Playback Volume'
		value.0 0
		value.1 0
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 31'
			dbmin -3450
			dbmax 1200
			dbvalue.0 -3450
			dbvalue.1 -3450
		}
	}
	control.16 {
		iface MIXER
		name 'Front Mic Playback Switch'
		value.0 false
		value.1 false
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.17 {
		iface MIXER
		name 'Line Playback Volume'
		value.0 0
		value.1 0
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 31'
			dbmin -3450
			dbmax 1200
			dbvalue.0 -3450
			dbvalue.1 -3450
		}
	}
	control.18 {
		iface MIXER
		name 'Line Playback Switch'
		value.0 false
		value.1 false
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.19 {
		iface MIXER
		name 'CD Playback Volume'
		value.0 31
		value.1 31
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 31'
			dbmin -3450
			dbmax 1200
			dbvalue.0 1200
			dbvalue.1 1200
		}
	}
	control.20 {
		iface MIXER
		name 'CD Playback Switch'
		value.0 false
		value.1 false
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.21 {
		iface MIXER
		name 'Auto-Mute Mode'
		value Enabled
		comment {
			access 'read write'
			type ENUMERATED
			count 1
			item.0 Disabled
			item.1 Enabled
		}
	}
	control.22 {
		iface MIXER
		name 'Capture Source'
		value 'Rear Mic'
		comment {
			access 'read write'
			type ENUMERATED
			count 1
			item.0 'Rear Mic'
			item.1 'Front Mic'
			item.2 Line
			item.3 CD
			item.4 'Stereo Mix'
		}
	}
	control.23 {
		iface MIXER
		name 'Capture Volume'
		value.0 0
		value.1 0
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 31'
			dbmin -1650
			dbmax 3000
			dbvalue.0 -1650
			dbvalue.1 -1650
		}
	}
	control.24 {
		iface MIXER
		name 'Capture Switch'
		value.0 true
		value.1 true
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.25 {
		iface MIXER
		name 'Rear Mic Boost Volume'
		value.0 0
		value.1 0
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 3'
			dbmin 0
			dbmax 3075
			dbvalue.0 0
			dbvalue.1 0
		}
	}
	control.26 {
		iface MIXER
		name 'Front Mic Boost Volume'
		value.0 0
		value.1 0
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 3'
			dbmin 0
			dbmax 3075
			dbvalue.0 0
			dbvalue.1 0
		}
	}
	control.27 {
		iface MIXER
		name 'IEC958 Playback Con Mask'
		value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.28 {
		iface MIXER
		name 'IEC958 Playback Pro Mask'
		value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.29 {
		iface MIXER
		name 'IEC958 Playback Default'
		value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access 'read write'
			type IEC958
			count 1
		}
	}
	control.30 {
		iface MIXER
		name 'IEC958 Playback Switch'
		value true
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.31 {
		iface MIXER
		name 'IEC958 Default PCM Playback Switch'
		value true
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.32 {
		iface MIXER
		name 'Master Playback Volume'
		value 38
		comment {
			access 'read write'
			type INTEGER
			count 1
			range '0 - 42'
			dbmin -6300
			dbmax 0
			dbvalue.0 -600
		}
	}
	control.33 {
		iface MIXER
		name 'Master Playback Switch'
		value false
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.34 {
		iface CARD
		name 'Rear Mic Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.35 {
		iface CARD
		name 'Front Mic Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.36 {
		iface CARD
		name 'Line Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.37 {
		iface CARD
		name 'CD Phantom Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.38 {
		iface CARD
		name 'Line Out Front Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.39 {
		iface CARD
		name 'Line Out Surround Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.40 {
		iface CARD
		name 'Line Out CLFE Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.41 {
		iface CARD
		name 'Line Out Side Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.42 {
		iface CARD
		name 'Front Headphone Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.43 {
		iface CARD
		name 'HDMI Phantom Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.44 {
		iface CARD
		name 'SPDIF Phantom Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.45 {
		iface MIXER
		name 'Dynamic Power-Control'
		value Enabled
		comment {
			access 'read write'
			type ENUMERATED
			count 1
			item.0 Disabled
			item.1 Enabled
		}
	}
	control.46 {
		iface PCM
		name 'Playback Channel Map'
		value.0 0
		value.1 0
		value.2 0
		value.3 0
		value.4 0
		value.5 0
		value.6 0
		value.7 0
		comment {
			access read
			type INTEGER
			count 8
			range '0 - 36'
		}
	}
	control.47 {
		iface PCM
		name 'Capture Channel Map'
		value.0 0
		value.1 0
		comment {
			access read
			type INTEGER
			count 2
			range '0 - 36'
		}
	}
	control.48 {
		iface PCM
		device 3
		name 'Playback Channel Map'
		value.0 0
		value.1 0
		comment {
			access read
			type INTEGER
			count 2
			range '0 - 36'
		}
	}
	control.49 {
		iface MIXER
		name 'PCM Playback Volume'
		value.0 255
		value.1 255
		comment {
			access 'read write user'
			type INTEGER
			count 2
			range '0 - 255'
			tlv '0000000100000008ffffec1400000014'
			dbmin -5100
			dbmax 0
			dbvalue.0 0
			dbvalue.1 0
		}
	}
}
state.HDMI {
	control.1 {
		iface MIXER
		name 'IEC958 Playback Con Mask'
		value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.2 {
		iface MIXER
		name 'IEC958 Playback Pro Mask'
		value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.3 {
		iface MIXER
		name 'IEC958 Playback Default'
		value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access 'read write'
			type IEC958
			count 1
		}
	}
	control.4 {
		iface MIXER
		name 'IEC958 Playback Switch'
		value false
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.5 {
		iface CARD
		name 'HDMI Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.6 {
		iface PCM
		device 3
		name 'Playback Channel Map'
		value.0 0
		value.1 0
		comment {
			access read
			type INTEGER
			count 2
			range '0 - 36'
		}
	}
}
--endcollapse--


!!All Loaded Modules
!!------------------



!!Sysfs Files
!!-----------

/sys/class/sound/hwC0D0/init_pin_configs:
0x19 0x01011012
0x1a 0x01a19036
0x1b 0x0181303e
0x1c 0x01014010
0x1d 0x0221401f
0x1e 0x02a19038
0x1f 0x90370137
0x20 0x185600f0
0x21 0x074511f0
0x22 0x01016011
0x23 0x01012014

/sys/class/sound/hwC0D0/driver_pin_configs:

/sys/class/sound/hwC0D0/user_pin_configs:

/sys/class/sound/hwC0D0/init_verbs:

/sys/class/sound/hwC0D0/hints:

/sys/class/sound/hwC1D0/init_pin_configs:
0x03 0x18560010

/sys/class/sound/hwC1D0/driver_pin_configs:

/sys/class/sound/hwC1D0/user_pin_configs:

/sys/class/sound/hwC1D0/init_verbs:

/sys/class/sound/hwC1D0/hints:


!!ALSA/HDA dmesg
!!--------------

[    2.860570] usbhid: USB HID core driver
[    2.863059] usbcore: registered new interface driver snd-usb-audio
[    2.865285] Netfilter messages via NETLINK v0.30.
--
[    2.873417] ctnetlink v0.93: registering with nfnetlink.
[    2.873853] snd_hda_codec_via hdaudioC0D0: autoconfig for VT1708S: line_outs=4 (0x1c/0x19/0x22/0x23/0x0) type:line
[    2.873854] snd_hda_codec_via hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    2.873855] snd_hda_codec_via hdaudioC0D0:    hp_outs=1 (0x1d/0x0/0x0/0x0/0x0)
[    2.873856] snd_hda_codec_via hdaudioC0D0:    mono: mono_out=0x0
[    2.873857] snd_hda_codec_via hdaudioC0D0:    dig-out=0x20/0x21
[    2.873858] snd_hda_codec_via hdaudioC0D0:    inputs:
[    2.873868] snd_hda_codec_via hdaudioC0D0:      Rear Mic=0x1a
[    2.873869] snd_hda_codec_via hdaudioC0D0:      Front Mic=0x1e
[    2.873870] snd_hda_codec_via hdaudioC0D0:      Line=0x1b
[    2.873871] snd_hda_codec_via hdaudioC0D0:      CD=0x1f
[    2.881474] snd_hda_codec_generic hdaudioC1D0: autoconfig for Generic: line_outs=0 (0x0/0x0/0x0/0x0/0x0) type:line
[    2.881475] snd_hda_codec_generic hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    2.881476] snd_hda_codec_generic hdaudioC1D0:    hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    2.881477] snd_hda_codec_generic hdaudioC1D0:    mono: mono_out=0x0
[    2.881478] snd_hda_codec_generic hdaudioC1D0:    dig-out=0x3/0x0
[    2.881478] snd_hda_codec_generic hdaudioC1D0:    inputs:
[    2.881756] input: HDA ATI HDMI HDMI as /devices/pci0000:00/0000:00:01.0/0000:01:05.1/sound/card1/input4
[    2.882143] input: HDA ATI SB Rear Mic as /devices/pci0000:00/0000:00:14.2/sound/card0/input2
[    2.882178] input: HDA ATI SB Front Mic as /devices/pci0000:00/0000:00:14.2/sound/card0/input3
[    2.882213] input: HDA ATI SB Line as /devices/pci0000:00/0000:00:14.2/sound/card0/input5
[    2.882248] input: HDA ATI SB Line Out Front as /devices/pci0000:00/0000:00:14.2/sound/card0/input6
[    2.882283] input: HDA ATI SB Line Out Surround as /devices/pci0000:00/0000:00:14.2/sound/card0/input7
[    2.882317] input: HDA ATI SB Line Out CLFE as /devices/pci0000:00/0000:00:14.2/sound/card0/input8
[    2.882353] input: HDA ATI SB Line Out Side as /devices/pci0000:00/0000:00:14.2/sound/card0/input9
[    2.882387] input: HDA ATI SB Front Headphone as /devices/pci0000:00/0000:00:14.2/sound/card0/input10
[    2.932499] ip_tables: (C) 2000-2006 Netfilter Core Team
--
[    2.963603] acpi_cpufreq: overriding BIOS provided _PSD data
[    2.966349] ALSA device list:
[    2.968683]   #0: HDA ATI SB at 0xfbcf4000 irq 16
[    2.971022]   #1: HDA ATI HDMI at 0xfbefc000 irq 19
[    2.973801] BTRFS: device fsid 7ef56edc-673e-452e-9e05-3fabf074168b devid 1 transid 910848 /dev/root



[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: ALSA hang on 4.13.0-rc7
  2017-08-30 10:05 ` Markus Trippelsdorf
@ 2017-08-30 10:15   ` Markus Trippelsdorf
  0 siblings, 0 replies; 13+ messages in thread
From: Markus Trippelsdorf @ 2017-08-30 10:15 UTC (permalink / raw)
  To: alsa-devel; +Cc: Takashi Iwai

On 2017.08.30 at 12:05 +0200, Markus Trippelsdorf wrote:
> On 2017.08.30 at 12:03 +0200, Markus Trippelsdorf wrote:
> > On my system ALSA sometimes hangs:
> > 
> >  sysrq: SysRq : Show Blocked State                                         
> >    task                        PC stack   pid father                       
> >  output:ALSA def D    0   171      1 0x00000000                            
> >  Call Trace:                  
> >   ? __schedule+0x17c/0x720    
> >   ? schedule_preempt_disabled+0x2d/0x80                                    
> >   ? __mutex_lock_slowpath+0x141/0x420                                      
> >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> >   ? snd_card_file_remove+0x76/0x120                                        
> >   ? snd_pcm_playback_ioctl+0x1c7/0x560                                     
> >   ? dput+0xb6/0x1e0           
> >   ? SyS_ioctl+0xa7/0x860      
> >   ? task_work_run+0x70/0xa0   
> >   ? entry_SYSCALL_64_fastpath+0x13/0x94  
> > 
> > Only a reboot will fix the issue.
> 
> I've attached the output of "alsa-info.sh --no-upload".

With lock debugging on:

 DEBUG_LOCKS_WARN_ON(depth <= 0)
 ------------[ cut here ]------------
 WARNING: CPU: 0 PID: 494 at kernel/locking/lockdep.c:3617 lock_release+0x3bc/0x780
 CPU: 0 PID: 494 Comm: mplayer Not tainted 4.13.0-rc7-00015-g36fde05f3fb5-dirty #58
 Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
 task: ffff880212943a80 task.stack: ffffc90000f98000
 RIP: 0010:lock_release+0x3bc/0x780
 RSP: 0018:ffffc90000f9bc80 EFLAGS: 00010082
 RAX: 000000000000001f RBX: ffff88021515c400 RCX: 0000000000000000
 RDX: ffffffff8111005e RSI: 0000000000000001 RDI: ffffffff820335a0
 RBP: ffffc90000f9bcf8 R08: 0000000000000001 R09: 0000000000000000
 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8802150d8b40
 R13: ffffc90000f9bd18 R14: ffff880212943a80 R15: ffff880212943a80
 FS:  00007f2f4d021780(0000) GS:ffff88021fc00000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 000055b8dfaf4c10 CR3: 00000001e7d34000 CR4: 00000000000006f0
 Call Trace:
  ? snd_pcm_drain+0x295/0x500
  __mutex_unlock_slowpath+0x3e/0x2e0
  ? snd_pcm_drain+0x282/0x500
  mutex_unlock+0xd/0x20
  snd_pcm_drain+0x295/0x500
  ? do_task_dead+0x40/0x40
  snd_pcm_kernel_ioctl+0x369/0x560
  snd_pcm_oss_sync+0x53/0x480
  snd_pcm_oss_ioctl+0x861/0x1700
  ? mntput+0x8c/0x400
  SyS_ioctl+0xa8/0x900
  ? trace_hardirqs_on_thunk+0x1a/0x1c
  entry_SYSCALL_64_fastpath+0x18/0xad
 RIP: 0033:0x7f2f4dd76b07
 RSP: 002b:00007ffe051df0b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
 RAX: ffffffffffffffda RBX: 000055b8e2351a60 RCX: 00007f2f4dd76b07
 RDX: 0000000000000000 RSI: 0000000000005001 RDI: 0000000000000004
 RBP: 0000000000000003 R08: 00007f2f4de15af8 R09: 00007f2f4d021780
 R10: 0000000000000059 R11: 0000000000000246 R12: 000055b8dfe94de0
 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000001000
 Code: 2b c5 34 00 85 c0 48 8b 4d b8 74 25 44 8b 05 64 c2 f3 01 45 85 c0 75 19 48 c7 c6 8b 58 dd 81 48 c7 c7 8c 23 dd 81 e8 9d bd 00 00 <0f> ff 48 8b 4d b8 48 89 4d b8 e8 f5 c4 34 00 85 c0 0f 84 7f fe 
 ---[ end trace 5f19aa03d29c4872 ]---


-- 
Markus

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: ALSA hang on 4.13.0-rc7
  2017-08-30 10:03 ALSA hang on 4.13.0-rc7 Markus Trippelsdorf
  2017-08-30 10:05 ` Markus Trippelsdorf
@ 2017-08-30 11:23 ` Takashi Iwai
  2017-08-30 11:33   ` Markus Trippelsdorf
  1 sibling, 1 reply; 13+ messages in thread
From: Takashi Iwai @ 2017-08-30 11:23 UTC (permalink / raw)
  To: Markus Trippelsdorf; +Cc: alsa-devel

On Wed, 30 Aug 2017 12:03:34 +0200,
Markus Trippelsdorf wrote:
> 
> On my system ALSA sometimes hangs:
> 
>  sysrq: SysRq : Show Blocked State                                         
>    task                        PC stack   pid father                       
>  output:ALSA def D    0   171      1 0x00000000                            
>  Call Trace:                  
>   ? __schedule+0x17c/0x720    
>   ? schedule_preempt_disabled+0x2d/0x80                                    
>   ? __mutex_lock_slowpath+0x141/0x420                                      
>   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
>   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
>   ? snd_card_file_remove+0x76/0x120                                        
>   ? snd_pcm_playback_ioctl+0x1c7/0x560                                     
>   ? dput+0xb6/0x1e0           
>   ? SyS_ioctl+0xa7/0x860      
>   ? task_work_run+0x70/0xa0   
>   ? entry_SYSCALL_64_fastpath+0x13/0x94  
> 
> Only a reboot will fix the issue.

Is this a regression?


Takashi

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: ALSA hang on 4.13.0-rc7
  2017-08-30 11:23 ` Takashi Iwai
@ 2017-08-30 11:33   ` Markus Trippelsdorf
  2017-08-30 11:34     ` Takashi Iwai
  0 siblings, 1 reply; 13+ messages in thread
From: Markus Trippelsdorf @ 2017-08-30 11:33 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

On 2017.08.30 at 13:23 +0200, Takashi Iwai wrote:
> On Wed, 30 Aug 2017 12:03:34 +0200,
> Markus Trippelsdorf wrote:
> > 
> > On my system ALSA sometimes hangs:
> > 
> >  sysrq: SysRq : Show Blocked State                                         
> >    task                        PC stack   pid father                       
> >  output:ALSA def D    0   171      1 0x00000000                            
> >  Call Trace:                  
> >   ? __schedule+0x17c/0x720    
> >   ? schedule_preempt_disabled+0x2d/0x80                                    
> >   ? __mutex_lock_slowpath+0x141/0x420                                      
> >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> >   ? snd_card_file_remove+0x76/0x120                                        
> >   ? snd_pcm_playback_ioctl+0x1c7/0x560                                     
> >   ? dput+0xb6/0x1e0           
> >   ? SyS_ioctl+0xa7/0x860      
> >   ? task_work_run+0x70/0xa0   
> >   ? entry_SYSCALL_64_fastpath+0x13/0x94  
> > 
> > Only a reboot will fix the issue.
> 
> Is this a regression?

Yes. 4.11 is fine.

-- 
Markus

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: ALSA hang on 4.13.0-rc7
  2017-08-30 11:33   ` Markus Trippelsdorf
@ 2017-08-30 11:34     ` Takashi Iwai
  2017-08-30 11:42       ` Markus Trippelsdorf
  0 siblings, 1 reply; 13+ messages in thread
From: Takashi Iwai @ 2017-08-30 11:34 UTC (permalink / raw)
  To: Markus Trippelsdorf; +Cc: alsa-devel

On Wed, 30 Aug 2017 13:33:40 +0200,
Markus Trippelsdorf wrote:
> 
> On 2017.08.30 at 13:23 +0200, Takashi Iwai wrote:
> > On Wed, 30 Aug 2017 12:03:34 +0200,
> > Markus Trippelsdorf wrote:
> > > 
> > > On my system ALSA sometimes hangs:
> > > 
> > >  sysrq: SysRq : Show Blocked State                                         
> > >    task                        PC stack   pid father                       
> > >  output:ALSA def D    0   171      1 0x00000000                            
> > >  Call Trace:                  
> > >   ? __schedule+0x17c/0x720    
> > >   ? schedule_preempt_disabled+0x2d/0x80                                    
> > >   ? __mutex_lock_slowpath+0x141/0x420                                      
> > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > >   ? snd_card_file_remove+0x76/0x120                                        
> > >   ? snd_pcm_playback_ioctl+0x1c7/0x560                                     
> > >   ? dput+0xb6/0x1e0           
> > >   ? SyS_ioctl+0xa7/0x860      
> > >   ? task_work_run+0x70/0xa0   
> > >   ? entry_SYSCALL_64_fastpath+0x13/0x94  
> > > 
> > > Only a reboot will fix the issue.
> > 
> > Is this a regression?
> 
> Yes. 4.11 is fine.

And 4.12?


Takashi

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: ALSA hang on 4.13.0-rc7
  2017-08-30 11:34     ` Takashi Iwai
@ 2017-08-30 11:42       ` Markus Trippelsdorf
  2017-08-30 11:46         ` Takashi Iwai
  0 siblings, 1 reply; 13+ messages in thread
From: Markus Trippelsdorf @ 2017-08-30 11:42 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

On 2017.08.30 at 13:34 +0200, Takashi Iwai wrote:
> On Wed, 30 Aug 2017 13:33:40 +0200,
> Markus Trippelsdorf wrote:
> > 
> > On 2017.08.30 at 13:23 +0200, Takashi Iwai wrote:
> > > On Wed, 30 Aug 2017 12:03:34 +0200,
> > > Markus Trippelsdorf wrote:
> > > > 
> > > > On my system ALSA sometimes hangs:
> > > > 
> > > >  sysrq: SysRq : Show Blocked State                                         
> > > >    task                        PC stack   pid father                       
> > > >  output:ALSA def D    0   171      1 0x00000000                            
> > > >  Call Trace:                  
> > > >   ? __schedule+0x17c/0x720    
> > > >   ? schedule_preempt_disabled+0x2d/0x80                                    
> > > >   ? __mutex_lock_slowpath+0x141/0x420                                      
> > > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > > >   ? snd_card_file_remove+0x76/0x120                                        
> > > >   ? snd_pcm_playback_ioctl+0x1c7/0x560                                     
> > > >   ? dput+0xb6/0x1e0           
> > > >   ? SyS_ioctl+0xa7/0x860      
> > > >   ? task_work_run+0x70/0xa0   
> > > >   ? entry_SYSCALL_64_fastpath+0x13/0x94  
> > > > 
> > > > Only a reboot will fix the issue.
> > > 
> > > Is this a regression?
> > 
> > Yes. 4.11 is fine.
> 
> And 4.12?

Just build it and yes 4.12 is fine, too.

(Before you ask, I have intention to bisect the issue.
It would be too annoying with the all the required reboots.

But if you want I can run scripts/faddr2line on the backtraces.)

-- 
Markus

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: ALSA hang on 4.13.0-rc7
  2017-08-30 11:42       ` Markus Trippelsdorf
@ 2017-08-30 11:46         ` Takashi Iwai
  2017-08-30 12:26           ` Markus Trippelsdorf
  0 siblings, 1 reply; 13+ messages in thread
From: Takashi Iwai @ 2017-08-30 11:46 UTC (permalink / raw)
  To: Markus Trippelsdorf; +Cc: alsa-devel

On Wed, 30 Aug 2017 13:42:41 +0200,
Markus Trippelsdorf wrote:
> 
> On 2017.08.30 at 13:34 +0200, Takashi Iwai wrote:
> > On Wed, 30 Aug 2017 13:33:40 +0200,
> > Markus Trippelsdorf wrote:
> > > 
> > > On 2017.08.30 at 13:23 +0200, Takashi Iwai wrote:
> > > > On Wed, 30 Aug 2017 12:03:34 +0200,
> > > > Markus Trippelsdorf wrote:
> > > > > 
> > > > > On my system ALSA sometimes hangs:
> > > > > 
> > > > >  sysrq: SysRq : Show Blocked State                                         
> > > > >    task                        PC stack   pid father                       
> > > > >  output:ALSA def D    0   171      1 0x00000000                            
> > > > >  Call Trace:                  
> > > > >   ? __schedule+0x17c/0x720    
> > > > >   ? schedule_preempt_disabled+0x2d/0x80                                    
> > > > >   ? __mutex_lock_slowpath+0x141/0x420                                      
> > > > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > > > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > > > >   ? snd_card_file_remove+0x76/0x120                                        
> > > > >   ? snd_pcm_playback_ioctl+0x1c7/0x560                                     
> > > > >   ? dput+0xb6/0x1e0           
> > > > >   ? SyS_ioctl+0xa7/0x860      
> > > > >   ? task_work_run+0x70/0xa0   
> > > > >   ? entry_SYSCALL_64_fastpath+0x13/0x94  
> > > > > 
> > > > > Only a reboot will fix the issue.
> > > > 
> > > > Is this a regression?
> > > 
> > > Yes. 4.11 is fine.
> > 
> > And 4.12?
> 
> Just build it and yes 4.12 is fine, too.
> 
> (Before you ask, I have intention to bisect the issue.
> It would be too annoying with the all the required reboots.

That'd be really appreciated.  We had lots of changes since 4.12
regarding PCM core stuff, so narrowing down would be a great help.

> But if you want I can run scripts/faddr2line on the backtraces.)

Let's try to narrow at first a bit.  For such a problem, the trace
itself is often too late, not the cause itself.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: ALSA hang on 4.13.0-rc7
  2017-08-30 11:46         ` Takashi Iwai
@ 2017-08-30 12:26           ` Markus Trippelsdorf
  2017-08-30 12:33             ` Takashi Iwai
  0 siblings, 1 reply; 13+ messages in thread
From: Markus Trippelsdorf @ 2017-08-30 12:26 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

On 2017.08.30 at 13:46 +0200, Takashi Iwai wrote:
> On Wed, 30 Aug 2017 13:42:41 +0200,
> Markus Trippelsdorf wrote:
> > 
> > On 2017.08.30 at 13:34 +0200, Takashi Iwai wrote:
> > > On Wed, 30 Aug 2017 13:33:40 +0200,
> > > Markus Trippelsdorf wrote:
> > > > 
> > > > On 2017.08.30 at 13:23 +0200, Takashi Iwai wrote:
> > > > > On Wed, 30 Aug 2017 12:03:34 +0200,
> > > > > Markus Trippelsdorf wrote:
> > > > > > 
> > > > > > On my system ALSA sometimes hangs:
> > > > > > 
> > > > > >  sysrq: SysRq : Show Blocked State                                         
> > > > > >    task                        PC stack   pid father                       
> > > > > >  output:ALSA def D    0   171      1 0x00000000                            
> > > > > >  Call Trace:                  
> > > > > >   ? __schedule+0x17c/0x720    
> > > > > >   ? schedule_preempt_disabled+0x2d/0x80                                    
> > > > > >   ? __mutex_lock_slowpath+0x141/0x420                                      
> > > > > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > > > > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > > > > >   ? snd_card_file_remove+0x76/0x120                                        
> > > > > >   ? snd_pcm_playback_ioctl+0x1c7/0x560                                     
> > > > > >   ? dput+0xb6/0x1e0           
> > > > > >   ? SyS_ioctl+0xa7/0x860      
> > > > > >   ? task_work_run+0x70/0xa0   
> > > > > >   ? entry_SYSCALL_64_fastpath+0x13/0x94  
> > > > > > 
> > > > > > Only a reboot will fix the issue.
> > > > > 
> > > > > Is this a regression?

The issue started with:

commit 68b4acd322494444803a3f49884ae889c8ec6689 (HEAD, refs/bisect/bad)
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue May 24 15:07:39 2016 +0200

    ALSA: pcm: Apply power lock globally to common ioctls

-- 
Markus

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: ALSA hang on 4.13.0-rc7
  2017-08-30 12:26           ` Markus Trippelsdorf
@ 2017-08-30 12:33             ` Takashi Iwai
  2017-08-30 12:56               ` Takashi Iwai
  0 siblings, 1 reply; 13+ messages in thread
From: Takashi Iwai @ 2017-08-30 12:33 UTC (permalink / raw)
  To: Markus Trippelsdorf; +Cc: alsa-devel

On Wed, 30 Aug 2017 14:26:51 +0200,
Markus Trippelsdorf wrote:
> 
> On 2017.08.30 at 13:46 +0200, Takashi Iwai wrote:
> > On Wed, 30 Aug 2017 13:42:41 +0200,
> > Markus Trippelsdorf wrote:
> > > 
> > > On 2017.08.30 at 13:34 +0200, Takashi Iwai wrote:
> > > > On Wed, 30 Aug 2017 13:33:40 +0200,
> > > > Markus Trippelsdorf wrote:
> > > > > 
> > > > > On 2017.08.30 at 13:23 +0200, Takashi Iwai wrote:
> > > > > > On Wed, 30 Aug 2017 12:03:34 +0200,
> > > > > > Markus Trippelsdorf wrote:
> > > > > > > 
> > > > > > > On my system ALSA sometimes hangs:
> > > > > > > 
> > > > > > >  sysrq: SysRq : Show Blocked State                                         
> > > > > > >    task                        PC stack   pid father                       
> > > > > > >  output:ALSA def D    0   171      1 0x00000000                            
> > > > > > >  Call Trace:                  
> > > > > > >   ? __schedule+0x17c/0x720    
> > > > > > >   ? schedule_preempt_disabled+0x2d/0x80                                    
> > > > > > >   ? __mutex_lock_slowpath+0x141/0x420                                      
> > > > > > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > > > > > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > > > > > >   ? snd_card_file_remove+0x76/0x120                                        
> > > > > > >   ? snd_pcm_playback_ioctl+0x1c7/0x560                                     
> > > > > > >   ? dput+0xb6/0x1e0           
> > > > > > >   ? SyS_ioctl+0xa7/0x860      
> > > > > > >   ? task_work_run+0x70/0xa0   
> > > > > > >   ? entry_SYSCALL_64_fastpath+0x13/0x94  
> > > > > > > 
> > > > > > > Only a reboot will fix the issue.
> > > > > > 
> > > > > > Is this a regression?
> 
> The issue started with:
> 
> commit 68b4acd322494444803a3f49884ae889c8ec6689 (HEAD, refs/bisect/bad)
> Author: Takashi Iwai <tiwai@suse.de>
> Date:   Tue May 24 15:07:39 2016 +0200
> 
>     ALSA: pcm: Apply power lock globally to common ioctls

Thanks, that looks fitting with your problem description.
I'll take a deeper look.


Takashi

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: ALSA hang on 4.13.0-rc7
  2017-08-30 12:33             ` Takashi Iwai
@ 2017-08-30 12:56               ` Takashi Iwai
  2017-08-30 13:04                 ` Markus Trippelsdorf
  0 siblings, 1 reply; 13+ messages in thread
From: Takashi Iwai @ 2017-08-30 12:56 UTC (permalink / raw)
  To: Markus Trippelsdorf; +Cc: alsa-devel

On Wed, 30 Aug 2017 14:33:36 +0200,
Takashi Iwai wrote:
> 
> On Wed, 30 Aug 2017 14:26:51 +0200,
> Markus Trippelsdorf wrote:
> > 
> > On 2017.08.30 at 13:46 +0200, Takashi Iwai wrote:
> > > On Wed, 30 Aug 2017 13:42:41 +0200,
> > > Markus Trippelsdorf wrote:
> > > > 
> > > > On 2017.08.30 at 13:34 +0200, Takashi Iwai wrote:
> > > > > On Wed, 30 Aug 2017 13:33:40 +0200,
> > > > > Markus Trippelsdorf wrote:
> > > > > > 
> > > > > > On 2017.08.30 at 13:23 +0200, Takashi Iwai wrote:
> > > > > > > On Wed, 30 Aug 2017 12:03:34 +0200,
> > > > > > > Markus Trippelsdorf wrote:
> > > > > > > > 
> > > > > > > > On my system ALSA sometimes hangs:
> > > > > > > > 
> > > > > > > >  sysrq: SysRq : Show Blocked State                                         
> > > > > > > >    task                        PC stack   pid father                       
> > > > > > > >  output:ALSA def D    0   171      1 0x00000000                            
> > > > > > > >  Call Trace:                  
> > > > > > > >   ? __schedule+0x17c/0x720    
> > > > > > > >   ? schedule_preempt_disabled+0x2d/0x80                                    
> > > > > > > >   ? __mutex_lock_slowpath+0x141/0x420                                      
> > > > > > > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > > > > > > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > > > > > > >   ? snd_card_file_remove+0x76/0x120                                        
> > > > > > > >   ? snd_pcm_playback_ioctl+0x1c7/0x560                                     
> > > > > > > >   ? dput+0xb6/0x1e0           
> > > > > > > >   ? SyS_ioctl+0xa7/0x860      
> > > > > > > >   ? task_work_run+0x70/0xa0   
> > > > > > > >   ? entry_SYSCALL_64_fastpath+0x13/0x94  
> > > > > > > > 
> > > > > > > > Only a reboot will fix the issue.
> > > > > > > 
> > > > > > > Is this a regression?
> > 
> > The issue started with:
> > 
> > commit 68b4acd322494444803a3f49884ae889c8ec6689 (HEAD, refs/bisect/bad)
> > Author: Takashi Iwai <tiwai@suse.de>
> > Date:   Tue May 24 15:07:39 2016 +0200
> > 
> >     ALSA: pcm: Apply power lock globally to common ioctls
> 
> Thanks, that looks fitting with your problem description.
> I'll take a deeper look.

Could you try the patch below?


thanks,

Takashi

-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ALSA: pcm: Fix power lock unbalance via OSS emulation

PCM OSS emulation issues the drain ioctl without power lock.  It used
to work in the earlier kernels as the power lock was taken inside
snd_pcm_drain() itself.  But since 68b4acd32249 ("ALSA: pcm: Apply
power lock globally to common ioctls"), the power lock is taken
outside the function.  Due to that change, the call via OSS emulation
leads to the unbalanced power lock, thus it deadlocks.

As a quick fix, just take the power lock before snd_pcm_drain() call
for OSS emulation path.  A better cleanup will follow later.

Fixes: 68b4acd32249 ("ALSA: pcm: Apply power lock globally to common ioctls")
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/core/pcm_native.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 22995cb3bd44..cf0433f80067 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -3064,6 +3064,7 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream,
 {
 	snd_pcm_uframes_t *frames = arg;
 	snd_pcm_sframes_t result;
+	int err;
 	
 	switch (cmd) {
 	case SNDRV_PCM_IOCTL_FORWARD:
@@ -3083,7 +3084,10 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream,
 	case SNDRV_PCM_IOCTL_START:
 		return snd_pcm_start_lock_irq(substream);
 	case SNDRV_PCM_IOCTL_DRAIN:
-		return snd_pcm_drain(substream, NULL);
+		snd_power_lock(substream->pcm->card);
+		err = snd_pcm_drain(substream, NULL);
+		snd_power_unlock(substream->pcm->card);
+		return err;
 	case SNDRV_PCM_IOCTL_DROP:
 		return snd_pcm_drop(substream);
 	case SNDRV_PCM_IOCTL_DELAY:
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: ALSA hang on 4.13.0-rc7
  2017-08-30 12:56               ` Takashi Iwai
@ 2017-08-30 13:04                 ` Markus Trippelsdorf
  2017-08-30 13:13                   ` qTakashi Iwai
  0 siblings, 1 reply; 13+ messages in thread
From: Markus Trippelsdorf @ 2017-08-30 13:04 UTC (permalink / raw)
  To: Takashi Iwai, g; +Cc: alsa-devel

On 2017.08.30 at 14:56 +0200, Takashi Iwai wrote:
> On Wed, 30 Aug 2017 14:33:36 +0200,
> Takashi Iwai wrote:
> > 
> > On Wed, 30 Aug 2017 14:26:51 +0200,
> > Markus Trippelsdorf wrote:
> > > 
> > > On 2017.08.30 at 13:46 +0200, Takashi Iwai wrote:
> > > > On Wed, 30 Aug 2017 13:42:41 +0200,
> > > > Markus Trippelsdorf wrote:
> > > > > 
> > > > > On 2017.08.30 at 13:34 +0200, Takashi Iwai wrote:
> > > > > > On Wed, 30 Aug 2017 13:33:40 +0200,
> > > > > > Markus Trippelsdorf wrote:
> > > > > > > 
> > > > > > > On 2017.08.30 at 13:23 +0200, Takashi Iwai wrote:
> > > > > > > > On Wed, 30 Aug 2017 12:03:34 +0200,
> > > > > > > > Markus Trippelsdorf wrote:
> > > > > > > > > 
> > > > > > > > > On my system ALSA sometimes hangs:
> > > > > > > > > 
> > > > > > > > >  sysrq: SysRq : Show Blocked State                                         
> > > > > > > > >    task                        PC stack   pid father                       
> > > > > > > > >  output:ALSA def D    0   171      1 0x00000000                            
> > > > > > > > >  Call Trace:                  
> > > > > > > > >   ? __schedule+0x17c/0x720    
> > > > > > > > >   ? schedule_preempt_disabled+0x2d/0x80                                    
> > > > > > > > >   ? __mutex_lock_slowpath+0x141/0x420                                      
> > > > > > > > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > > > > > > > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > > > > > > > >   ? snd_card_file_remove+0x76/0x120                                        
> > > > > > > > >   ? snd_pcm_playback_ioctl+0x1c7/0x560                                     
> > > > > > > > >   ? dput+0xb6/0x1e0           
> > > > > > > > >   ? SyS_ioctl+0xa7/0x860      
> > > > > > > > >   ? task_work_run+0x70/0xa0   
> > > > > > > > >   ? entry_SYSCALL_64_fastpath+0x13/0x94  
> > > > > > > > > 
> > > > > > > > > Only a reboot will fix the issue.
> > > > > > > > 
> > > > > > > > Is this a regression?
> > > 
> > > The issue started with:
> > > 
> > > commit 68b4acd322494444803a3f49884ae889c8ec6689 (HEAD, refs/bisect/bad)
> > > Author: Takashi Iwai <tiwai@suse.de>
> > > Date:   Tue May 24 15:07:39 2016 +0200
> > > 
> > >     ALSA: pcm: Apply power lock globally to common ioctls
> > 
> > Thanks, that looks fitting with your problem description.
> > I'll take a deeper look.
> 
> Could you try the patch below?

Yes, it fixes the problem.
Thanks.

-- 
Markus

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: ALSA hang on 4.13.0-rc7
  2017-08-30 13:04                 ` Markus Trippelsdorf
@ 2017-08-30 13:13                   ` qTakashi Iwai
  0 siblings, 0 replies; 13+ messages in thread
From: qTakashi Iwai @ 2017-08-30 13:13 UTC (permalink / raw)
  To: Markus Trippelsdorf; +Cc: alsa-devel

On Wed, 30 Aug 2017 15:04:44 +0200,
Markus Trippelsdorf wrote:
> 
> On 2017.08.30 at 14:56 +0200, Takashi Iwai wrote:
> > On Wed, 30 Aug 2017 14:33:36 +0200,
> > Takashi Iwai wrote:
> > > 
> > > On Wed, 30 Aug 2017 14:26:51 +0200,
> > > Markus Trippelsdorf wrote:
> > > > 
> > > > On 2017.08.30 at 13:46 +0200, Takashi Iwai wrote:
> > > > > On Wed, 30 Aug 2017 13:42:41 +0200,
> > > > > Markus Trippelsdorf wrote:
> > > > > > 
> > > > > > On 2017.08.30 at 13:34 +0200, Takashi Iwai wrote:
> > > > > > > On Wed, 30 Aug 2017 13:33:40 +0200,
> > > > > > > Markus Trippelsdorf wrote:
> > > > > > > > 
> > > > > > > > On 2017.08.30 at 13:23 +0200, Takashi Iwai wrote:
> > > > > > > > > On Wed, 30 Aug 2017 12:03:34 +0200,
> > > > > > > > > Markus Trippelsdorf wrote:
> > > > > > > > > > 
> > > > > > > > > > On my system ALSA sometimes hangs:
> > > > > > > > > > 
> > > > > > > > > >  sysrq: SysRq : Show Blocked State                                         
> > > > > > > > > >    task                        PC stack   pid father                       
> > > > > > > > > >  output:ALSA def D    0   171      1 0x00000000                            
> > > > > > > > > >  Call Trace:                  
> > > > > > > > > >   ? __schedule+0x17c/0x720    
> > > > > > > > > >   ? schedule_preempt_disabled+0x2d/0x80                                    
> > > > > > > > > >   ? __mutex_lock_slowpath+0x141/0x420                                      
> > > > > > > > > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > > > > > > > > >   ? snd_pcm_common_ioctl1+0x2f/0x1400                                      
> > > > > > > > > >   ? snd_card_file_remove+0x76/0x120                                        
> > > > > > > > > >   ? snd_pcm_playback_ioctl+0x1c7/0x560                                     
> > > > > > > > > >   ? dput+0xb6/0x1e0           
> > > > > > > > > >   ? SyS_ioctl+0xa7/0x860      
> > > > > > > > > >   ? task_work_run+0x70/0xa0   
> > > > > > > > > >   ? entry_SYSCALL_64_fastpath+0x13/0x94  
> > > > > > > > > > 
> > > > > > > > > > Only a reboot will fix the issue.
> > > > > > > > > 
> > > > > > > > > Is this a regression?
> > > > 
> > > > The issue started with:
> > > > 
> > > > commit 68b4acd322494444803a3f49884ae889c8ec6689 (HEAD, refs/bisect/bad)
> > > > Author: Takashi Iwai <tiwai@suse.de>
> > > > Date:   Tue May 24 15:07:39 2016 +0200
> > > > 
> > > >     ALSA: pcm: Apply power lock globally to common ioctls
> > > 
> > > Thanks, that looks fitting with your problem description.
> > > I'll take a deeper look.
> > 
> > Could you try the patch below?
> 
> Yes, it fixes the problem.
> Thanks.

Great, the fix is merged now.  Will be included in the next pull
request for 4.13-rc8 or final.

Thanks for a quick bisection and testing!


Takashi

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-08-30 13:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-30 10:03 ALSA hang on 4.13.0-rc7 Markus Trippelsdorf
2017-08-30 10:05 ` Markus Trippelsdorf
2017-08-30 10:15   ` Markus Trippelsdorf
2017-08-30 11:23 ` Takashi Iwai
2017-08-30 11:33   ` Markus Trippelsdorf
2017-08-30 11:34     ` Takashi Iwai
2017-08-30 11:42       ` Markus Trippelsdorf
2017-08-30 11:46         ` Takashi Iwai
2017-08-30 12:26           ` Markus Trippelsdorf
2017-08-30 12:33             ` Takashi Iwai
2017-08-30 12:56               ` Takashi Iwai
2017-08-30 13:04                 ` Markus Trippelsdorf
2017-08-30 13:13                   ` qTakashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.