wm8737.c (447a8b858e4bda41c394b1bc7fdbc9dc0bdf44f6) wm8737.c (a6bf30698825718f22a689a54ea023cdf51a4c76)
1/*
2 * wm8737.c -- WM8737 ALSA SoC Audio driver
3 *
4 * Copyright 2010 Wolfson Microelectronics plc
5 *
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 263 unchanged lines hidden (view full) ---

272
273 { "ADCL", NULL, "PGAL" },
274 { "ADCR", NULL, "PGAR" },
275
276 { "AIF", NULL, "ADCL" },
277 { "AIF", NULL, "ADCR" },
278};
279
1/*
2 * wm8737.c -- WM8737 ALSA SoC Audio driver
3 *
4 * Copyright 2010 Wolfson Microelectronics plc
5 *
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 263 unchanged lines hidden (view full) ---

272
273 { "ADCL", NULL, "PGAL" },
274 { "ADCR", NULL, "PGAR" },
275
276 { "AIF", NULL, "ADCL" },
277 { "AIF", NULL, "ADCR" },
278};
279
280static int wm8737_add_widgets(struct snd_soc_codec *codec)
281{
282 struct snd_soc_dapm_context *dapm = &codec->dapm;
283
284 snd_soc_dapm_new_controls(dapm, wm8737_dapm_widgets,
285 ARRAY_SIZE(wm8737_dapm_widgets));
286 snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
287
288 return 0;
289}
290
291/* codec mclk clock divider coefficients */
292static const struct {
293 u32 mclk;
294 u32 rate;
295 u8 usb;
296 u8 sr;
297} coeff_div[] = {
298 { 12288000, 8000, 0, 0x4 },

--- 289 unchanged lines hidden (view full) ---

588 snd_soc_update_bits(codec, WM8737_RIGHT_PGA_VOLUME, WM8737_RVU,
589 WM8737_RVU);
590
591 wm8737_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
592
593 /* Bias level configuration will have done an extra enable */
594 regulator_bulk_disable(ARRAY_SIZE(wm8737->supplies), wm8737->supplies);
595
280/* codec mclk clock divider coefficients */
281static const struct {
282 u32 mclk;
283 u32 rate;
284 u8 usb;
285 u8 sr;
286} coeff_div[] = {
287 { 12288000, 8000, 0, 0x4 },

--- 289 unchanged lines hidden (view full) ---

577 snd_soc_update_bits(codec, WM8737_RIGHT_PGA_VOLUME, WM8737_RVU,
578 WM8737_RVU);
579
580 wm8737_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
581
582 /* Bias level configuration will have done an extra enable */
583 regulator_bulk_disable(ARRAY_SIZE(wm8737->supplies), wm8737->supplies);
584
596 snd_soc_add_codec_controls(codec, wm8737_snd_controls,
597 ARRAY_SIZE(wm8737_snd_controls));
598 wm8737_add_widgets(codec);
599
600 return 0;
601
602err_enable:
603 regulator_bulk_disable(ARRAY_SIZE(wm8737->supplies), wm8737->supplies);
604err_get:
605 return ret;
606}
607

--- 4 unchanged lines hidden (view full) ---

612}
613
614static struct snd_soc_codec_driver soc_codec_dev_wm8737 = {
615 .probe = wm8737_probe,
616 .remove = wm8737_remove,
617 .suspend = wm8737_suspend,
618 .resume = wm8737_resume,
619 .set_bias_level = wm8737_set_bias_level,
585 return 0;
586
587err_enable:
588 regulator_bulk_disable(ARRAY_SIZE(wm8737->supplies), wm8737->supplies);
589err_get:
590 return ret;
591}
592

--- 4 unchanged lines hidden (view full) ---

597}
598
599static struct snd_soc_codec_driver soc_codec_dev_wm8737 = {
600 .probe = wm8737_probe,
601 .remove = wm8737_remove,
602 .suspend = wm8737_suspend,
603 .resume = wm8737_resume,
604 .set_bias_level = wm8737_set_bias_level,
605
606 .controls = wm8737_snd_controls,
607 .num_controls = ARRAY_SIZE(wm8737_snd_controls),
608 .dapm_widgets = wm8737_dapm_widgets,
609 .num_dapm_widgets = ARRAY_SIZE(wm8737_dapm_widgets),
610 .dapm_routes = intercon,
611 .num_dapm_routes = ARRAY_SIZE(intercon),
620};
621
622static const struct of_device_id wm8737_of_match[] = {
623 { .compatible = "wlf,wm8737", },
624 { }
625};
626
627MODULE_DEVICE_TABLE(of, wm8737_of_match);

--- 159 unchanged lines hidden ---
612};
613
614static const struct of_device_id wm8737_of_match[] = {
615 { .compatible = "wlf,wm8737", },
616 { }
617};
618
619MODULE_DEVICE_TABLE(of, wm8737_of_match);

--- 159 unchanged lines hidden ---