Skip to content

Commit

Permalink
Merge series "ALSA: hda: export snd_hda_codec_cleanup()" from Kai Veh…
Browse files Browse the repository at this point in the history
…manen <kai.vehmanen@linux.intel.com>:

Hi,

this small series is preparation for a set of bugfix ASoC patches
addressing a memleak at module unload for the HDA codec wrapper.
Instead of duplicating HDA code in ASoC tree, I chose to export
more functionality from hda_codec.c so it can be (re)used in ASoC's
hdac_hda.c.

Full series:
https://github.com/thesofproject/linux/pull/2252

Takashi and Mark, feedback is welcome on how to best handle this
kind of series where I have dependent patches both in sound/pci/hda
and in ASoC. For this series, I'm sending the patches separately
and when/if first set is merged by Takashi, I'll route the ASoC
patches via our usually SOF set to Mark.

Kai Vehmanen (2):
  ALSA: hda: export snd_hda_codec_cleanup_for_unbind()
  ALSA: hda: fix snd_hda_codec_cleanup() documentation

 include/sound/hda_codec.h | 2 ++
 sound/pci/hda/hda_codec.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

--
2.27.0
  • Loading branch information
Mark Brown committed Jul 16, 2020
2 parents 5f52d4d + 95ce82a commit 94c3a83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/sound/hda_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,8 @@ __printf(2, 3)
struct hda_pcm *snd_hda_codec_pcm_new(struct hda_codec *codec,
const char *fmt, ...);

void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec);

static inline void snd_hda_codec_pcm_get(struct hda_pcm *pcm)
{
kref_get(&pcm->kref);
Expand Down
3 changes: 2 additions & 1 deletion sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec)
remove_conn_list(codec);
snd_hdac_regmap_exit(&codec->core);
}
EXPORT_SYMBOL_GPL(snd_hda_codec_cleanup_for_unbind);

static unsigned int hda_set_power_state(struct hda_codec *codec,
unsigned int power_state);
Expand Down Expand Up @@ -3178,7 +3179,7 @@ int snd_hda_codec_prepare(struct hda_codec *codec,
EXPORT_SYMBOL_GPL(snd_hda_codec_prepare);

/**
* snd_hda_codec_cleanup - Prepare a stream
* snd_hda_codec_cleanup - Clean up stream resources
* @codec: the HDA codec
* @hinfo: PCM information
* @substream: PCM substream
Expand Down

0 comments on commit 94c3a83

Please sign in to comment.