]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'sound-asoc/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 11 Oct 2012 00:01:08 +0000 (11:01 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 11 Oct 2012 00:01:08 +0000 (11:01 +1100)
arch/arm/mach-omap1/board-ams-delta.c
sound/soc/Makefile
sound/soc/codecs/twl6040.c
sound/soc/codecs/wm2200.c
sound/soc/omap/ams-delta.c
sound/soc/omap/omap-abe-twl6040.c
sound/soc/omap/omap-mcpdm.c
sound/soc/pxa/mmp-pcm.c
sound/soc/samsung/bells.c
sound/soc/sh/fsi.c
sound/soc/soc-jack.c

index 9518bf5996dccffbf11b284227837c4a96f61a59..e255164ff087ebbb40dcd7e167abbeab71ca27d3 100644 (file)
@@ -444,16 +444,28 @@ static struct omap1_cam_platform_data ams_delta_camera_platform_data = {
        .lclk_khz_max   = 1334,         /* results in 5fps CIF, 10fps QCIF */
 };
 
+static struct platform_device ams_delta_audio_device = {
+       .name   = "ams-delta-audio",
+       .id     = -1,
+};
+
+static struct platform_device cx20442_codec_device = {
+       .name   = "cx20442-codec",
+       .id     = -1,
+};
+
 static struct platform_device *ams_delta_devices[] __initdata = {
        &latch1_gpio_device,
        &latch2_gpio_device,
        &ams_delta_kp_device,
        &ams_delta_camera_device,
+       &ams_delta_audio_device,
 };
 
 static struct platform_device *late_devices[] __initdata = {
        &ams_delta_nand_device,
        &ams_delta_lcd_device,
+       &cx20442_codec_device,
 };
 
 static void __init ams_delta_init(void)
index bcbf1d00aa858ef62fc11d4767c0cb3b4f270eb3..99f32f7c0692713f90ca1d917dd23103bcebc601 100644 (file)
@@ -1,8 +1,9 @@
 snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o
 snd-soc-core-objs += soc-pcm.o soc-compress.o soc-io.o
 
-snd-soc-dmaengine-pcm-objs := soc-dmaengine-pcm.o
-obj-$(CONFIG_SND_SOC_DMAENGINE_PCM) += snd-soc-dmaengine-pcm.o
+ifneq ($(CONFIG_SND_SOC_DMAENGINE_PCM),)
+snd-soc-core-objs += soc-dmaengine-pcm.o
+endif
 
 obj-$(CONFIG_SND_SOC)  += snd-soc-core.o
 obj-$(CONFIG_SND_SOC)  += codecs/
index e8f97af75928ea3548c0d389f9e70d7f676ba2c3..00b85cc1b9a3508f8db9a677bac90d4e2af50038 100644 (file)
@@ -820,10 +820,10 @@ static const struct snd_soc_dapm_route intercon[] = {
        {"VIBRA DAC", NULL, "Vibra Playback"},
 
        /* ADC -> Stream mapping */
-       {"ADC Left", NULL, "Legacy Capture"},
-       {"ADC Left", NULL, "Capture"},
-       {"ADC Right", NULL, "Legacy Capture"},
-       {"ADC Right", NULL, "Capture"},
+       {"Legacy Capture" , NULL, "ADC Left"},
+       {"Capture", NULL, "ADC Left"},
+       {"Legacy Capture", NULL, "ADC Right"},
+       {"Capture" , NULL, "ADC Right"},
 
        /* Capture path */
        {"Analog Left Capture Route", "Headset Mic", "HSMIC"},
index efa93dbb01915a2112582e2c0a4f939bb96ff643..eab64a193989ac2917773a4df7613cbf644dd58f 100644 (file)
@@ -1028,7 +1028,7 @@ SOC_DOUBLE_R_TLV("OUT2 Digital Volume", WM2200_DAC_DIGITAL_VOLUME_2L,
                 WM2200_DAC_DIGITAL_VOLUME_2R, WM2200_OUT2L_VOL_SHIFT, 0x9f, 0,
                 digital_tlv),
 SOC_DOUBLE("OUT2 Switch", WM2200_PDM_1, WM2200_SPK1L_MUTE_SHIFT,
-          WM2200_SPK1R_MUTE_SHIFT, 1, 0),
+          WM2200_SPK1R_MUTE_SHIFT, 1, 1),
 };
 
 WM2200_MIXER_ENUMS(OUT1L, WM2200_OUT1LMIX_INPUT_1_SOURCE);
