Strange bug in alsa-lib
Greetings everyone!
I'm sorry in advance for my poor English.
Unfortunately your bugtracker is down so I've had to send this bug report (or description, huh) here. Alsa information about my system is in the attachments.
I've came across this bug a few days ago, it appeared since I've installed alsa. Everytime when I try to quickly change the volume on Master channel the sound brakes: alsamixer hangs up and some music players (for example, Music on Console) play music by fits and starts (it's similar to watching hd video on a slow connection). Some music players, for example DeadBeeF, or browsers, such as Chromium work quite normal. I've searched forums, but I didn't come across anyone with a similar problem. So, I've decided to do a little research to find out what caused the problems. I've started with a simple script:
plcmn@equestria:~$ cat test.sh export i=0 while [ $i -lt 80 ] do amixer set Master $i% let i=$(($i+1)) done
Here are the results of the execution before the bug appears:
plcmn@equestria:~$ time ./test.sh real 0m0.743s user 0m0.350s sys 0m0.203s
And this how it looks like when the bug comes out (I've just launched this script two times in a row):
plcmn@equestria~$ time test.sh
real 4m41.763s
user 0m0.607s
sys 0m12.037s
That looked really weird, so I've tried to figure out what caused the problem. Checking the source with cppcheck didn't gave any results, except some memory leaks (like [src/rawmidi/rawmidi_hw.c:304]: (error) Memory leak: hw), but none of them referred to my problem. So I've digged into the code and found out the line that caused the error:
---
From src/control/control_hw.c:
193 if (ioctl(hw->fd, SNDRV_CTL_IOCTL_ELEM_WRITE, control) < 0) {
---
I'm a dummy in system programming, so I can't exactly tell what's the problem with this line (I know ioctl's purpose, but I don't what to do next -- a mess of macros and structures were hard for understanding, so I stopped at this point). The delay measured by clock() from time.h was about 0.18 ms here.
Here is gdb's output for arguments passed to the problematic function:
Breakpoint 2, snd_ctl_hw_elem_write (handle=<optimized out>, control=0x7fffffffd9e0) at control_hw.c:193 (gdb) n
194 snd_ctl_hw_t *hw = handle->private_data;
(gdb) p handle
$2 = <optimized out>
(gdb) p control
$3 = (snd_ctl_elem_value_t *) 0x7fffffffd9e0
(gdb) p control->id
$4 = {numid = 16, iface = 2, device = 0, subdevice = 0,
name = "Master Playback Volume", '\000' <repeats 21 times>, index = 0}
(gdb) p control->indirect
$5 = 0
(gdb) p control->reserved
$6 = '\000' <repeats 111 times>
(gdb) p control->tstamp
$7 = {tv_sec = 0, tv_nsec = 0}
(gdb) p control->value
$8 = {integer = {value = {70, 0 <repeats 127 times>}, value_ptr = 0x46}, integer64 = {value = {70, 0 <repeats 63 times>}, value_ptr = 0x46}, enumerated = {item = {70, 0 <repeats 127 times>},
item_ptr = 0x46}, bytes = {data = "F", '\000' <repeats 510 times>,
data_ptr = 0x46 <error: Cannot access memory at address 0x46>}, iec958 = {status = "F", '\000' <repeats 22 times>,
subcode = '\000' <repeats 146 times>, pad = 0 '\000', dig_subframe = "\000\000\000"}}For some reason this function is called twice, the second call doesn't cause such a delay.
I can provide any information you'll need.
I hope that my report will be useful.
Sorry again for my poor English and sending a bug report to dev mail lists.
upload=true&script=true&cardinfo=
!!################################
!!ALSA Information Script v 0.4.64
!!################################
!!Script ran on: Sun Jan 18 15:30:07 UTC 2015
!!Linux Distribution
!!------------------
Arch Linux \r (\l) NAME="Arch Linux" ID=arch PRETTY_NAME="Arch Linux" HOME_URL="https://www.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://bugs.archlinux.org/"
!!DMI Information
!!---------------
Manufacturer: Dell Inc. Product Name: Inspiron 3135
Product Version:
Firmware Version: A02
!!Kernel Information
!!------------------
Kernel release: 3.18.2-2-ARCH Operating System: GNU/Linux Architecture: x86_64 Processor: unknown SMP Enabled: Yes
!!ALSA Version
!!------------
Driver version: k3.18.2-2-ARCH Library version: 1.0.28 Utilities version: 1.0.28
!!Loaded ALSA modules
!!-------------------
snd_hda_intelsnd_hda_intel
!!Sound Servers on this system
!!----------------------------
Jack:
Installed - Yes (/usr/bin/jackd)
Running - No
!!Soundcards recognised by ALSA
!!-----------------------------
0 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xf0240000 irq 37
1 [Generic_1 ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xf0244000 irq 38!!PCI Soundcards installed in the system
!!--------------------------------------
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Kabini HDMI/DP Audio 00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 02)
!!Advanced information - PCI Vendor/Device/Subsystem ID's !!-------------------------------------------------------
00:01.1 0403: 1002:9840
Subsystem: 1028:0614 -- 00:14.2 0403: 1022:780d (rev 02) Subsystem: 1028:0614
!!Modprobe options (Sound related)
!!--------------------------------
snd_hda_intel: model=auto
!!Loaded sound module options
!!---------------------------
!!Module: snd_hda_intel
align_buffer_size : -1 bdl_pos_adj : 32,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 beep_mode : 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 : 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 : -1 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 : -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 jackpoll_ms : 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 model : auto,(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) patch : (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) position_fix : -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 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 probe_only : 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 single_cmd : N snoop : Y
!!Module: snd_hda_intel
align_buffer_size : -1 bdl_pos_adj : 32,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 beep_mode : 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 : 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 : -1 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 : -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 jackpoll_ms : 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 model : auto,(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) patch : (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) position_fix : -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 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 probe_only : 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 single_cmd : N snoop : Y
!!HDA-Intel Codec information
!!---------------------------
--startcollapse--
Codec: ATI R6xx HDMI
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x1002aa01
Subsystem Id: 0x00aa0100
Revision Id: 0x100500
No Modem Function Group found
Default PCM:
rates [0x70]: 32000 44100 48000
bits [0x2]: 16
formats [0x1]: PCMDefault Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
Power states: D0 D3 CLKSTOP EPSS
Power: setting=D0, actual=D0, Clock-stop-OK
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x02 [Audio Output] wcaps 0x221: Stereo Digital Stripe
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
IEC Coding Type: 0x0
Node 0x03 [Pin Complex] wcaps 0x400381: Stereo Digital
Control: name="HDMI/DP,pcm=3 Jack", index=0, device=0
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="ELD", index=0, device=3
Pincap 0x00000094: OUT Detect HDMI
Pin Default 0x185600f0: [Jack] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x40: OUT
Unsolicited: tag=01, enabled=1
Connection: 1
0x02
Node 0x04 [Audio Output] wcaps 0x221: Stereo Digital Stripe
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
IEC Coding Type: 0x0
Node 0x05 [Pin Complex] wcaps 0x400381: Stereo Digital
Pincap 0x00000094: OUT Detect HDMI
Pin Default 0x585600f0: [N/A] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x40: OUT
Unsolicited: tag=00, enabled=0
Connection: 1
0x04
Node 0x06 [Audio Output] wcaps 0x221: Stereo Digital Stripe
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
IEC Coding Type: 0x0
Node 0x07 [Pin Complex] wcaps 0x400381: Stereo Digital
Pincap 0x00000094: OUT Detect HDMI
Pin Default 0x585600f0: [N/A] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x40: OUT
Unsolicited: tag=00, enabled=0
Connection: 1
0x06
Codec: Realtek ALC3223
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0283
Subsystem Id: 0x10280614
Revision Id: 0x100003
No Modem Function Group found
Default PCM:
N/A
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
Power: setting=UNKNOWN, actual=UNKNOWN, Error, Clock-stop-OK, Setting-reset
GPIO: io=255, o=255, i=255, unsolicited=1, wake=1
--endcollapse--
!!ALSA Device nodes
!!-----------------
crw-rw----+ 1 root audio 116, 2 Jan 16 00:27 /dev/snd/controlC0 crw-rw----+ 1 root audio 116, 5 Jan 16 00:27 /dev/snd/controlC1 crw-rw----+ 1 root audio 116, 4 Jan 16 00:27 /dev/snd/hwC0D0 crw-rw----+ 1 root audio 116, 8 Jan 16 00:27 /dev/snd/hwC1D0 crw-rw----+ 1 root audio 116, 3 Jan 16 00:27 /dev/snd/pcmC0D3p crw-rw----+ 1 root audio 116, 7 Jan 16 00:27 /dev/snd/pcmC1D0c crw-rw----+ 1 root audio 116, 6 Jan 18 18:21 /dev/snd/pcmC1D0p crw-rw----+ 1 root audio 116, 1 Jan 16 00:27 /dev/snd/seq
crw-rw----+ 1 root audio 116, 33 Jan 16 00:27 /dev/snd/timer
/dev/snd/by-path:
total 0
drwxr-xr-x 2 root root 80 Jan 16 00:27 .
drwxr-xr-x 3 root root 240 Jan 16 00:27 ..
lrwxrwxrwx 1 root root 12 Jan 16 00:27 pci-0000:00:01.1 -> ../controlC0 lrwxrwxrwx 1 root root 12 Jan 16 00:27 pci-0000:00:14.2 -> ../controlC1
!!Aplay/Arecord output
!!--------------------
APLAY
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC3223 Analog [ALC3223 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
ARECORD
**** List of CAPTURE Hardware Devices ****
card 1: Generic_1 [HD-Audio Generic], device 0: ALC3223 Analog [ALC3223 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
!!Amixer output
!!-------------
!!-------Mixer controls for card 0 [Generic]
Card hw:0 'Generic'/'HD-Audio Generic at 0xf0240000 irq 37'
Mixer name : 'ATI R6xx HDMI'
Components : 'HDA:1002aa01,00aa0100,00100500'
Controls : 7
Simple ctrls : 1
Simple mixer control 'IEC958',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
!!-------Mixer controls for card 1 [Generic_1]
Card hw:1 'Generic_1'/'HD-Audio Generic at 0xf0244000 irq 38'
Mixer name : 'Realtek ALC3223'
Components : 'HDA:10ec0283,10280614,00100003'
Controls : 25
Simple ctrls : 13
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined Playback channels: Mono
Limits: Playback 0 - 87
Mono: Playback 1 [1%] [-64.50dB] [on]
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 87
Mono:
Front Left: Playback 87 [100%] [0.00dB] [on]
Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Headphone 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 'Headphone 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 'Speaker',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 87
Mono:
Front Left: Playback 87 [100%] [0.00dB] [on]
Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'PCM',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 76 [30%] [-35.80dB]
Front Right: Playback 76 [30%] [-35.80dB]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 63
Front Left: Capture 39 [62%] [12.00dB] [on]
Front Right: Capture 39 [62%] [12.00dB] [on]
Simple mixer control 'Auto-Mute Mode',0
Capabilities: enum
Items: 'Disabled' 'Enabled'
Item0: 'Enabled'
Simple mixer control 'Digital',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 120
Front Left: Capture 60 [50%] [0.00dB]
Front Right: Capture 60 [50%] [0.00dB]
Simple mixer control 'Headset 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 'Headset 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 'Internal Mic',0
Capabilities: cswitch cswitch-joined cswitch-exclusive Capture exclusive group: 0
Capture channels: Mono
Mono: Capture [on]
Simple mixer control 'Internal 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]
!!Alsactl output
!!--------------
--startcollapse--
state.Generic {
control.1 {
iface CARD
name 'HDMI/DP,pcm=3 Jack'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.2 {
iface MIXER
name 'IEC958 Playback Con Mask'
value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
comment {
access read
type IEC958
count 1
}
}
control.3 {
iface MIXER
name 'IEC958 Playback Pro Mask'
value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
comment {
access read
type IEC958
count 1
}
}
control.4 {
iface MIXER
name 'IEC958 Playback Default'
value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
comment {
access 'read write'
type IEC958
count 1
}
}
control.5 {
iface MIXER
name 'IEC958 Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.6 {
iface PCM
device 3
name ELD
value ''
comment {
access 'read volatile'
type BYTES
count 0
}
}
control.7 {
iface PCM
device 3
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 write'
type INTEGER
count 8
range '0 - 36'
}
}
}
state.Generic_1 {
control.1 {
iface MIXER
name 'Headphone Playback Volume'
value.0 87
value.1 87
comment {
access 'read write'
type INTEGER
count 2
range '0 - 87'
dbmin -6525
dbmax 0
dbvalue.0 0
dbvalue.1 0
}
}
control.2 {
iface MIXER
name 'Headphone Playback Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.3 {
iface MIXER
name 'Speaker Playback Volume'
value.0 87
value.1 87
comment {
access 'read write'
type INTEGER
count 2
range '0 - 87'
dbmin -6525
dbmax 0
dbvalue.0 0
dbvalue.1 0
}
}
control.4 {
iface MIXER
name 'Speaker Playback Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.5 {
iface MIXER
name 'Headset 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.6 {
iface MIXER
name 'Headset Mic Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.7 {
iface MIXER
name 'Headphone 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.8 {
iface MIXER
name 'Headphone Mic Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.9 {
iface MIXER
name 'Auto-Mute Mode'
value Enabled
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Disabled
item.1 Enabled
}
}
control.10 {
iface MIXER
name 'Capture Source'
value 'Internal Mic'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'Headset Mic'
item.1 'Headphone Mic'
item.2 'Internal Mic'
}
}
control.11 {
iface MIXER
name 'Capture Volume'
value.0 39
value.1 39
comment {
access 'read write'
type INTEGER
count 2
range '0 - 63'
dbmin -1725
dbmax 3000
dbvalue.0 1200
dbvalue.1 1200
}
}
control.12 {
iface MIXER
name 'Capture Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.13 {
iface MIXER
name 'Headset Mic Boost Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 3'
dbmin 0
dbmax 3600
dbvalue.0 0
dbvalue.1 0
}
}
control.14 {
iface MIXER
name 'Headphone Mic Boost Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 3'
dbmin 0
dbmax 3600
dbvalue.0 0
dbvalue.1 0
}
}
control.15 {
iface MIXER
name 'Internal Mic Boost Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 3'
dbmin 0
dbmax 3600
dbvalue.0 0
dbvalue.1 0
}
}
control.16 {
iface MIXER
name 'Master Playback Volume'
value 1
comment {
access 'read write'
type INTEGER
count 1
range '0 - 87'
dbmin -6525
dbmax 0
dbvalue.0 -6450
}
}
control.17 {
iface MIXER
name 'Master Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.18 {
iface CARD
name 'Headset Mic Phantom Jack'
value true
comment {
access read
type BOOLEAN
count 1
}
}
control.19 {
iface CARD
name 'Headphone Mic Jack'
value true
comment {
access read
type BOOLEAN
count 1
}
}
control.20 {
iface CARD
name 'Internal Mic Phantom Jack'
value true
comment {
access read
type BOOLEAN
count 1
}
}
control.21 {
iface CARD
name 'Speaker Phantom Jack'
value true
comment {
access read
type BOOLEAN
count 1
}
}
control.22 {
iface PCM
name 'Playback Channel Map'
value.0 0
value.1 0
comment {
access read
type INTEGER
count 2
range '0 - 36'
}
}
control.23 {
iface PCM
name 'Capture Channel Map'
value.0 0
value.1 0
comment {
access read
type INTEGER
count 2
range '0 - 36'
}
}
control.24 {
iface MIXER
name 'PCM Playback Volume'
value.0 76
value.1 76
comment {
access 'read write user'
type INTEGER
count 2
range '0 - 255'
tlv '0000000100000008ffffec1400000014'
dbmin -5100
dbmax 0
dbvalue.0 -3580
dbvalue.1 -3580
}
}
control.25 {
iface MIXER
name 'Digital Capture Volume'
value.0 60
value.1 60
comment {
access 'read write user'
type INTEGER
count 2
range '0 - 120'
tlv '0000000100000008fffff44800000032'
dbmin -3000
dbmax 3000
dbvalue.0 0
dbvalue.1 0
}
}
}--endcollapse--
!!All Loaded Modules
!!------------------
Module
fuse
tun
zramlz4_compressnls_iso8859_1nls_cp437
vfat
fat
ecbamd_freq_sensitivitykvm_amd
kvm
arc4crct10dif_pclmulcrc32_pclmulghash_clmulni_intelaesni_intel
ath9kath9k_commonath9k_hwdell_wmi
uvcvideodell_led
radeonsparse_keymap
athaes_x86_64snd_hda_codec_realteksnd_hda_codec_genericsnd_hda_codec_hdmi
lrw
ath3kdell_laptop
mac80211videobuf2_vmallocvideobuf2_memopsvideobuf2_coresnd_hda_intelv4l2_commonsnd_hda_controllersnd_hda_codec
gf128mulglue_helper
btusb
dcdbas
ttmablk_helper
cfg80211
bluetooth
cryptddrm_kms_helpersnd_hwdep
videodev
psmouseserio_rawedac_coreedac_mce_amd
r8169
mii
pcspkr
ac
k10temp
rfkillfam15h_power
mediai2c_piix4snd_pcm
drmsnd_timer
hwmon
sndi2c_algo_biti2c_core
mousedev
evdevmac_hid
joydev
soundcore
shpchp
wmi
video
button
batteryacpi_cpufreq
processorsch_fq_codel
ext4
crc16
mbcache
jbd2dm_modhid_multitouchsd_modhid_generic
usbhid
hid
atkbd
libps2xhci_pci
ahcicrc32c_intelsdhci_pci
libahci
sdhciled_classehci_pciohci_pcixhci_hcd
libataohci_hcdehci_hcdmmc_core
usbcorescsi_modusb_common
i8042
serio
!!Sysfs Files
!!-----------
/sys/class/sound/hwC0D0/init_pin_configs:0x03 0x185600f00x05 0x585600f00x07 0x585600f0
/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:0x12 0x90a601300x14 0x901701100x17 0x400200080x18 0x411111f00x19 0x411111f00x1a 0x411111f00x1b 0x411111f00x1d 0x40e000010x1e 0x411111f00x21 0x0321101f
/sys/class/sound/hwC1D0/driver_pin_configs:0x19 0x01a1913c0x1a 0x01a1913d
/sys/class/sound/hwC1D0/user_pin_configs:
/sys/class/sound/hwC1D0/init_verbs:
/sys/class/sound/hwC1D0/hints:
!!ALSA/HDA dmesg
!!--------------
[ 18.870069] usbcore: registered new interface driver btusb [ 18.899520] snd_hda_intel 0000:00:01.1: irq 37 for MSI/MSI-X [ 18.899981] snd_hda_intel 0000:00:14.2: irq 38 for MSI/MSI-X [ 18.992246] r8169 0000:01:00.0 enp1s0: renamed from eth0 [ 19.008243] input: HD-Audio Generic HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.1/sound/card0/input13 [ 19.104079] sound hdaudioC1D0: autoconfig: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker [ 19.104095] sound hdaudioC1D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) [ 19.104104] sound hdaudioC1D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0) [ 19.104111] sound hdaudioC1D0: mono: mono_out=0x0 [ 19.104117] sound hdaudioC1D0: inputs: [ 19.104126] sound hdaudioC1D0: Headset Mic=0x19 [ 19.104133] sound hdaudioC1D0: Headphone Mic=0x1a [ 19.104140] sound hdaudioC1D0: Internal Mic=0x12 [ 19.231496] [drm] radeon kernel modesetting enabled. -- [ 19.897281] [drm] Connector 1: [ 19.897284] [drm] HDMI-A-1 [ 19.897287] [drm] HPD2 -- [ 20.087098] usb 1-2: new full-speed USB device number 4 using ohci-pci [ 20.207065] input: HD-Audio Generic Headphone Mic as /devices/pci0000:00/0000:00:14.2/sound/card1/input16 [ 20.762410] [drm] fb mappable at 0xE0990000 -- [229349.952769] traps: chromium[8855] general protection ip:7f85ab760aa2 sp:7fffc3048498 error:0 in ld-2.20.so[7f85ab748000+22000] [229361.738792] chromium[1429]: segfault at ffffffffffffff8d ip 00007f175e17dd32 sp 00007fffd8345518 error 7 in libasound.so.2.0.0[7f175e0d8000+f2000] [232932.980097] task1[557]: segfault at 40 ip 00007fc81fad1cc3 sp 00007fc81f285c48 error 4 in libasound.so.2.0.0[7fc81fa88000+f2000] [232968.499177] chromium[12598]: segfault at 159920 ip 00007ffa2ab72aa2 sp 00007fffc5cfac18 error 4 in ld-2.20.so[7ffa2ab5a000+22000] -- [237226.860497] chromium[18967]: segfault at 158150 ip 00007ffa2ab72aa2 sp 00007fffc5cfac18 error 4 in ld-2.20.so[7ffa2ab5a000+22000] [237245.122832] chromium[8887]: segfault at 14 ip 00007fe6b472b530 sp 00007fff619c8328 error 4 in libasound.so.2.0.0[7fe6b468a000+ef000]
Hi!
This is probably a driver/hardware problem. From the information you provided, the computer lost contact with the HDA analog codec (this is bad).
I had a similar problem a year ago, and after some trial-and-error, after disabling MSI I could no longer reproduce the problem.
You can edit /etc/modprobe.d/alsa-base.conf and add
options snd-hda-intel enable_msi=0
and then reboot. Does this help?
Quoted 105 lines · plcmn
Greetings everyone!
I'm sorry in advance for my poor English.
Unfortunately your bugtracker is down so I've had to send this bug report (or description, huh) here.
Alsa information about my system is in the attachments.I've came across this bug a few days ago, it appeared since I've installed alsa. Everytime when I try to quickly change the volume on Master channel the sound brakes: alsamixer hangs up and some music players (for example, Music on Console) play music by fits and starts (it's similar to watching hd video on a slow connection). Some music players, for example DeadBeeF, or browsers, such as Chromium work quite normal. I've searched forums, but I didn't come across anyone with a similar problem. So, I've decided to do a little research to find out what caused the problems. I've started with a simple script:
plcmn@equestria:~$ cat test.sh export i=0 while [ $i -lt 80 ] do amixer set Master $i% let i=$(($i+1)) doneHere are the results of the execution before the bug appears:
plcmn@equestria:~$ time ./test.sh real 0m0.743s user 0m0.350s sys 0m0.203sAnd this how it looks like when the bug comes out (I've just launched this script two times in a row):
plcmn@equestria~$ time test.shreal 4m41.763s
user 0m0.607s
sys 0m12.037sThat looked really weird, so I've tried to figure out what caused the problem. Checking the source with cppcheck didn't gave any results, except some memory leaks (like [
src/rawmidi/rawmidi_hw.c:304]: (error) Memory leak: hw), but none of them referred to my problem. So I've digged into the code and found out the line that caused the error:---
From
src/control/control_hw.c:
193 if (ioctl(hw->fd, SNDRV_CTL_IOCTL_ELEM_WRITE, control)< 0) {---
I'm a dummy in system programming, so I can't exactly tell what's the problem with this line (I know ioctl's purpose, but I don't what to do next -- a mess of macros and structures were hard for understanding, so I stopped at this point). The delay measured by
clock()fromtime.hwas about 0.18 ms here.Here is gdb's output for arguments passed to the problematic function:
Breakpoint 2,
snd_ctl_hw_elem_write(handle=<optimized out>, control=0x7fffffffd9e0) at control_hw.c:193
(gdb) n
194snd_ctl_hw_t*hw =handle->private_data;
(gdb) p handle
$2 = <optimized out>
(gdb) p control
$3 = (snd_ctl_elem_value_t*)0x7fffffffd9e0
(gdb) pcontrol->id
$4 = {numid = 16, iface = 2, device = 0, subdevice = 0,
name = "Master Playback Volume", '\000' <repeats 21 times>, index
= 0}
(gdb) pcontrol->indirect
$5 = 0
(gdb) pcontrol->reserved
$6 = '\000' <repeats 111 times>
(gdb) pcontrol->tstamp
$7 = {tv_sec= 0,tv_nsec= 0}
(gdb) pcontrol->value
$8 = {integer = {value = {70, 0 <repeats 127 times>},value_ptr=0x46}, integer64 = {value = {70, 0 <repeats 63 times>},value_ptr=0x46}, enumerated = {item = {70, 0 <repeats 127 times>},item_ptr = 0x46}, bytes = {data = "F", '\000' <repeats 510 times>, data_ptr = 0x46 <error: Cannot access memory at address 0x46>}, iec958 = {status = "F", '\000' <repeats 22 times>, subcode = '\000' <repeats 146 times>, pad = 0 '\000',
dig_subframe= "\000\000\000"}}For some reason this function is called twice, the second call doesn't cause such a delay.
I can provide any information you'll need.
I hope that my report will be useful.
Sorry again for my poor English and sending a bug report to dev mail lists._______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Signature · 2 lines
David Henningsson, Canonical Ltd. https://launchpad.net/~diwic