[alsa-devel] [PATCH 0/7] ASoC: Cleanup AC'97 reset handling

Lars-Peter Clausen lars at metafoo.de
Tue Jul 21 21:52:59 CEST 2015


AC'97 devices require that they are properly reset before they can be used.
Currently ASoC drivers do this by hand each on its own. This lead to many
similar but slightly different implementations. E.g. Some supporting warm
reset, some don't. And even though AC'97 do have a device ID which uniquely
identifies a device most drivers only use the content of register 0 for
device verification.

This patch series introduces a new generic helper function in the ALSA
AC'97 core that can be used to reset a device and verify its ID if
required. And then converts drivers to use this new helper function instead
of custom code.

snd_soc_new_ac97_codec() is extended to be able to perform a reset between
the allocation and registration of the AC'97 device, this will allow more
drivers to use it.

- Lars

Lars-Peter Clausen (7):
  ALSA: ac97: Add helper function to reset the AC97 device
  ASoC: ac97: Add support for resetting device before registration
  ASoC: ad1980: Use core AC'97 reset helper
  ASoC: stac9766: Use core reset helper
  ASoC: wm9705: Use core AC'97 reset helper
  ASoC: wm9712: Use core AC'97 reset helper
  ASoC: wm9713: Use core AC'97 reset helper

 include/sound/ac97_codec.h  |  2 ++
 include/sound/soc.h         |  3 ++-
 sound/ac97_bus.c            | 62 +++++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/ad1980.c   | 36 +++++++++-----------------
 sound/soc/codecs/stac9766.c | 57 +++++------------------------------------
 sound/soc/codecs/wm9705.c   | 40 ++++++-----------------------
 sound/soc/codecs/wm9712.c   | 45 ++++++--------------------------
 sound/soc/codecs/wm9713.c   | 48 ++++++-----------------------------
 sound/soc/codecs/wm9713.h   |  2 --
 sound/soc/soc-ac97.c        | 30 ++++++++++++++++++----
 10 files changed, 134 insertions(+), 191 deletions(-)

-- 
2.1.4



More information about the Alsa-devel mailing list