@@ -2091,6 +2091,7 @@ static __devinit int wm2200_i2c_probe(struct i2c_client *i2c,
 
        switch (wm2200->rev) {
        case 0:
+       case 1:
                ret = regmap_register_patch(wm2200->regmap, wm2200_reva_patch,
                                            ARRAY_SIZE(wm2200_reva_patch));
                if (ret != 0) {
index dc0ee76266261c998ec58a0f433dea92272767b3..d8e96b2cd03ec201306ceaebf3962531f48f0cac 100644 (file)
@@ -575,56 +575,53 @@ static struct snd_soc_card ams_delta_audio_card = {
 };
 
 /* Module init/exit */
-static struct platform_device *ams_delta_audio_platform_device;
-static struct platform_device *cx20442_platform_device;
-
-static int __init ams_delta_module_init(void)
+static __devinit int ams_delta_probe(struct platform_device *pdev)
 {
+       struct snd_soc_card *card = &ams_delta_audio_card;
        int ret;
 
-       if (!(machine_is_ams_delta()))
-               return -ENODEV;
-
-       ams_delta_audio_platform_device =
-                       platform_device_alloc("soc-audio", -1);
-       if (!ams_delta_audio_platform_device)
-               return -ENOMEM;
+       card->dev = &pdev->dev;
 
-       platform_set_drvdata(ams_delta_audio_platform_device,
-                               &ams_delta_audio_card);
-
-       ret = platform_device_add(ams_delta_audio_platform_device);
-       if (ret)
-               goto err;
-
-       /*
-        * Codec platform device could be registered from elsewhere (board?),
-        * but I do it here as it makes sense only if used with the card.
-        */
-       cx20442_platform_device =
-               platform_device_register_simple("cx20442-codec", -1, NULL, 0);
+       ret = snd_soc_register_card(card);
+       if (ret) {
+               dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
+               card->dev = NULL;
+               return ret;
+       }
        return 0;
-err:
-       platform_device_put(ams_delta_audio_platform_device);
-       return ret;
 }
-late_initcall(ams_delta_module_init);
 
-static void __exit ams_delta_module_exit(void)
+static int __devexit ams_delta_remove(struct platform_device *pdev)
 {
+       struct snd_soc_card *card = platform_get_drvdata(pdev);
+
        if (tty_unregister_ldisc(N_V253) != 0)
-               dev_warn(&ams_delta_audio_platform_device->dev,
+               dev_warn(&pdev->dev,
                        "failed to unregister V253 line discipline\n");
 
        snd_soc_jack_free_gpios(&ams_delta_hook_switch,
                        ARRAY_SIZE(ams_delta_hook_switch_gpios),
                        ams_delta_hook_switch_gpios);
 
-       platform_device_unregister(cx20442_platform_device);
-       platform_device_unregister(ams_delta_audio_platform_device);
+       snd_soc_unregister_card(card);
+       card->dev = NULL;
+       return 0;
 }
-module_exit(ams_delta_module_exit);
+
+#define DRV_NAME "ams-delta-audio"
+
+static struct platform_driver ams_delta_driver = {
+       .driver = {
+               .name = DRV_NAME,
+               .owner = THIS_MODULE,
+       },
+       .probe = ams_delta_probe,
+       .remove = __devexit_p(ams_delta_remove),
+};
+
+module_platform_driver(ams_delta_driver);
 
 MODULE_AUTHOR("Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>");
 MODULE_DESCRIPTION("ALSA SoC driver for Amstrad E3 (Delta) videophone");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:" DRV_NAME);
index 4a73ef3ae12fdb35bced35e444f45b2eb144275c..a57a4e68dcc6166a2161b49b1d21ab7a8e49dc87 100644 (file)
@@ -216,7 +216,7 @@ static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd)
        twl6040_disconnect_pin(dapm, pdata->has_hf, "Ext Spk");
        twl6040_disconnect_pin(dapm, pdata->has_ep, "Earphone Spk");
        twl6040_disconnect_pin(dapm, pdata->has_aux, "Line Out");
-       twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vinrator");
+       twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vibrator");
        twl6040_disconnect_pin(dapm, pdata->has_hsmic, "Headset Mic");
        twl6040_disconnect_pin(dapm, pdata->has_mainmic, "Main Handset Mic");
        twl6040_disconnect_pin(dapm, pdata->has_submic, "Sub Handset Mic");
index c02b001ee4b51816235147ddb420186c525ecd43..56965bb3275ccd5c2fea1dc3fe143e3e3e7b622d 100644 (file)
@@ -40,7 +40,6 @@
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
 
-#include <plat/omap_hwmod.h>
 #include "omap-mcpdm.h"
 #include "omap-pcm.h"
 
@@ -260,13 +259,9 @@ static int omap_mcpdm_dai_startup(struct snd_pcm_substream *substream,
        mutex_lock(&mcpdm->mutex);
 
        if (!dai->active) {
-               /* Enable watch dog for ES above ES 1.0 to avoid saturation */
-               if (omap_rev() != OMAP4430_REV_ES1_0) {
-                       u32 ctrl = omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL);
+               u32 ctrl = omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL);
 
-                       omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL,
-                                        ctrl | MCPDM_WD_EN);
-               }
+               omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, ctrl | MCPDM_WD_EN);
                omap_mcpdm_open_streams(mcpdm);
        }
        mutex_unlock(&mcpdm->mutex);
