From 1a2fa0af10602b62adf942c4119ed297aa20c86c Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 6 Jan 2012 14:54:24 +0800 Subject: [PATCH] --- yaml --- r: 284087 b: refs/heads/master c: 739be96ab83755e10fd0c2b6a34c8a73254527f7 h: refs/heads/master i: 284085: 2aa1a222f685f5472f8aa9577d5e8c67d6c057c4 284083: adabc89fd3c2de6d0fc7b1348df1802e7242a98a 284079: 64d6e24d159dc5dc1e9b95dd308195e24dd4c7a2 v: v3 --- [refs] | 2 +- trunk/sound/soc/atmel/Kconfig | 1 + trunk/sound/soc/codecs/cx20442.c | 48 ++------------------------ trunk/sound/soc/codecs/twl6040.c | 23 ------------ trunk/sound/soc/codecs/twl6040.h | 1 - trunk/sound/soc/omap/am3517evm.c | 1 - trunk/sound/soc/omap/ams-delta.c | 9 ++--- trunk/sound/soc/omap/igep0020.c | 1 - trunk/sound/soc/omap/n810.c | 1 - trunk/sound/soc/omap/omap3evm.c | 1 - trunk/sound/soc/omap/omap3pandora.c | 1 - trunk/sound/soc/omap/omap4-hdmi-card.c | 1 - trunk/sound/soc/omap/osk5912.c | 1 - trunk/sound/soc/omap/overo.c | 1 - trunk/sound/soc/omap/rx51.c | 1 - trunk/sound/soc/omap/sdp3430.c | 1 - trunk/sound/soc/omap/sdp4430.c | 1 - trunk/sound/soc/omap/zoom2.c | 1 - 18 files changed, 9 insertions(+), 87 deletions(-) diff --git a/[refs] b/[refs] index 87fd30b407d3..e93054a5fbc1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d6b24507972341e5babdca8e25448325c9137232 +refs/heads/master: 739be96ab83755e10fd0c2b6a34c8a73254527f7 diff --git a/trunk/sound/soc/atmel/Kconfig b/trunk/sound/soc/atmel/Kconfig index d1fcc816ce97..a4d6742d61e3 100644 --- a/trunk/sound/soc/atmel/Kconfig +++ b/trunk/sound/soc/atmel/Kconfig @@ -9,6 +9,7 @@ config SND_ATMEL_SOC config SND_ATMEL_SOC_SSC tristate depends on SND_ATMEL_SOC + select ATMEL_SSC help Say Y or M if you want to add support for codecs the ATMEL SSC interface. You will also needs to select the individual diff --git a/trunk/sound/soc/codecs/cx20442.c b/trunk/sound/soc/codecs/cx20442.c index d5fd00a64748..ae55e31bfc72 100644 --- a/trunk/sound/soc/codecs/cx20442.c +++ b/trunk/sound/soc/codecs/cx20442.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -26,8 +25,8 @@ struct cx20442_priv { + enum snd_soc_control_type control_type; void *control_data; - struct regulator *por; }; #define CX20442_PM 0x0 @@ -325,38 +324,6 @@ static struct snd_soc_dai_driver cx20442_dai = { }, }; -static int cx20442_set_bias_level(struct snd_soc_codec *codec, - enum snd_soc_bias_level level) -{ - struct cx20442_priv *cx20442 = snd_soc_codec_get_drvdata(codec); - int err = 0; - - switch (level) { - case SND_SOC_BIAS_PREPARE: - if (codec->dapm.bias_level != SND_SOC_BIAS_STANDBY) - break; - if (IS_ERR(cx20442->por)) - err = PTR_ERR(cx20442->por); - else - err = regulator_enable(cx20442->por); - break; - case SND_SOC_BIAS_STANDBY: - if (codec->dapm.bias_level != SND_SOC_BIAS_PREPARE) - break; - if (IS_ERR(cx20442->por)) - err = PTR_ERR(cx20442->por); - else - err = regulator_disable(cx20442->por); - break; - default: - break; - } - if (!err) - codec->dapm.bias_level = level; - - return err; -} - static int cx20442_codec_probe(struct snd_soc_codec *codec) { struct cx20442_priv *cx20442; @@ -364,13 +331,9 @@ static int cx20442_codec_probe(struct snd_soc_codec *codec) cx20442 = kzalloc(sizeof(struct cx20442_priv), GFP_KERNEL); if (cx20442 == NULL) return -ENOMEM; + snd_soc_codec_set_drvdata(codec, cx20442); - cx20442->por = regulator_get(codec->dev, "POR"); - if (IS_ERR(cx20442->por)) - dev_warn(codec->dev, "failed to get the regulator"); cx20442->control_data = NULL; - - snd_soc_codec_set_drvdata(codec, cx20442); codec->hw_write = NULL; codec->card->pop_time = 0; @@ -387,12 +350,6 @@ static int cx20442_codec_remove(struct snd_soc_codec *codec) tty_hangup(tty); } - if (!IS_ERR(cx20442->por)) { - /* should be already in STANDBY, hence disabled */ - regulator_put(cx20442->por); - } - - snd_soc_codec_set_drvdata(codec, NULL); kfree(cx20442); return 0; } @@ -402,7 +359,6 @@ static const u8 cx20442_reg; static struct snd_soc_codec_driver cx20442_codec_dev = { .probe = cx20442_codec_probe, .remove = cx20442_codec_remove, - .set_bias_level = cx20442_set_bias_level, .reg_cache_default = &cx20442_reg, .reg_cache_size = 1, .reg_word_size = sizeof(u8), diff --git a/trunk/sound/soc/codecs/twl6040.c b/trunk/sound/soc/codecs/twl6040.c index 5b9c79b6f65e..3376e6fad2a2 100644 --- a/trunk/sound/soc/codecs/twl6040.c +++ b/trunk/sound/soc/codecs/twl6040.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include @@ -1013,28 +1012,6 @@ static int twl6040_pll_put_enum(struct snd_kcontrol *kcontrol, return 0; } -int twl6040_get_dl1_gain(struct snd_soc_codec *codec) -{ - struct snd_soc_dapm_context *dapm = &codec->dapm; - - if (snd_soc_dapm_get_pin_status(dapm, "EP")) - return -1; /* -1dB */ - - if (snd_soc_dapm_get_pin_status(dapm, "HSOR") || - snd_soc_dapm_get_pin_status(dapm, "HSOL")) { - - u8 val = snd_soc_read(codec, TWL6040_REG_HSLCTL); - if (val & TWL6040_HSDACMODE) - /* HSDACL in LP mode */ - return -8; /* -8dB */ - else - /* HSDACL in HP mode */ - return -1; /* -1dB */ - } - return 0; /* 0dB */ -} -EXPORT_SYMBOL_GPL(twl6040_get_dl1_gain); - int twl6040_get_clk_id(struct snd_soc_codec *codec) { struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); diff --git a/trunk/sound/soc/codecs/twl6040.h b/trunk/sound/soc/codecs/twl6040.h index ef273f1fac2f..a83277bdb851 100644 --- a/trunk/sound/soc/codecs/twl6040.h +++ b/trunk/sound/soc/codecs/twl6040.h @@ -34,7 +34,6 @@ enum twl6040_trim { #define TWL6040_HSF_TRIM_LEFT(x) (x & 0x0f) #define TWL6040_HSF_TRIM_RIGHT(x) ((x >> 4) & 0x0f) -int twl6040_get_dl1_gain(struct snd_soc_codec *codec); void twl6040_hs_jack_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, int report); int twl6040_get_clk_id(struct snd_soc_codec *codec); diff --git a/trunk/sound/soc/omap/am3517evm.c b/trunk/sound/soc/omap/am3517evm.c index add4866d7e67..c1cd4a0cbe9e 100644 --- a/trunk/sound/soc/omap/am3517evm.c +++ b/trunk/sound/soc/omap/am3517evm.c @@ -107,7 +107,6 @@ static struct snd_soc_dai_link am3517evm_dai = { /* Audio machine driver */ static struct snd_soc_card snd_soc_am3517evm = { .name = "am3517evm", - .owner = THIS_MODULE, .dai_link = &am3517evm_dai, .num_links = 1, diff --git a/trunk/sound/soc/omap/ams-delta.c b/trunk/sound/soc/omap/ams-delta.c index a67f4370bc9f..a04a4338fdac 100644 --- a/trunk/sound/soc/omap/ams-delta.c +++ b/trunk/sound/soc/omap/ams-delta.c @@ -431,20 +431,22 @@ static int ams_delta_set_bias_level(struct snd_soc_card *card, struct snd_soc_dapm_context *dapm, enum snd_soc_bias_level level) { + struct snd_soc_codec *codec = card->rtd->codec; + switch (level) { case SND_SOC_BIAS_ON: case SND_SOC_BIAS_PREPARE: case SND_SOC_BIAS_STANDBY: - if (card->dapm.bias_level == SND_SOC_BIAS_OFF) + if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) ams_delta_latch2_write(AMS_DELTA_LATCH2_MODEM_NRESET, AMS_DELTA_LATCH2_MODEM_NRESET); break; case SND_SOC_BIAS_OFF: - if (card->dapm.bias_level != SND_SOC_BIAS_OFF) + if (codec->dapm.bias_level != SND_SOC_BIAS_OFF) ams_delta_latch2_write(AMS_DELTA_LATCH2_MODEM_NRESET, 0); } - card->dapm.bias_level = level; + codec->dapm.bias_level = level; return 0; } @@ -595,7 +597,6 @@ static struct snd_soc_dai_link ams_delta_dai_link = { /* Audio card driver */ static struct snd_soc_card ams_delta_audio_card = { .name = "AMS_DELTA", - .owner = THIS_MODULE, .dai_link = &ams_delta_dai_link, .num_links = 1, .set_bias_level = ams_delta_set_bias_level, diff --git a/trunk/sound/soc/omap/igep0020.c b/trunk/sound/soc/omap/igep0020.c index ccae58a1339c..591fbf8f7cd9 100644 --- a/trunk/sound/soc/omap/igep0020.c +++ b/trunk/sound/soc/omap/igep0020.c @@ -72,7 +72,6 @@ static struct snd_soc_dai_link igep2_dai = { /* Audio machine driver */ static struct snd_soc_card snd_soc_card_igep2 = { .name = "igep2", - .owner = THIS_MODULE, .dai_link = &igep2_dai, .num_links = 1, }; diff --git a/trunk/sound/soc/omap/n810.c b/trunk/sound/soc/omap/n810.c index 597be412f1e4..fc6209b3f20c 100644 --- a/trunk/sound/soc/omap/n810.c +++ b/trunk/sound/soc/omap/n810.c @@ -289,7 +289,6 @@ static struct snd_soc_dai_link n810_dai = { /* Audio machine driver */ static struct snd_soc_card snd_soc_n810 = { .name = "N810", - .owner = THIS_MODULE, .dai_link = &n810_dai, .num_links = 1, diff --git a/trunk/sound/soc/omap/omap3evm.c b/trunk/sound/soc/omap/omap3evm.c index 071fcb09b8b2..68578959e4aa 100644 --- a/trunk/sound/soc/omap/omap3evm.c +++ b/trunk/sound/soc/omap/omap3evm.c @@ -70,7 +70,6 @@ static struct snd_soc_dai_link omap3evm_dai = { /* Audio machine driver */ static struct snd_soc_card snd_soc_omap3evm = { .name = "omap3evm", - .owner = THIS_MODULE, .dai_link = &omap3evm_dai, .num_links = 1, }; diff --git a/trunk/sound/soc/omap/omap3pandora.c b/trunk/sound/soc/omap/omap3pandora.c index 07794bd10952..7605c37c91e7 100644 --- a/trunk/sound/soc/omap/omap3pandora.c +++ b/trunk/sound/soc/omap/omap3pandora.c @@ -233,7 +233,6 @@ static struct snd_soc_dai_link omap3pandora_dai[] = { /* SoC card */ static struct snd_soc_card snd_soc_card_omap3pandora = { .name = "omap3pandora", - .owner = THIS_MODULE, .dai_link = omap3pandora_dai, .num_links = ARRAY_SIZE(omap3pandora_dai), }; diff --git a/trunk/sound/soc/omap/omap4-hdmi-card.c b/trunk/sound/soc/omap/omap4-hdmi-card.c index 28d689b2714d..52d471c1eeed 100644 --- a/trunk/sound/soc/omap/omap4-hdmi-card.c +++ b/trunk/sound/soc/omap/omap4-hdmi-card.c @@ -74,7 +74,6 @@ static struct snd_soc_dai_link omap4_hdmi_dai = { static struct snd_soc_card snd_soc_omap4_hdmi = { .name = "OMAP4HDMI", - .owner = THIS_MODULE, .dai_link = &omap4_hdmi_dai, .num_links = 1, }; diff --git a/trunk/sound/soc/omap/osk5912.c b/trunk/sound/soc/omap/osk5912.c index d859b597e7ec..351ec9db384d 100644 --- a/trunk/sound/soc/omap/osk5912.c +++ b/trunk/sound/soc/omap/osk5912.c @@ -108,7 +108,6 @@ static struct snd_soc_dai_link osk_dai = { /* Audio machine driver */ static struct snd_soc_card snd_soc_card_osk = { .name = "OSK5912", - .owner = THIS_MODULE, .dai_link = &osk_dai, .num_links = 1, diff --git a/trunk/sound/soc/omap/overo.c b/trunk/sound/soc/omap/overo.c index 2ee889c50256..c3550aeee533 100644 --- a/trunk/sound/soc/omap/overo.c +++ b/trunk/sound/soc/omap/overo.c @@ -72,7 +72,6 @@ static struct snd_soc_dai_link overo_dai = { /* Audio machine driver */ static struct snd_soc_card snd_soc_card_overo = { .name = "overo", - .owner = THIS_MODULE, .dai_link = &overo_dai, .num_links = 1, }; diff --git a/trunk/sound/soc/omap/rx51.c b/trunk/sound/soc/omap/rx51.c index fada6ef43eea..ad16db536320 100644 --- a/trunk/sound/soc/omap/rx51.c +++ b/trunk/sound/soc/omap/rx51.c @@ -383,7 +383,6 @@ static struct snd_soc_codec_conf rx51_codec_conf[] = { /* Audio card */ static struct snd_soc_card rx51_sound_card = { .name = "RX-51", - .owner = THIS_MODULE, .dai_link = rx51_dai, .num_links = ARRAY_SIZE(rx51_dai), .aux_dev = rx51_aux_dev, diff --git a/trunk/sound/soc/omap/sdp3430.c b/trunk/sound/soc/omap/sdp3430.c index 2c850662ea7e..e8fbf8efdbb8 100644 --- a/trunk/sound/soc/omap/sdp3430.c +++ b/trunk/sound/soc/omap/sdp3430.c @@ -213,7 +213,6 @@ static struct snd_soc_dai_link sdp3430_dai[] = { /* Audio machine driver */ static struct snd_soc_card snd_soc_sdp3430 = { .name = "SDP3430", - .owner = THIS_MODULE, .dai_link = sdp3430_dai, .num_links = ARRAY_SIZE(sdp3430_dai), diff --git a/trunk/sound/soc/omap/sdp4430.c b/trunk/sound/soc/omap/sdp4430.c index 175ba9a04edf..2735fa03b74b 100644 --- a/trunk/sound/soc/omap/sdp4430.c +++ b/trunk/sound/soc/omap/sdp4430.c @@ -226,7 +226,6 @@ static struct snd_soc_dai_link sdp4430_dai[] = { /* Audio machine driver */ static struct snd_soc_card snd_soc_sdp4430 = { .name = "SDP4430", - .owner = THIS_MODULE, .dai_link = sdp4430_dai, .num_links = ARRAY_SIZE(sdp4430_dai), diff --git a/trunk/sound/soc/omap/zoom2.c b/trunk/sound/soc/omap/zoom2.c index 981616d61f67..7641a7fa8f97 100644 --- a/trunk/sound/soc/omap/zoom2.c +++ b/trunk/sound/soc/omap/zoom2.c @@ -157,7 +157,6 @@ static struct snd_soc_dai_link zoom2_dai[] = { /* Audio machine driver */ static struct snd_soc_card snd_soc_zoom2 = { .name = "Zoom2", - .owner = THIS_MODULE, .dai_link = zoom2_dai, .num_links = ARRAY_SIZE(zoom2_dai),