mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 17:12:06 +00:00
ASoC: Fix WM8753 DAIs unregistering
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>
This commit is contained in:
parent
bf3dbe5c8c
commit
31b59cf9ce
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user