index 73ac5463c9e49efdee1dea93704e30438d1c7c37..e834faf859fdcf91e5c1889b1975b2fff357e206 100644 (file)
 #include <linux/slab.h>
 #include <linux/dma-mapping.h>
 #include <linux/dmaengine.h>
+#include <linux/platform_data/dma-mmp_tdma.h>
 #include <linux/platform_data/mmp_audio.h>
 #include <sound/pxa2xx-lib.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
-#include <mach/sram.h>
 #include <sound/dmaengine_pcm.h>
 
 struct mmp_dma_data {
index 5dc10dfc0d421e1f5722f53def90f868598efc8c..a2ca1567b9e4ff93a481d99065820d887ff8a72c 100644 (file)
@@ -247,7 +247,7 @@ static struct snd_soc_dai_link bells_dai_wm5110[] = {
        {
                .name = "Sub",
                .stream_name = "Sub",
-               .cpu_dai_name = "wm5102-aif3",
+               .cpu_dai_name = "wm5110-aif3",
                .codec_dai_name = "wm9081-hifi",
                .codec_name = "wm9081.1-006c",
                .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
index 5328ae5539f16e67571566f313a5d9689f79cac5..9d7f30774a44d9524cb71f6697fc0ce96825295c 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/sh_dma.h>
 #include <linux/slab.h>
 #include <linux/module.h>
+#include <linux/workqueue.h>
 #include <sound/soc.h>
 #include <sound/sh_fsi.h>
 
@@ -223,7 +224,7 @@ struct fsi_stream {
         */
        struct dma_chan         *chan;
        struct sh_dmae_slave    slave; /* see fsi_handler_init() */
-       struct tasklet_struct   tasklet;
+       struct work_struct      work;
        dma_addr_t              dma;
 };
 
@@ -1085,9 +1086,9 @@ static void fsi_dma_complete(void *data)
        snd_pcm_period_elapsed(io->substream);
 }
 
-static void fsi_dma_do_tasklet(unsigned long data)
+static void fsi_dma_do_work(struct work_struct *work)
 {
-       struct fsi_stream *io = (struct fsi_stream *)data;
+       struct fsi_stream *io = container_of(work, struct fsi_stream, work);
        struct fsi_priv *fsi = fsi_stream_to_priv(io);
        struct snd_soc_dai *dai;
        struct dma_async_tx_descriptor *desc;
@@ -1129,7 +1130,7 @@ static void fsi_dma_do_tasklet(unsigned long data)
         * FIXME
         *
         * In DMAEngine case, codec and FSI cannot be started simultaneously
-        * since FSI is using tasklet.
+        * since FSI is using the scheduler work queue.
         * Therefore, in capture case, probably FSI FIFO will have got
         * overflow error in this point.
         * in that case, DMA cannot start transfer until error was cleared.
@@ -1153,7 +1154,7 @@ static bool fsi_dma_filter(struct dma_chan *chan, void *param)
 
 static int fsi_dma_transfer(struct fsi_priv *fsi, struct fsi_stream *io)
 {
-       tasklet_schedule(&io->tasklet);
+       schedule_work(&io->work);
 
        return 0;
 }
@@ -1195,14 +1196,14 @@ static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io, struct dev
                return fsi_stream_probe(fsi, dev);
        }
 
-       tasklet_init(&io->tasklet, fsi_dma_do_tasklet, (unsigned long)io);
+       INIT_WORK(&io->work, fsi_dma_do_work);
 
        return 0;
 }
 
 static int fsi_dma_remove(struct fsi_priv *fsi, struct fsi_stream *io)
 {
-       tasklet_kill(&io->tasklet);
+       cancel_work_sync(&io->work);
 
        fsi_stream_stop(fsi, io);
 
index fa0fd8ddae90fc17f280543c9399741c9a33038b..1ab5fe04bfccb066853fc664d9db9bea68a9f8ce 100644 (file)
@@ -22,7 +22,7 @@
 
 /**
  * snd_soc_jack_new - Create a new jack
- * @card:  ASoC card
+ * @codec: ASoC codec
  * @id:    an identifying string for this jack
  * @type:  a bitmask of enum snd_jack_type values that can be detected by
  *         this jack
@@ -133,12 +133,13 @@ EXPORT_SYMBOL_GPL(snd_soc_jack_add_zones);
 
 /**
  * snd_soc_jack_get_type - Based on the mic bias value, this function returns
- * the type of jack from the zones delcared in the jack type
+ * the type of jack from the zones declared in the jack type
  *
+ * @jack:  ASoC jack
  * @micbias_voltage:  mic bias voltage at adc channel when jack is plugged in
  *
  * Based on the mic bias value passed, this function helps identify
- * the type of jack from the already delcared jack zones
+ * the type of jack from the already declared jack zones
  */
 int snd_soc_jack_get_type(struct snd_soc_jack *jack, int micbias_voltage)
 {