[alsa-devel] snd_hda_intel: live-reconfiguring codec possible while in use?

Dominique Bureau dbureau at gmail.com
Wed Feb 21 22:10:04 CET 2018


Hi,

I'm trying to figure out if there would be any sane way to perform codec
reconfiguration live, without requiring to stop/disconnect all running
applications. Currently, sound/pci/hda/hda_codec.c: snd_hda_codec_reset()
doesn't allow to be called while the device is in use (returns -EBUSY). I'm
looking for some advice before digging further.


We're currently in the final phase of a product design and noticed some
audio instability when the system is subjected to ESD. The issue seems to
be that the codec (Realtek ALC892) falls in an unknown state and stops
communicating properly with the audio controller (Intel Sunrise Point-H HD
Audio, as reported by lspci).

Whenever this happens, all capture device buffers and pointers from in
/proc/asound/card0/pcm0c/sub0/status fall to 0 like so:
-----------------------
state: RUNNING
owner_pid   : 1384
trigger_time: 104807.286533210
tstamp      : 104807.292766671
delay       : 0
avail       : 0
avail_max   : 0
-----
hw_ptr      : 0
appl_ptr    : 0
-----------------------

Reloading snd_hda_intel or reconfiguring the codec (using
CONFIG_SND_HDA_RECONFIG' /sys/class/sound/hwC0D1/reconfig) brings it back
on its feet, but this requires stopping all applications.

Kernel is 4.9.61, and we are using jackd version 0.125.0.


If anyone has any pointers about this, I'm all ears!

Thanks,
Dominique Bureau


More information about the Alsa-devel mailing list