From: Mark Brown Date: Tue, 6 May 2014 01:25:59 +0000 (-0700) Subject: Merge remote-tracking branches 'asoc/topic/mc13783', 'asoc/topic/multicodec', 'asoc... X-Git-Tag: next-20140507~52^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6cdfe4bccf9729d47b51f41b95edeb93aa0667aa;p=karo-tx-linux.git Merge remote-tracking branches 'asoc/topic/mc13783', 'asoc/topic/multicodec', 'asoc/topic/nuc900', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/rt5640' and 'asoc/topic/rt5651' into asoc-next --- 6cdfe4bccf9729d47b51f41b95edeb93aa0667aa diff --cc sound/soc/soc-core.c index ae8155803c04,051c006281f5,54a1d91f1d96,051c006281f5,448a60748523,051c006281f5,051c006281f5,051c006281f5..b832875f07e7 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@@@@@@@@ -1596,44 -1539,21 -1634,26 -1539,21 -1541,38 -1539,21 -1539,21 -1539,21 +1634,44 @@@@@@@@@ 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) +++++++static 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; } @@@@@@@@@ -2551,22 -2667,14 -2767,14 -2667,14 -2683,14 -2667,14 -2667,14 -2667,14 +2589,22 @@@@@@@@@ static int snd_soc_read_signed(struct s int ret; unsigned int val; ------- val = (snd_soc_read(codec, reg) >> shift) & mask; +++++++ ret = snd_soc_component_read(component, reg, &val); +++++++ if (ret < 0) +++++++ return ret; + + - - --- if (!sign_bit) - - --- return val; +++++++ val = (val >> shift) & mask; + + +++ - - if (!sign_bit) - - return val; +++++++ if (!sign_bit) { +++++++ *signed_val = val; +++++++ return 0; +++++++ } /* non-negative number */ ------- if (!(val & BIT(sign_bit))) ------- return val; +++++++ if (!(val & BIT(sign_bit))) { +++++++ *signed_val = val; +++++++ return 0; +++++++ } ret = val;