All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Paul Fertser <fercerpav@gmail.com>,
	alsa-devel@alsa-project.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 02/11] ASoC: Fix WM8753 DAIs unregistering
Date: Wed, 18 Feb 2009 12:02:24 +0000	[thread overview]
Message-ID: <1234958553-16049-2-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20090218120135.GA15414@sirena.org.uk>

From: Paul Fertser <fercerpav@gmail.com>

WM8753 uses a tricky way to switch DAIs "on the fly", for that it
registers 2 dummy DAIs and substitutes them depending on mixer control.

List element of registered dummy DAIs should be preserved to allow
unregistering of DAIs on module unload.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm8753.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 6f9e6be..dc6042c 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1451,30 +1451,35 @@ static void wm8753_set_dai_mode(struct snd_soc_codec *codec, unsigned int mode)
 	if (mode < 4) {
 		int playback_active, capture_active, codec_active, pop_wait;
 		void *private_data;
+		struct list_head list;
 
 		playback_active = wm8753_dai[0].playback.active;
 		capture_active = wm8753_dai[0].capture.active;
 		codec_active = wm8753_dai[0].active;
 		private_data = wm8753_dai[0].private_data;
 		pop_wait = wm8753_dai[0].pop_wait;
+		list = wm8753_dai[0].list;
 		wm8753_dai[0] = wm8753_all_dai[mode << 1];
 		wm8753_dai[0].playback.active = playback_active;
 		wm8753_dai[0].capture.active = capture_active;
 		wm8753_dai[0].active = codec_active;
 		wm8753_dai[0].private_data = private_data;
 		wm8753_dai[0].pop_wait = pop_wait;
+		wm8753_dai[0].list = list;
 
 		playback_active = wm8753_dai[1].playback.active;
 		capture_active = wm8753_dai[1].capture.active;
 		codec_active = wm8753_dai[1].active;
 		private_data = wm8753_dai[1].private_data;
 		pop_wait = wm8753_dai[1].pop_wait;
+		list = wm8753_dai[1].list;
 		wm8753_dai[1] = wm8753_all_dai[(mode << 1) + 1];
 		wm8753_dai[1].playback.active = playback_active;
 		wm8753_dai[1].capture.active = capture_active;
 		wm8753_dai[1].active = codec_active;
 		wm8753_dai[1].private_data = private_data;
 		wm8753_dai[1].pop_wait = pop_wait;
+		wm8753_dai[1].list = list;
 	}
 	wm8753_dai[0].codec = codec;
 	wm8753_dai[1].codec = codec;
-- 
1.5.6.3

  parent reply	other threads:[~2009-02-18 12:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-18 12:01 ASoC updates for 2.6.30 Mark Brown
2009-02-18 12:02 ` [PATCH 01/11] ASoC: Fix DaVinci module unload error Mark Brown
2009-02-18 12:02 ` Mark Brown [this message]
2009-02-18 12:02 ` [PATCH 03/11] ASoC: Remove version display from the WM8731 driver Mark Brown
2009-02-18 12:02 ` [PATCH 04/11] ASoC: Clean up WM8731 bias level configuration Mark Brown
2009-02-18 12:02 ` [PATCH 05/11] ASoC: Improve diagnostics for AT91SAM9G20-EK probe Mark Brown
2009-02-18 12:02 ` [PATCH 06/11] ASoC: Check machine type before loading on AT91SAM9G20-EK Mark Brown
2009-02-18 12:02 ` [PATCH 07/11] ASoC: Actively manage MCLK for AT91SAM9G20-EK Mark Brown
2009-02-18 12:02 ` [PATCH 08/11] ASoC: Rename AT91SAMG20-EK for applications Mark Brown
2009-02-18 12:02 ` [PATCH 09/11] ASoC: Shuffle WM8731 SPI and I2C device registration Mark Brown
2009-02-18 12:02 ` [PATCH 10/11] ASoC: Refactor WM8731 " Mark Brown
2009-02-18 12:02 ` [PATCH 11/11] ASoC: Remove version display from the WM8753 driver Mark Brown
2009-02-18 12:18 ` ASoC updates for 2.6.30 Takashi Iwai
2009-02-18 12:22   ` Takashi Iwai
2009-02-18 12:27     ` Takashi Iwai
2009-02-18 12:37       ` Mark Brown
2009-02-18 12:44         ` Takashi Iwai
2009-02-18 12:29     ` Mark Brown
2009-02-18 12:31       ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1234958553-16049-2-git-send-email-broonie@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=fercerpav@gmail.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.