aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>2012-03-05 11:05:12 -0500
committerTony Lindgren <tony@atomide.com>2012-03-05 14:25:34 -0500
commit0379c1f55b734d9d112f535e12f4508b90a1bab1 (patch)
tree91fa87d36cb93868bc05b7e05e4f6af86c1d0fec /sound
parentaabf31737a6a5eb0c4d73857409cd5bcc914d5f5 (diff)
ASoC: OMAP: ams-delta: drop .set_bias_level callback
This functionality has already been implemented in the cx20442 codec driver (commit f75a8ff67d161b5166a2c2360bb2ffaefd5eb853, "ASoC: cx20442: add bias control over a platform provided regulator"), no need to keep it here duplicated. Once done, remove the no longer used AMS_DELTA_LATCH2_MODEM_NRESET symbol from the board header file and a call to the regulator_toggle() helper function from the old API wrapper found in the board file. While being at it, simplify the way the modem .pm callback handles the regulator and drop that helper function and its related consumer setup completely. Depends on patches 1/3 and 2/3 for clean apply and keep things working. Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/omap/ams-delta.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c
index da6e005c1c41..f610260065ba 100644
--- a/sound/soc/omap/ams-delta.c
+++ b/sound/soc/omap/ams-delta.c
@@ -426,29 +426,6 @@ static struct snd_soc_ops ams_delta_ops = {
426}; 426};
427 427
428 428
429/* Board specific codec bias level control */
430static int ams_delta_set_bias_level(struct snd_soc_card *card,
431 struct snd_soc_dapm_context *dapm,
432 enum snd_soc_bias_level level)
433{
434 switch (level) {
435 case SND_SOC_BIAS_ON:
436 case SND_SOC_BIAS_PREPARE:
437 case SND_SOC_BIAS_STANDBY:
438 if (card->dapm.bias_level == SND_SOC_BIAS_OFF)
439 ams_delta_latch2_write(AMS_DELTA_LATCH2_MODEM_NRESET,
440 AMS_DELTA_LATCH2_MODEM_NRESET);
441 break;
442 case SND_SOC_BIAS_OFF:
443 if (card->dapm.bias_level != SND_SOC_BIAS_OFF)
444 ams_delta_latch2_write(AMS_DELTA_LATCH2_MODEM_NRESET,
445 0);
446 }
447 card->dapm.bias_level = level;
448
449 return 0;
450}
451
452/* Digital mute implemented using modem/CPU multiplexer. 429/* Digital mute implemented using modem/CPU multiplexer.
453 * Shares hardware with codec config pulse generation */ 430 * Shares hardware with codec config pulse generation */
454static bool ams_delta_muted = 1; 431static bool ams_delta_muted = 1;
@@ -512,9 +489,6 @@ static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd)
512 ams_delta_ops.shutdown = ams_delta_shutdown; 489 ams_delta_ops.shutdown = ams_delta_shutdown;
513 } 490 }
514 491
515 /* Set codec bias level */
516 ams_delta_set_bias_level(card, dapm, SND_SOC_BIAS_STANDBY);
517
518 /* Add hook switch - can be used to control the codec from userspace 492 /* Add hook switch - can be used to control the codec from userspace
519 * even if line discipline fails */ 493 * even if line discipline fails */
520 ret = snd_soc_jack_new(rtd->codec, "hook_switch", 494 ret = snd_soc_jack_new(rtd->codec, "hook_switch",
@@ -598,7 +572,6 @@ static struct snd_soc_card ams_delta_audio_card = {
598 .owner = THIS_MODULE, 572 .owner = THIS_MODULE,
599 .dai_link = &ams_delta_dai_link, 573 .dai_link = &ams_delta_dai_link,
600 .num_links = 1, 574 .num_links = 1,
601 .set_bias_level = ams_delta_set_bias_level,
602}; 575};
603 576
604/* Module init/exit */ 577/* Module init/exit */
@@ -647,11 +620,6 @@ static void __exit ams_delta_module_exit(void)
647 ARRAY_SIZE(ams_delta_hook_switch_gpios), 620 ARRAY_SIZE(ams_delta_hook_switch_gpios),
648 ams_delta_hook_switch_gpios); 621 ams_delta_hook_switch_gpios);
649 622
650 /* Keep modem power on */
651 ams_delta_set_bias_level(&ams_delta_audio_card,
652 &ams_delta_audio_card.rtd[0].codec->dapm,
653 SND_SOC_BIAS_STANDBY);
654
655 platform_device_unregister(cx20442_platform_device); 623 platform_device_unregister(cx20442_platform_device);
656 platform_device_unregister(ams_delta_audio_platform_device); 624 platform_device_unregister(ams_delta_audio_platform_device);
657} 625}