aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8753.c
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2009-02-15 18:49:41 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-02-17 09:29:54 -0500
commit31b59cf9cebb5bb675f49fe44814bbb7270374cc (patch)
treed2118bf757e2f54fe4c0e848bf02558c54d30a19 /sound/soc/codecs/wm8753.c
parentbf3dbe5c8c4b85f98c36d35432efa6573b75e6d3 (diff)
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>
Diffstat (limited to 'sound/soc/codecs/wm8753.c')
-rw-r--r--sound/soc/codecs/wm8753.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 6f9e6beabb14..dc6042c6424f 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)
1451 if (mode < 4) { 1451 if (mode < 4) {
1452 int playback_active, capture_active, codec_active, pop_wait; 1452 int playback_active, capture_active, codec_active, pop_wait;
1453 void *private_data; 1453 void *private_data;
1454 struct list_head list;
1454 1455
1455 playback_active = wm8753_dai[0].playback.active; 1456 playback_active = wm8753_dai[0].playback.active;
1456 capture_active = wm8753_dai[0].capture.active; 1457 capture_active = wm8753_dai[0].capture.active;
1457 codec_active = wm8753_dai[0].active; 1458 codec_active = wm8753_dai[0].active;
1458 private_data = wm8753_dai[0].private_data; 1459 private_data = wm8753_dai[0].private_data;
1459 pop_wait = wm8753_dai[0].pop_wait; 1460 pop_wait = wm8753_dai[0].pop_wait;
1461 list = wm8753_dai[0].list;
1460 wm8753_dai[0] = wm8753_all_dai[mode << 1]; 1462 wm8753_dai[0] = wm8753_all_dai[mode << 1];
1461 wm8753_dai[0].playback.active = playback_active; 1463 wm8753_dai[0].playback.active = playback_active;
1462 wm8753_dai[0].capture.active = capture_active; 1464 wm8753_dai[0].capture.active = capture_active;
1463 wm8753_dai[0].active = codec_active; 1465 wm8753_dai[0].active = codec_active;
1464 wm8753_dai[0].private_data = private_data; 1466 wm8753_dai[0].private_data = private_data;
1465 wm8753_dai[0].pop_wait = pop_wait; 1467 wm8753_dai[0].pop_wait = pop_wait;
1468 wm8753_dai[0].list = list;
1466 1469
1467 playback_active = wm8753_dai[1].playback.active; 1470 playback_active = wm8753_dai[1].playback.active;
1468 capture_active = wm8753_dai[1].capture.active; 1471 capture_active = wm8753_dai[1].capture.active;
1469 codec_active = wm8753_dai[1].active; 1472 codec_active = wm8753_dai[1].active;
1470 private_data = wm8753_dai[1].private_data; 1473 private_data = wm8753_dai[1].private_data;
1471 pop_wait = wm8753_dai[1].pop_wait; 1474 pop_wait = wm8753_dai[1].pop_wait;
1475 list = wm8753_dai[1].list;
1472 wm8753_dai[1] = wm8753_all_dai[(mode << 1) + 1]; 1476 wm8753_dai[1] = wm8753_all_dai[(mode << 1) + 1];
1473 wm8753_dai[1].playback.active = playback_active; 1477 wm8753_dai[1].playback.active = playback_active;
1474 wm8753_dai[1].capture.active = capture_active; 1478 wm8753_dai[1].capture.active = capture_active;
1475 wm8753_dai[1].active = codec_active; 1479 wm8753_dai[1].active = codec_active;
1476 wm8753_dai[1].private_data = private_data; 1480 wm8753_dai[1].private_data = private_data;
1477 wm8753_dai[1].pop_wait = pop_wait; 1481 wm8753_dai[1].pop_wait = pop_wait;
1482 wm8753_dai[1].list = list;
1478 } 1483 }
1479 wm8753_dai[0].codec = codec; 1484 wm8753_dai[0].codec = codec;
1480 wm8753_dai[1].codec = codec; 1485 wm8753_dai[1].codec = codec;