From: Mark Brown Date: Sun, 15 Aug 2010 13:56:40 +0000 (+0100) Subject: Merge branch 'for-2.6.36' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie... X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~19819^2~1117^2~485 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ec62dbd7eb8e3dddb221da89ecbcea0fc3dee8c1;p=mirror_ubuntu-focal-kernel.git Merge branch 'for-2.6.36' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into for-2.6.37 Trivial overlap with the removal of the local revision variable. Conflicts: sound/soc/codecs/wm8994.c --- ec62dbd7eb8e3dddb221da89ecbcea0fc3dee8c1 diff --cc sound/soc/codecs/ad1980.c index 1371afac657b,70cfaec3be2c..81a444049936 --- a/sound/soc/codecs/ad1980.c +++ b/sound/soc/codecs/ad1980.c @@@ -239,50 -298,14 +247,50 @@@ static int ad1980_soc_remove(struct snd return 0; } -struct snd_soc_codec_device soc_codec_dev_ad1980 = { +static struct snd_soc_codec_driver soc_codec_dev_ad1980 = { .probe = ad1980_soc_probe, .remove = ad1980_soc_remove, + .reg_cache_size = ARRAY_SIZE(ad1980_reg), + .reg_word_size = sizeof(u16), + .reg_cache_step = 2, + .write = ac97_write, + .read = ac97_read, }; -EXPORT_SYMBOL_GPL(soc_codec_dev_ad1980); + +static __devinit int ad1980_probe(struct platform_device *pdev) +{ + return snd_soc_register_codec(&pdev->dev, + &soc_codec_dev_ad1980, &ad1980_dai, 1); +} + +static int __devexit ad1980_remove(struct platform_device *pdev) +{ + snd_soc_unregister_codec(&pdev->dev); + return 0; +} + +static struct platform_driver ad1980_codec_driver = { + .driver = { + .name = "ad1980-codec", + .owner = THIS_MODULE, + }, + + .probe = ad1980_probe, + .remove = __devexit_p(ad1980_remove), +}; + +static int __init ad1980_init(void) +{ + return platform_driver_register(&ad1980_codec_driver); +} +module_init(ad1980_init); + +static void __exit ad1980_exit(void) +{ + platform_driver_unregister(&ad1980_codec_driver); +} +module_exit(ad1980_exit); - MODULE_DESCRIPTION("ASoC ad1980 driver"); + MODULE_DESCRIPTION("ASoC ad1980 driver (Obsolete)"); MODULE_AUTHOR("Roy Huang, Cliff Cai"); MODULE_LICENSE("GPL"); diff --cc sound/soc/codecs/wm8580.c index d66db4bf11e4,72deeabef4fe..af4517ed2964 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c @@@ -260,12 -269,12 +260,12 @@@ SOC_DOUBLE("DAC2 Invert Switch", WM8580 SOC_DOUBLE("DAC3 Invert Switch", WM8580_DAC_CONTROL4, 4, 5, 1, 0), SOC_SINGLE("DAC ZC Switch", WM8580_DAC_CONTROL5, 5, 1, 0), - SOC_SINGLE("DAC1 Switch", WM8580_DAC_CONTROL5, 0, 1, 0), - SOC_SINGLE("DAC2 Switch", WM8580_DAC_CONTROL5, 1, 1, 0), - SOC_SINGLE("DAC3 Switch", WM8580_DAC_CONTROL5, 2, 1, 0), + SOC_SINGLE("DAC1 Switch", WM8580_DAC_CONTROL5, 0, 1, 1), + SOC_SINGLE("DAC2 Switch", WM8580_DAC_CONTROL5, 1, 1, 1), + SOC_SINGLE("DAC3 Switch", WM8580_DAC_CONTROL5, 2, 1, 1), -SOC_DOUBLE("ADC Mute Switch", WM8580_ADC_CONTROL1, 0, 1, 1, 0), -SOC_SINGLE("ADC High-Pass Filter Switch", WM8580_ADC_CONTROL1, 4, 1, 0), +SOC_DOUBLE("Capture Switch", WM8580_ADC_CONTROL1, 0, 1, 1, 1), +SOC_SINGLE("Capture High-Pass Filter Switch", WM8580_ADC_CONTROL1, 4, 1, 0), }; static const struct snd_soc_dapm_widget wm8580_dapm_widgets[] = { diff --cc sound/soc/codecs/wm8994.c index 7823f92413f3,522249d5c2b4..76a066e908ed --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@@ -3856,20 -3921,46 +3864,20 @@@ static irqreturn_t wm8994_mic_irq(int i return IRQ_HANDLED; } -static int wm8994_codec_probe(struct platform_device *pdev) +static int wm8994_codec_probe(struct snd_soc_codec *codec) { - int ret; struct wm8994_priv *wm8994; - int ret, i, rev; - struct snd_soc_codec *codec; - int i; ++ int ret, i; - if (wm8994_codec) { - dev_err(&pdev->dev, "Another WM8994 is registered\n"); - return -EINVAL; - } + codec->control_data = dev_get_drvdata(codec->dev->parent); wm8994 = kzalloc(sizeof(struct wm8994_priv), GFP_KERNEL); - if (!wm8994) { - dev_err(&pdev->dev, "Failed to allocate private data\n"); + if (wm8994 == NULL) return -ENOMEM; - } - - codec = &wm8994->codec; - - mutex_init(&codec->mutex); - INIT_LIST_HEAD(&codec->dapm_widgets); - INIT_LIST_HEAD(&codec->dapm_paths); - snd_soc_codec_set_drvdata(codec, wm8994); - codec->control_data = dev_get_drvdata(pdev->dev.parent); - codec->name = "WM8994"; - codec->owner = THIS_MODULE; - codec->read = wm8994_read; - codec->write = wm8994_write; - codec->readable_register = wm8994_readable; - codec->bias_level = SND_SOC_BIAS_OFF; - codec->set_bias_level = wm8994_set_bias_level; - codec->dai = &wm8994_dai[0]; - codec->num_dai = 3; - codec->reg_cache_size = WM8994_MAX_REGISTER; - codec->reg_cache = &wm8994->reg_cache; - codec->dev = &pdev->dev; - - wm8994->pdata = pdev->dev.parent->platform_data; + + wm8994->pdata = dev_get_platdata(codec->dev->parent); + wm8994->codec = codec; /* Fill the cache with physical values we inherited; don't reset */ ret = wm8994_bulk_read(codec->control_data, 0, diff --cc sound/soc/imx/Kconfig index 66ba26393c10,687c76fc0839..642270a635ea --- a/sound/soc/imx/Kconfig +++ b/sound/soc/imx/Kconfig @@@ -42,10 -28,10 +42,12 @@@ config SND_SOC_PHYCORE_AC9 config SND_SOC_EUKREA_TLV320 tristate "Eukrea TLV320" - depends on MACH_EUKREA_MBIMX27_BASEBOARD || MACH_EUKREA_MBIMXSD_BASEBOARD + depends on MACH_EUKREA_MBIMX27_BASEBOARD \ + || MACH_EUKREA_MBIMXSD25_BASEBOARD \ + || MACH_EUKREA_MBIMXSD35_BASEBOARD select SND_SOC_TLV320AIC23 + select SND_MXC_SOC_SSI + select SND_MXC_SOC_FIQ help Enable I2S based access to the TLV320AIC23B codec attached to the SSI interface diff --cc sound/soc/soc-cache.c index b856177ea281,adbc68ce9050..12281111f100 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c @@@ -340,10 -340,10 +340,10 @@@ static unsigned int snd_soc_16_8_read_i static unsigned int snd_soc_16_8_read(struct snd_soc_codec *codec, unsigned int reg) { - u16 *cache = codec->reg_cache; + u8 *cache = codec->reg_cache; reg &= 0xff; - if (reg >= codec->reg_cache_size) + if (reg >= codec->driver->reg_cache_size) return -1; return cache[reg]; }