]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branches 'asoc/topic/adsp', 'asoc/topic/ak4104', 'asoc/topic...
authorMark Brown <broonie@linaro.org>
Thu, 1 May 2014 19:10:17 +0000 (12:10 -0700)
committerMark Brown <broonie@linaro.org>
Thu, 1 May 2014 19:10:17 +0000 (12:10 -0700)
1  2  3  4  5  6  7  8 
sound/soc/codecs/Kconfig
sound/soc/codecs/Makefile
sound/soc/codecs/cs42l51.c
sound/soc/codecs/wm5110.c
sound/soc/codecs/wm_adsp.c
sound/soc/soc-core.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 83acdf345c2874e007ff66038a33bfc9d25ec29f,051c006281f5c2c003583f7104c9ec02dc886dfc,051c006281f5c2c003583f7104c9ec02dc886dfc,051c006281f5c2c003583f7104c9ec02dc886dfc,051c006281f5c2c003583f7104c9ec02dc886dfc,5071a3a0ac8368d3a6e7e313fc5bacfab7a26577,4a381b307b084880540cb7b9e2a9e71befe2a781,051c006281f5c2c003583f7104c9ec02dc886dfc..4b87ab394b1cdaf9a59ea509746e7f8e2e042ead
@@@@@@@@@ -1144,31 -1127,26 -1127,26 -1127,26 -1127,26 -1127,16 -1142,31 -1127,26 +1144,31 @@@@@@@@@ static int soc_probe_codec(struct snd_s
        
                soc_init_codec_debugfs(codec);
        
 ----- -        if (driver->dapm_widgets)
 ----- -                snd_soc_dapm_new_controls(&codec->dapm, driver->dapm_widgets,
 ----- -                                          driver->num_dapm_widgets);
 +++++ +        if (driver->dapm_widgets) {
 +++++ +                ret = snd_soc_dapm_new_controls(&codec->dapm,
 +++++ +                                                driver->dapm_widgets,
 +++++ +                                                driver->num_dapm_widgets);
     +  
 ----  -        /* Create DAPM widgets for each DAI stream */
 ----  -        list_for_each_entry(dai, &codec->component.dai_list, list)
 ----  -                snd_soc_dapm_new_dai_widgets(&codec->dapm, dai);
 +++++ +                if (ret != 0) {
 +++++ +                        dev_err(codec->dev,
 +++++ +                                "Failed to create new controls %d\n", ret);
 +++++ +                        goto err_probe;
 +++++ +                }
 +++++ +        }
        
 ----  -        codec->dapm.idle_bias_off = driver->idle_bias_off;
 ++++  +        /* Create DAPM widgets for each DAI stream */
     -          list_for_each_entry(dai, &codec->component.dai_list, list)
     -                  snd_soc_dapm_new_dai_widgets(&codec->dapm, dai);
 +++++ +        list_for_each_entry(dai, &codec->component.dai_list, list) {
 +++++ +                ret = snd_soc_dapm_new_dai_widgets(&codec->dapm, dai);
     +  
 ----  -        if (!codec->write && dev_get_regmap(codec->dev, NULL)) {
 ----  -                /* Set the default I/O up try regmap */
 ----  -                ret = snd_soc_codec_set_cache_io(codec, NULL);
 ----  -                if (ret < 0) {
 +++++ +                if (ret != 0) {
     +                          dev_err(codec->dev,
 ----  -                                "Failed to set cache I/O: %d\n", ret);
 +++++ +                                "Failed to create DAI widgets %d\n", ret);
     +                          goto err_probe;
     +                  }
     +          }
        
 ++++  +        codec->dapm.idle_bias_off = driver->idle_bias_off;
 ++++  +
                if (driver->probe) {
                        ret = driver->probe(codec);
                        if (ret < 0) {
@@@@@@@@@ -1596,43 -1539,21 -1539,21 -1539,21 -1539,21 -1529,21 -1594,26 -1539,21 +1596,43 @@@@@@@@@ static void soc_unregister_ac97_codec(s
                        codec->ac97_registered = 0;
                }
        }
 +++++ +
 +++++ +static void soc_unregister_ac97_dai_link(struct snd_soc_pcm_runtime *rtd)
 +++++ +{
 +++++ +        soc_unregister_ac97_codec(rtd->codec);
 +++++ +}
        #endif
        
 -------static int soc_check_aux_dev(struct snd_soc_card *card, int num)
 +++++++struct snd_soc_codec *soc_find_matching_codec(struct snd_soc_card *card, int num)
        {
                struct snd_soc_aux_dev *aux_dev = &card->aux_dev[num];
                struct snd_soc_codec *codec;
        
 -------        /* find CODEC from registered CODECs*/
 +++++++        /* find CODEC from registered CODECs */
                list_for_each_entry(codec, &codec_list, list) {
 -------                if (!strcmp(codec->name, aux_dev->codec_name))
 -------                        return 0;
 +++++++                if (aux_dev->codec_of_node &&
 +++++++                   (codec->dev->of_node != aux_dev->codec_of_node))
 +++++++                        continue;
 +++++++                if (aux_dev->codec_name && strcmp(codec->name, aux_dev->codec_name))
 +++++++                        continue;
 +++++++                return codec;
                }
        
 -------        dev_err(card->dev, "ASoC: %s not registered\n", aux_dev->codec_name);
 +++++++        return NULL;
 +++++++}
 +++++++
 +++++++static int soc_check_aux_dev(struct snd_soc_card *card, int num)
 +++++++{
 +++++++        struct snd_soc_aux_dev *aux_dev = &card->aux_dev[num];
 +++++++        const char *codecname = aux_dev->codec_name;
 +++++++        struct snd_soc_codec *codec = soc_find_matching_codec(card, num);
     ++ 
 +++++++        if (codec)
 +++++++                return 0;
 +++++++        if (aux_dev->codec_of_node)
 +++++++                codecname = of_node_full_name(aux_dev->codec_of_node);
 ++++  +
 +++++++        dev_err(card->dev, "ASoC: %s not registered\n", codecname);
                return -EPROBE_DEFER;
        }
        
@@@@@@@@@ -4041,34 -4105,16 -4105,16 -4105,16 -4105,16 -4095,16 -4037,27 -4105,16 +4053,27 @@@@@@@@@ void snd_soc_unregister_component(struc
                return;
        
        found:
------ -        snd_soc_unregister_dais(cmpnt);
-       
-               mutex_lock(&client_mutex);
-               list_del(&cmpnt->list);
-               mutex_unlock(&client_mutex);
-       
-               dev_dbg(dev, "ASoC: Unregistered component '%s'\n", cmpnt->name);
-               kfree(cmpnt->name);
++++++ +        __snd_soc_unregister_component(cmpnt);
 +++++ +}
 +++++ +EXPORT_SYMBOL_GPL(snd_soc_unregister_component);
        
 ----- -        mutex_lock(&client_mutex);
 ----- -        list_del(&cmpnt->list);
 ----- -        mutex_unlock(&client_mutex);
 +++++ +static int snd_soc_platform_drv_write(struct snd_soc_component *component,
 +++++ +        unsigned int reg, unsigned int val)
 +++++ +{
 +++++ +        struct snd_soc_platform *platform = snd_soc_component_to_platform(component);
        
 ----- -        dev_dbg(dev, "ASoC: Unregistered component '%s'\n", cmpnt->name);
 ----- -        kfree(cmpnt->name);
 +++++ +        return platform->driver->write(platform, reg, val);
 +++++ +}
 +++++ +
 +++++ +static int snd_soc_platform_drv_read(struct snd_soc_component *component,
 +++++ +        unsigned int reg, unsigned int *val)
 +++++ +{
 +++++ +        struct snd_soc_platform *platform = snd_soc_component_to_platform(component);
 +++++ +
 +++++ +        *val = platform->driver->read(platform, reg);
 +++++ +
 +++++ +        return 0;
        }
 ----- -EXPORT_SYMBOL_GPL(snd_soc_unregister_component);
        
        /**
         * snd_soc_add_platform - Add a platform to the ASoC core
@@@@@@@@@ -4148,8 -4178,6 -4178,6 -4178,6 -4178,6 -4168,6 -4137,8 -4178,6 +4153,8 @@@@@@@@@ EXPORT_SYMBOL_GPL(snd_soc_register_plat
         */
        void snd_soc_remove_platform(struct snd_soc_platform *platform)
        {
-               snd_soc_unregister_component(platform->dev);
++++++ +        __snd_soc_unregister_component(&platform->component);
 +++++ +
                mutex_lock(&client_mutex);
                list_del(&platform->list);
                mutex_unlock(&client_mutex);
@@@@@@@@@ -4283,27 -4292,8 -4292,8 -4292,8 -4292,8 -4283,25 -4272,27 -4292,8 +4288,27 @@@@@@@@@ int snd_soc_register_codec(struct devic
                codec->dev = dev;
                codec->driver = codec_drv;
                codec->num_dai = num_dai;
 +++++ +        codec->component.val_bytes = codec_drv->reg_word_size;
                mutex_init(&codec->mutex);
        
     -          if (!codec->write) {
 +++++ +        if (!codec->component.write) {
 ++++  +                if (codec_drv->get_regmap)
 ++++  +                        regmap = codec_drv->get_regmap(dev);
 ++++  +                else
 ++++  +                        regmap = dev_get_regmap(dev, NULL);
 ++++  +
 ++++  +                if (regmap) {
     -                          ret = snd_soc_codec_set_cache_io(codec, regmap);
     -                          if (ret && ret != -ENOTSUPP) {
 +++++ +                        ret = snd_soc_component_init_io(&codec->component,
 +++++ +                                regmap);
 +++++ +                        if (ret) {
 ++++  +                                dev_err(codec->dev,
 ++++  +                                                "Failed to set cache I/O:%d\n",
 ++++  +                                                ret);
 ++++  +                                return ret;
 ++++  +                        }
 ++++  +                }
 ++++  +        }
 ++++  +
                for (i = 0; i < num_dai; i++) {
                        fixup_codec_formats(&dai_drv[i].playback);
                        fixup_codec_formats(&dai_drv[i].capture);