[alsa-devel] Intel HDA audio on EEE PC 1101HGo
Enrico Mioso
mrkiko.rs at gmail.com
Fri Jan 13 20:42:06 CET 2017
Hello guys.
I finally can report some interesting news.
Now audio stopped working - still, the system didn't panic. So I consider this a good good point.
My system is alive and I can keep it alive indefinitely, clearly if hardware doesn't break and/or other events out of my control cause an interruption.
In my dmesg, the following messages started to appear:
snd_hda_intel 0000:00:1b.0: azx_get_response timeout, switching to polling mode: last cmd=0x020c0000
snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
And they appear apparently when the driver tries to send new commands to the device, but this is only my impression.
Let me know what I could do to report on what's happening. My system is acually running with kdump active, so in case I may also invoke the crash sysrq action and send back results.
sending alsa-info as attachment.
Thank you for everything guys, and forthe patience.
thank you Takashi.
On Thu, 12 Jan 2017, Takashi Iwai wrote:
> Date: Thu, 12 Jan 2017 17:20:57
> From: Takashi Iwai <tiwai at suse.de>
> To: Enrico Mioso <mrkiko.rs at gmail.com>
> Cc: hui.wang at canonical.com, alsa-devel at alsa-project.org, kailang at realtek.com
> Subject: Re: [alsa-devel] Intel HDA audio on EEE PC 1101HGo
>
> On Thu, 12 Jan 2017 17:10:31 +0100,
> Enrico Mioso wrote:
>>
>> Sometimes it's my impression the beep is not emitted. but I may be wrong. If I determine it, I'll report back.
>> But the system is stable so far, and I can't find other messages in the dmesg.
>
> OK, thanks. The hackish patch can't be kept / merged to the upstream
> code, of course. Instead, try the patch below and pass single_cmd=0
> option. This will disallow fallback like the hack patch.
>
>
> Takashi
>
> -- 8< --
> From: Takashi Iwai <tiwai at suse.de>
> Subject: [PATCH] ALSA: hda - Make single_cmd option to stop the fallback
> mechanism
>
> HD-audio driver has a mechanism to fall back to the single cmd mode as
> a last resort if the CORB/RIRB communication goes wrong even after
> switching to the polling mode. The switching has worked in the past
> well, but Enrico Mioso reported that his system crashes when this
> happens.
>
> Although the actual cause of the crash isn't still fully analyzed yet,
> it'd be in anyway good to provide an option to turn off the fallback
> mode. Now this patch extends the behavior of the existing single_cmd
> option for that. Namely,
>
> - The option is changed from bool to bint.
> - As default, it is the mode allowing the fallback to single cmd.
> - Once when either true/false value is given to the option, the driver
> explicitly turns on/off the single cmd mode, but without the
> fallback.
>
> That is, if you want to disable the fallback, just pass single_cmd=0
> option. Passing single_cmd=1 will keep working like before.
>
> Signed-off-by: Takashi Iwai <tiwai at suse.de>
> ---
> sound/pci/hda/hda_controller.c | 4 ++++
> sound/pci/hda/hda_controller.h | 1 +
> sound/pci/hda/hda_intel.c | 10 +++++++---
> 3 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
> index 500878556578..3715a5725613 100644
> --- a/sound/pci/hda/hda_controller.c
> +++ b/sound/pci/hda/hda_controller.c
> @@ -861,6 +861,10 @@ static int azx_rirb_get_response(struct hdac_bus *bus, unsigned int addr,
> return -EIO;
> }
>
> + /* no fallback mechanism? */
> + if (!chip->fallback_to_single_cmd)
> + return -EIO;
> +
> /* a fatal communication error; need either to reset or to fallback
> * to the single_cmd mode
> */
> diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h
> index a50e0532622a..35a9ab2cac46 100644
> --- a/sound/pci/hda/hda_controller.h
> +++ b/sound/pci/hda/hda_controller.h
> @@ -150,6 +150,7 @@ struct azx {
> int bdl_pos_adj;
> int poll_count;
> unsigned int running:1;
> + unsigned int fallback_to_single_cmd:1;
> unsigned int single_cmd:1;
> unsigned int polling_mode:1;
> unsigned int msi:1;
> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index 2587c197e353..faf99cc71277 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -128,7 +128,7 @@ static int bdl_pos_adj[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
> static int probe_mask[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
> static int probe_only[SNDRV_CARDS];
> static int jackpoll_ms[SNDRV_CARDS];
> -static bool single_cmd;
> +static int single_cmd = -1;
> static int enable_msi = -1;
> #ifdef CONFIG_SND_HDA_PATCH_LOADER
> static char *patch[SNDRV_CARDS];
> @@ -157,7 +157,7 @@ module_param_array(probe_only, int, NULL, 0444);
> MODULE_PARM_DESC(probe_only, "Only probing and no codec initialization.");
> module_param_array(jackpoll_ms, int, NULL, 0444);
> MODULE_PARM_DESC(jackpoll_ms, "Ms between polling for jack events (default = 0, using unsol events only)");
> -module_param(single_cmd, bool, 0444);
> +module_param(single_cmd, bint, 0444);
> MODULE_PARM_DESC(single_cmd, "Use single command to communicate with codecs "
> "(for debugging only).");
> module_param(enable_msi, bint, 0444);
> @@ -1596,7 +1596,11 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci,
>
> check_probe_mask(chip, dev);
>
> - chip->single_cmd = single_cmd;
> + if (single_cmd < 0) /* allow fallback to single_cmd at errors */
> + chip->fallback_to_single_cmd = 1;
> + else /* explicitly set to single_cmd or not */
> + chip->single_cmd = single_cmd;
> +
> azx_check_snoop_available(chip);
>
> if (bdl_pos_adj[dev] < 0)
> --
> 2.11.0
>
>
-------------- next part --------------
upload=true&script=true&cardinfo=
!!################################
!!ALSA Information Script v 0.4.64
!!################################
!!Script ran on: Fri Jan 13 19:39:15 UTC 2017
!!Linux Distribution
!!------------------
Arch Linux \r (\l) NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch ID_LIKE=archlinux HOME_URL="https://www.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://bugs.archlinux.org/"
!!DMI Information
!!---------------
Manufacturer: ASUSTeK Computer INC.
Product Name: 1101HAG
Product Version: x.x
Firmware Version: 0106
!!Kernel Information
!!------------------
Kernel release: 4.10.0-rc3ho+
Operating System: GNU/Linux
Architecture: i686
Processor: unknown
SMP Enabled: Yes
!!ALSA Version
!!------------
Driver version: k4.10.0-rc3ho+
Library version: 1.1.3
Utilities version: 1.1.3
!!Loaded ALSA modules
!!-------------------
snd_hda_intel
!!Sound Servers on this system
!!----------------------------
Jack:
Installed - Yes (/usr/bin/jackd)
Running - No
!!Soundcards recognised by ALSA
!!-----------------------------
0 [MID ]: HDA-Intel - HDA Intel MID
HDA Intel MID at 0xf3f38000 irq 23
!!PCI Soundcards installed in the system
!!--------------------------------------
00:1b.0 Audio device: Intel Corporation System Controller Hub (SCH Poulsbo) HD Audio Controller (rev 07)
!!Advanced information - PCI Vendor/Device/Subsystem ID's
!!-------------------------------------------------------
00:1b.0 0403: 8086:811b (rev 07)
Subsystem: 1043:83ce
!!Modprobe options (Sound related)
!!--------------------------------
snd_hda_intel: single_cmd=0
!!Loaded sound module options
!!---------------------------
!!Module: snd_hda_intel
align_buffer_size : -1
bdl_pos_adj : -1,-1,-1,-1,-1,-1,-1,-1
beep_mode : Y,Y,Y,Y,Y,Y,Y,Y
enable : Y,Y,Y,Y,Y,Y,Y,Y
enable_msi : -1
id : (null),(null),(null),(null),(null),(null),(null),(null)
index : -1,-1,-1,-1,-1,-1,-1,-1
jackpoll_ms : 0,0,0,0,0,0,0,0
model : (null),(null),(null),(null),(null),(null),(null),(null)
position_fix : -1,-1,-1,-1,-1,-1,-1,-1
power_save : 40
power_save_controller : Y
probe_mask : -1,-1,-1,-1,-1,-1,-1,-1
probe_only : 0,0,0,0,0,0,0,0
single_cmd : N
snoop : -1
!!HDA-Intel Codec information
!!---------------------------
--startcollapse--
Codec: Realtek ALC269
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0269
Subsystem Id: 0x104383ce
Revision Id: 0x100004
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
Invalid AFG subtree
--endcollapse--
!!ALSA Device nodes
!!-----------------
crw-rw----+ 1 root audio 116, 0 Jan 12 12:21 /dev/snd/controlC0
crw-rw----+ 1 root audio 116, 24 Jan 12 12:21 /dev/snd/pcmC0D0c
crw-rw----+ 1 root audio 116, 16 Jan 13 19:30 /dev/snd/pcmC0D0p
crw-rw----+ 1 root audio 116, 1 Jan 12 12:21 /dev/snd/seq
crw-rw----+ 1 root audio 116, 33 Jan 12 12:21 /dev/snd/timer
/dev/snd/by-path:
total 0
drwxr-xr-x 2 root root 60 Jan 12 12:21 .
drwxr-xr-x 3 root root 160 Jan 12 12:21 ..
lrwxrwxrwx 1 root root 12 Jan 12 12:21 pci-0000:00:1b.0 -> ../controlC0
!!Aplay/Arecord output
!!--------------------
APLAY
**** List of PLAYBACK Hardware Devices ****
card 0: MID [HDA Intel MID], device 0: ALC269 Analog [ALC269 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
ARECORD
**** List of CAPTURE Hardware Devices ****
card 0: MID [HDA Intel MID], device 0: ALC269 Analog [ALC269 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
!!Amixer output
!!-------------
!!-------Mixer controls for card 0 [MID]
Card hw:0 'MID'/'HDA Intel MID at 0xf3f38000 irq 23'
Mixer name : 'Realtek ALC269'
Components : 'HDA:10ec0269,104383ce,00100004'
Controls : 23
Simple ctrls : 11
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 64
Mono: Playback 43 [67%] [-21.00dB] [on]
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 64
Mono:
Front Left: Playback 64 [100%] [1.00dB] [on]
Front Right: Playback 64 [100%] [1.00dB] [on]
Simple mixer control 'Speaker',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 64
Mono:
Front Left: Playback 64 [100%] [1.00dB] [on]
Front Right: Playback 64 [100%] [1.00dB] [on]
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 'Mic',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 0 [0%] [-34.50dB] [off]
Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control '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 'Beep',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 19 [61%] [-6.00dB] [on]
Front Right: Playback 19 [61%] [-6.00dB] [on]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 46
Front Left: Capture 29 [63%] [12.00dB] [on]
Front Right: Capture 29 [63%] [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 'Loopback Mixing',0
Capabilities: enum
Items: 'Disabled' 'Enabled'
Item0: 'Enabled'
!!Alsactl output
!!--------------
--startcollapse--
state.MID {
control.1 {
iface MIXER
name 'Headphone Playback Volume'
value.0 64
value.1 64
comment {
access 'read write'
type INTEGER
count 2
range '0 - 64'
dbmin -6300
dbmax 100
dbvalue.0 100
dbvalue.1 100
}
}
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 64
value.1 64
comment {
access 'read write'
type INTEGER
count 2
range '0 - 64'
dbmin -6300
dbmax 100
dbvalue.0 100
dbvalue.1 100
}
}
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 'Loopback Mixing'
value Enabled
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Disabled
item.1 Enabled
}
}
control.6 {
iface MIXER
name '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.7 {
iface MIXER
name 'Mic Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.8 {
iface MIXER
name 'Auto-Mute Mode'
value Enabled
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Disabled
item.1 Enabled
}
}
control.9 {
iface MIXER
name 'Capture Volume'
value.0 29
value.1 29
comment {
access 'read write'
type INTEGER
count 2
range '0 - 46'
dbmin -1700
dbmax 2900
dbvalue.0 1200
dbvalue.1 1200
}
}
control.10 {
iface MIXER
name 'Capture Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.11 {
iface MIXER
name 'Mic Boost Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 3'
dbmin 0
dbmax 3000
dbvalue.0 0
dbvalue.1 0
}
}
control.12 {
iface MIXER
name 'Master Playback Volume'
value 43
comment {
access 'read write'
type INTEGER
count 1
range '0 - 64'
dbmin -6400
dbmax 0
dbvalue.0 -2100
}
}
control.13 {
iface MIXER
name 'Master Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.14 {
iface CARD
name 'Mic Jack'
value true
comment {
access read
type BOOLEAN
count 1
}
}
control.15 {
iface CARD
name 'Internal Mic Phantom Jack'
value true
comment {
access read
type BOOLEAN
count 1
}
}
control.16 {
iface CARD
name 'Headphone Jack'
value true
comment {
access read
type BOOLEAN
count 1
}
}
control.17 {
iface CARD
name 'Speaker Phantom Jack'
value true
comment {
access read
type BOOLEAN
count 1
}
}
control.18 {
iface MIXER
name 'Beep Playback Volume'
value.0 19
value.1 19
comment {
access 'read write'
type INTEGER
count 2
range '0 - 31'
dbmin -3450
dbmax 1200
dbvalue.0 -600
dbvalue.1 -600
}
}
control.19 {
iface MIXER
name 'Beep Playback Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.20 {
iface PCM
name 'Playback Channel Map'
value.0 0
value.1 0
comment {
access read
type INTEGER
count 2
range '0 - 36'
}
}
control.21 {
iface PCM
name 'Capture Channel Map'
value.0 0
value.1 0
comment {
access read
type INTEGER
count 2
range '0 - 36'
}
}
control.22 {
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
}
}
control.23 {
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
af_packet
arc4
ath9k
ath9k_common
ath9k_hw
mac80211
bnep
coretemp
kvm_intel
snd_hda_codec_realtek
kvm
ath
uvcvideo
snd_hda_codec_generic
snd_hda_intel
snd_hda_codec
cfg80211
videobuf2_vmalloc
videobuf2_memops
asus_wmi
atkbd
videobuf2_v4l2
input_leds
libps2
videobuf2_core
hwmon
snd_hda_core
sparse_keymap
videodev
option
led_class
uas
usb_wwan
usbserial
snd_pcm
irqbypass
usb_storage
media
btusb
snd_timer
snd
btbcm
i2c_core
atl1c
hid_apple
lpc_sch
btintel
mfd_core
thermal
wmi
i8042
evdev
video
acpi_cpufreq
soundcore
serio
processor
backlight
rfcomm
bluetooth
rfkill
ip_tables
x_tables
sha1_generic
ipv6
autofs4
!!ALSA/HDA dmesg
!!--------------
[ 18.031384] USB Video Class driver (1.1.1)
[ 18.054976] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC269: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[ 18.067358] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 18.080055] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x15/0x0/0x0/0x0/0x0)
[ 18.092172] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 18.104042] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 18.147300] snd_hda_codec_realtek hdaudioC0D0: Mic=0x18
[ 18.191065] snd_hda_codec_realtek hdaudioC0D0: Internal Mic=0x12
[ 18.247499] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card0/input8
[ 18.285601] input: HDA Intel MID Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9
[ 18.310620] input: HDA Intel MID Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
[ 19.717219] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
--
[ 5242.552595] EXT4-fs (sda1): re-mounted. Opts: nobarrier,noauto_da_alloc
[ 5379.300565] snd_hda_intel 0000:00:1b.0: Invalid position buffer, using LPIB read method instead.
[ 5432.748768] EXT4-fs (sda1): re-mounted. Opts: nobarrier,noauto_da_alloc
--
[33317.356471] fuse init (API version 7.26)
[111870.510091] snd_hda_intel 0000:00:1b.0: azx_get_response timeout, switching to polling mode: last cmd=0x020c0000
[112013.020094] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
[112016.027100] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
[112137.588099] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
[112140.594099] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
[114687.722113] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
[114690.732105] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
[115929.461096] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
[115932.471089] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
[116117.440096] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
[116120.458094] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
[116291.707103] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
[116294.717094] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x1f0e00. -5
More information about the Alsa-devel
mailing list