aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8753.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 10:47:46 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 10:47:46 -0500
commita421018e8c10e5593a1fee076af72a66c3fe8ca3 (patch)
tree2854511845d0e07d33726a13eda6de1059a5c9df /sound/soc/codecs/wm8753.c
parent3ad1f3b35e8309ec93454dbf89beaafcdb5312da (diff)
parent86e1d57e4f24ca27ce813bdc2afaac4adafcbaf4 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (294 commits) S3C64XX: Staticise platform data for PCM devices ASoC: Rename controls with a / in wm_hubs snd-fm801: autodetect SF64-PCR (tuner-only) card ALSA: tea575x-tuner: fix mute ASoC: au1x: dbdma2: plug memleak in pcm device creation error path ASoC: au1x: dbdma2: fix oops on soc device removal. ALSA: hda - Fix memory leaks in the previous patch ALSA: hda - Add ALC661/259, ALC892/888VD support ALSA: opti9xx: remove snd_opti9xx fields ALSA: aaci - Clean up duplicate code ALSA: usb - Fix mixer map for Hercules Gamesurround Muse Pocket LT ALSA: hda - Add position_fix quirk for HP dv3 ALSA: hda - Add a pin-fix for FSC Amilo Pi1505 ALSA: hda - Fix Cxt5047 test mode ASoC: pxa/raumfeld: adopt new snd_soc_dai_set_pll() API ASoC: sh: fsi: Add runtime PM support sh: ms7724se: Add runtime PM support for FSI ALSA: hda - Add a position_fix quirk for MSI Wind U115 ALSA: opti-miro: add PnP detection ALSA: opti-miro: separate comon probing code ...
Diffstat (limited to 'sound/soc/codecs/wm8753.c')
-rw-r--r--sound/soc/codecs/wm8753.c49
1 files changed, 2 insertions, 47 deletions
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 5ad677ce80da..d6850dacda29 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -673,7 +673,6 @@ static int wm8753_add_widgets(struct snd_soc_codec *codec)
673 673
674 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 674 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
675 675
676 snd_soc_dapm_new_widgets(codec);
677 return 0; 676 return 0;
678} 677}
679 678
@@ -724,8 +723,8 @@ static void pll_factors(struct _pll_div *pll_div, unsigned int target,
724 pll_div->k = K; 723 pll_div->k = K;
725} 724}
726 725
727static int wm8753_set_dai_pll(struct snd_soc_dai *codec_dai, 726static int wm8753_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
728 int pll_id, unsigned int freq_in, unsigned int freq_out) 727 int source, unsigned int freq_in, unsigned int freq_out)
729{ 728{
730 u16 reg, enable; 729 u16 reg, enable;
731 int offset; 730 int offset;
@@ -1583,18 +1582,9 @@ static int wm8753_probe(struct platform_device *pdev)
1583 snd_soc_add_controls(codec, wm8753_snd_controls, 1582 snd_soc_add_controls(codec, wm8753_snd_controls,
1584 ARRAY_SIZE(wm8753_snd_controls)); 1583 ARRAY_SIZE(wm8753_snd_controls));
1585 wm8753_add_widgets(codec); 1584 wm8753_add_widgets(codec);
1586 ret = snd_soc_init_card(socdev);
1587 if (ret < 0) {
1588 printk(KERN_ERR "wm8753: failed to register card\n");
1589 goto card_err;
1590 }
1591 1585
1592 return 0; 1586 return 0;
1593 1587
1594card_err:
1595 snd_soc_free_pcms(socdev);
1596 snd_soc_dapm_free(socdev);
1597
1598pcm_err: 1588pcm_err:
1599 return ret; 1589 return ret;
1600} 1590}
@@ -1767,21 +1757,6 @@ static int wm8753_i2c_remove(struct i2c_client *client)
1767 return 0; 1757 return 0;
1768} 1758}
1769 1759
1770#ifdef CONFIG_PM
1771static int wm8753_i2c_suspend(struct i2c_client *client, pm_message_t msg)
1772{
1773 return snd_soc_suspend_device(&client->dev);
1774}
1775
1776static int wm8753_i2c_resume(struct i2c_client *client)
1777{
1778 return snd_soc_resume_device(&client->dev);
1779}
1780#else
1781#define wm8753_i2c_suspend NULL
1782#define wm8753_i2c_resume NULL
1783#endif
1784
1785static const struct i2c_device_id wm8753_i2c_id[] = { 1760static const struct i2c_device_id wm8753_i2c_id[] = {
1786 { "wm8753", 0 }, 1761 { "wm8753", 0 },
1787 { } 1762 { }
@@ -1795,8 +1770,6 @@ static struct i2c_driver wm8753_i2c_driver = {
1795 }, 1770 },
1796 .probe = wm8753_i2c_probe, 1771 .probe = wm8753_i2c_probe,
1797 .remove = wm8753_i2c_remove, 1772 .remove = wm8753_i2c_remove,
1798 .suspend = wm8753_i2c_suspend,
1799 .resume = wm8753_i2c_resume,
1800 .id_table = wm8753_i2c_id, 1773 .id_table = wm8753_i2c_id,
1801}; 1774};
1802#endif 1775#endif
@@ -1852,22 +1825,6 @@ static int __devexit wm8753_spi_remove(struct spi_device *spi)
1852 return 0; 1825 return 0;
1853} 1826}
1854 1827
1855#ifdef CONFIG_PM
1856static int wm8753_spi_suspend(struct spi_device *spi, pm_message_t msg)
1857{
1858 return snd_soc_suspend_device(&spi->dev);
1859}
1860
1861static int wm8753_spi_resume(struct spi_device *spi)
1862{
1863 return snd_soc_resume_device(&spi->dev);
1864}
1865
1866#else
1867#define wm8753_spi_suspend NULL
1868#define wm8753_spi_resume NULL
1869#endif
1870
1871static struct spi_driver wm8753_spi_driver = { 1828static struct spi_driver wm8753_spi_driver = {
1872 .driver = { 1829 .driver = {
1873 .name = "wm8753", 1830 .name = "wm8753",
@@ -1876,8 +1833,6 @@ static struct spi_driver wm8753_spi_driver = {
1876 }, 1833 },
1877 .probe = wm8753_spi_probe, 1834 .probe = wm8753_spi_probe,
1878 .remove = __devexit_p(wm8753_spi_remove), 1835 .remove = __devexit_p(wm8753_spi_remove),
1879 .suspend = wm8753_spi_suspend,
1880 .resume = wm8753_spi_resume,
1881}; 1836};
1882#endif 1837#endif
1883 1838