diff options
| -rw-r--r-- | drivers/misc/atmel-ssc.c | 13 | ||||
| -rw-r--r-- | include/linux/atmel-ssc.h | 13 | ||||
| -rw-r--r-- | sound/soc/atmel/atmel_ssc_dai.c | 34 | ||||
| -rw-r--r-- | sound/soc/atmel/atmel_wm8904.c | 50 | ||||
| -rw-r--r-- | sound/soc/codecs/cs42l52.c | 14 | ||||
| -rw-r--r-- | sound/soc/codecs/cs42l56.c | 12 | ||||
| -rw-r--r-- | sound/soc/codecs/cs42l73.c | 2 | ||||
| -rw-r--r-- | sound/soc/codecs/twl4030.c | 5 | ||||
| -rw-r--r-- | sound/soc/codecs/wm8350.c | 3 | ||||
| -rw-r--r-- | sound/soc/codecs/wm8996.c | 3 |
10 files changed, 60 insertions, 89 deletions
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index 22de13727641..60843a275abd 100644 --- a/drivers/misc/atmel-ssc.c +++ b/drivers/misc/atmel-ssc.c | |||
| @@ -83,10 +83,17 @@ EXPORT_SYMBOL(ssc_free); | |||
| 83 | 83 | ||
| 84 | static struct atmel_ssc_platform_data at91rm9200_config = { | 84 | static struct atmel_ssc_platform_data at91rm9200_config = { |
| 85 | .use_dma = 0, | 85 | .use_dma = 0, |
| 86 | .has_fslen_ext = 0, | ||
| 87 | }; | ||
| 88 | |||
| 89 | static struct atmel_ssc_platform_data at91sam9rl_config = { | ||
| 90 | .use_dma = 0, | ||
| 91 | .has_fslen_ext = 1, | ||
| 86 | }; | 92 | }; |
| 87 | 93 | ||
| 88 | static struct atmel_ssc_platform_data at91sam9g45_config = { | 94 | static struct atmel_ssc_platform_data at91sam9g45_config = { |
| 89 | .use_dma = 1, | 95 | .use_dma = 1, |
| 96 | .has_fslen_ext = 1, | ||
| 90 | }; | 97 | }; |
| 91 | 98 | ||
| 92 | static const struct platform_device_id atmel_ssc_devtypes[] = { | 99 | static const struct platform_device_id atmel_ssc_devtypes[] = { |
| @@ -94,6 +101,9 @@ static const struct platform_device_id atmel_ssc_devtypes[] = { | |||
| 94 | .name = "at91rm9200_ssc", | 101 | .name = "at91rm9200_ssc", |
| 95 | .driver_data = (unsigned long) &at91rm9200_config, | 102 | .driver_data = (unsigned long) &at91rm9200_config, |
| 96 | }, { | 103 | }, { |
| 104 | .name = "at91sam9rl_ssc", | ||
| 105 | .driver_data = (unsigned long) &at91sam9rl_config, | ||
| 106 | }, { | ||
| 97 | .name = "at91sam9g45_ssc", | 107 | .name = "at91sam9g45_ssc", |
| 98 | .driver_data = (unsigned long) &at91sam9g45_config, | 108 | .driver_data = (unsigned long) &at91sam9g45_config, |
| 99 | }, { | 109 | }, { |
| @@ -107,6 +117,9 @@ static const struct of_device_id atmel_ssc_dt_ids[] = { | |||
| 107 | .compatible = "atmel,at91rm9200-ssc", | 117 | .compatible = "atmel,at91rm9200-ssc", |
| 108 | .data = &at91rm9200_config, | 118 | .data = &at91rm9200_config, |
| 109 | }, { | 119 | }, { |
| 120 | .compatible = "atmel,at91sam9rl-ssc", | ||
| 121 | .data = &at91sam9rl_config, | ||
| 122 | }, { | ||
| 110 | .compatible = "atmel,at91sam9g45-ssc", | 123 | .compatible = "atmel,at91sam9g45-ssc", |
| 111 | .data = &at91sam9g45_config, | 124 | .data = &at91sam9g45_config, |
| 112 | }, { | 125 | }, { |
diff --git a/include/linux/atmel-ssc.h b/include/linux/atmel-ssc.h index 571a12ebb018..7c0f6549898b 100644 --- a/include/linux/atmel-ssc.h +++ b/include/linux/atmel-ssc.h | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | struct atmel_ssc_platform_data { | 8 | struct atmel_ssc_platform_data { |
| 9 | int use_dma; | 9 | int use_dma; |
| 10 | int has_fslen_ext; | ||
| 10 | }; | 11 | }; |
| 11 | 12 | ||
| 12 | struct ssc_device { | 13 | struct ssc_device { |
| @@ -71,6 +72,12 @@ void ssc_free(struct ssc_device *ssc); | |||
| 71 | #define SSC_RFMR_DATNB_OFFSET 8 | 72 | #define SSC_RFMR_DATNB_OFFSET 8 |
| 72 | #define SSC_RFMR_FSEDGE_SIZE 1 | 73 | #define SSC_RFMR_FSEDGE_SIZE 1 |
| 73 | #define SSC_RFMR_FSEDGE_OFFSET 24 | 74 | #define SSC_RFMR_FSEDGE_OFFSET 24 |
| 75 | /* | ||
| 76 | * The FSLEN_EXT exist on at91sam9rl, at91sam9g10, | ||
| 77 | * at91sam9g20, and at91sam9g45 and newer SoCs | ||
| 78 | */ | ||
| 79 | #define SSC_RFMR_FSLEN_EXT_SIZE 4 | ||
| 80 | #define SSC_RFMR_FSLEN_EXT_OFFSET 28 | ||
| 74 | #define SSC_RFMR_FSLEN_SIZE 4 | 81 | #define SSC_RFMR_FSLEN_SIZE 4 |
| 75 | #define SSC_RFMR_FSLEN_OFFSET 16 | 82 | #define SSC_RFMR_FSLEN_OFFSET 16 |
| 76 | #define SSC_RFMR_FSOS_SIZE 4 | 83 | #define SSC_RFMR_FSOS_SIZE 4 |
| @@ -109,6 +116,12 @@ void ssc_free(struct ssc_device *ssc); | |||
| 109 | #define SSC_TFMR_FSDEN_OFFSET 23 | 116 | #define SSC_TFMR_FSDEN_OFFSET 23 |
| 110 | #define SSC_TFMR_FSEDGE_SIZE 1 | 117 | #define SSC_TFMR_FSEDGE_SIZE 1 |
| 111 | #define SSC_TFMR_FSEDGE_OFFSET 24 | 118 | #define SSC_TFMR_FSEDGE_OFFSET 24 |
| 119 | /* | ||
| 120 | * The FSLEN_EXT exist on at91sam9rl, at91sam9g10, | ||
| 121 | * at91sam9g20, and at91sam9g45 and newer SoCs | ||
| 122 | */ | ||
| 123 | #define SSC_TFMR_FSLEN_EXT_SIZE 4 | ||
| 124 | #define SSC_TFMR_FSLEN_EXT_OFFSET 28 | ||
| 112 | #define SSC_TFMR_FSLEN_SIZE 4 | 125 | #define SSC_TFMR_FSLEN_SIZE 4 |
| 113 | #define SSC_TFMR_FSLEN_OFFSET 16 | 126 | #define SSC_TFMR_FSLEN_OFFSET 16 |
| 114 | #define SSC_TFMR_FSOS_SIZE 3 | 127 | #define SSC_TFMR_FSOS_SIZE 3 |
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index de433cfd044c..f403f399808a 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c | |||
| @@ -347,6 +347,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 347 | u32 tfmr, rfmr, tcmr, rcmr; | 347 | u32 tfmr, rfmr, tcmr, rcmr; |
| 348 | int start_event; | 348 | int start_event; |
| 349 | int ret; | 349 | int ret; |
| 350 | int fslen, fslen_ext; | ||
| 350 | 351 | ||
| 351 | /* | 352 | /* |
| 352 | * Currently, there is only one set of dma params for | 353 | * Currently, there is only one set of dma params for |
| @@ -388,18 +389,6 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 388 | } | 389 | } |
| 389 | 390 | ||
| 390 | /* | 391 | /* |
| 391 | * The SSC only supports up to 16-bit samples in I2S format, due | ||
| 392 | * to the size of the Frame Mode Register FSLEN field. | ||
| 393 | */ | ||
| 394 | if ((ssc_p->daifmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_I2S | ||
| 395 | && bits > 16) { | ||
| 396 | printk(KERN_WARNING | ||
| 397 | "atmel_ssc_dai: sample size %d " | ||
| 398 | "is too large for I2S\n", bits); | ||
| 399 | return -EINVAL; | ||
| 400 | } | ||
| 401 | |||
| 402 | /* | ||
| 403 | * Compute SSC register settings. | 392 | * Compute SSC register settings. |
| 404 | */ | 393 | */ |
| 405 | switch (ssc_p->daifmt | 394 | switch (ssc_p->daifmt |
| @@ -413,6 +402,17 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 413 | * from the MCK divider, and the BCLK signal | 402 | * from the MCK divider, and the BCLK signal |
| 414 | * is output on the SSC TK line. | 403 | * is output on the SSC TK line. |
| 415 | */ | 404 | */ |
| 405 | |||
| 406 | if (bits > 16 && !ssc->pdata->has_fslen_ext) { | ||
| 407 | dev_err(dai->dev, | ||
| 408 | "sample size %d is too large for SSC device\n", | ||
| 409 | bits); | ||
| 410 | return -EINVAL; | ||
| 411 | } | ||
| 412 | |||
| 413 | fslen_ext = (bits - 1) / 16; | ||
| 414 | fslen = (bits - 1) % 16; | ||
| 415 | |||
| 416 | rcmr = SSC_BF(RCMR_PERIOD, ssc_p->rcmr_period) | 416 | rcmr = SSC_BF(RCMR_PERIOD, ssc_p->rcmr_period) |
| 417 | | SSC_BF(RCMR_STTDLY, START_DELAY) | 417 | | SSC_BF(RCMR_STTDLY, START_DELAY) |
| 418 | | SSC_BF(RCMR_START, SSC_START_FALLING_RF) | 418 | | SSC_BF(RCMR_START, SSC_START_FALLING_RF) |
| @@ -420,9 +420,10 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 420 | | SSC_BF(RCMR_CKO, SSC_CKO_NONE) | 420 | | SSC_BF(RCMR_CKO, SSC_CKO_NONE) |
| 421 | | SSC_BF(RCMR_CKS, SSC_CKS_DIV); | 421 | | SSC_BF(RCMR_CKS, SSC_CKS_DIV); |
| 422 | 422 | ||
| 423 | rfmr = SSC_BF(RFMR_FSEDGE, SSC_FSEDGE_POSITIVE) | 423 | rfmr = SSC_BF(RFMR_FSLEN_EXT, fslen_ext) |
| 424 | | SSC_BF(RFMR_FSEDGE, SSC_FSEDGE_POSITIVE) | ||
| 424 | | SSC_BF(RFMR_FSOS, SSC_FSOS_NEGATIVE) | 425 | | SSC_BF(RFMR_FSOS, SSC_FSOS_NEGATIVE) |
| 425 | | SSC_BF(RFMR_FSLEN, (bits - 1)) | 426 | | SSC_BF(RFMR_FSLEN, fslen) |
| 426 | | SSC_BF(RFMR_DATNB, (channels - 1)) | 427 | | SSC_BF(RFMR_DATNB, (channels - 1)) |
| 427 | | SSC_BIT(RFMR_MSBF) | 428 | | SSC_BIT(RFMR_MSBF) |
| 428 | | SSC_BF(RFMR_LOOP, 0) | 429 | | SSC_BF(RFMR_LOOP, 0) |
| @@ -435,10 +436,11 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 435 | | SSC_BF(TCMR_CKO, SSC_CKO_CONTINUOUS) | 436 | | SSC_BF(TCMR_CKO, SSC_CKO_CONTINUOUS) |
| 436 | | SSC_BF(TCMR_CKS, SSC_CKS_DIV); | 437 | | SSC_BF(TCMR_CKS, SSC_CKS_DIV); |
| 437 | 438 | ||
| 438 | tfmr = SSC_BF(TFMR_FSEDGE, SSC_FSEDGE_POSITIVE) | 439 | tfmr = SSC_BF(TFMR_FSLEN_EXT, fslen_ext) |
| 440 | | SSC_BF(TFMR_FSEDGE, SSC_FSEDGE_POSITIVE) | ||
| 439 | | SSC_BF(TFMR_FSDEN, 0) | 441 | | SSC_BF(TFMR_FSDEN, 0) |
| 440 | | SSC_BF(TFMR_FSOS, SSC_FSOS_NEGATIVE) | 442 | | SSC_BF(TFMR_FSOS, SSC_FSOS_NEGATIVE) |
| 441 | | SSC_BF(TFMR_FSLEN, (bits - 1)) | 443 | | SSC_BF(TFMR_FSLEN, fslen) |
| 442 | | SSC_BF(TFMR_DATNB, (channels - 1)) | 444 | | SSC_BF(TFMR_DATNB, (channels - 1)) |
| 443 | | SSC_BIT(TFMR_MSBF) | 445 | | SSC_BIT(TFMR_MSBF) |
| 444 | | SSC_BF(TFMR_DATDEF, 0) | 446 | | SSC_BF(TFMR_DATDEF, 0) |
diff --git a/sound/soc/atmel/atmel_wm8904.c b/sound/soc/atmel/atmel_wm8904.c index b4e36901a40b..4052268ce462 100644 --- a/sound/soc/atmel/atmel_wm8904.c +++ b/sound/soc/atmel/atmel_wm8904.c | |||
| @@ -18,10 +18,6 @@ | |||
| 18 | #include "../codecs/wm8904.h" | 18 | #include "../codecs/wm8904.h" |
| 19 | #include "atmel_ssc_dai.h" | 19 | #include "atmel_ssc_dai.h" |
| 20 | 20 | ||
| 21 | #define MCLK_RATE 32768 | ||
| 22 | |||
| 23 | static struct clk *mclk; | ||
| 24 | |||
| 25 | static const struct snd_soc_dapm_widget atmel_asoc_wm8904_dapm_widgets[] = { | 21 | static const struct snd_soc_dapm_widget atmel_asoc_wm8904_dapm_widgets[] = { |
| 26 | SND_SOC_DAPM_HP("Headphone Jack", NULL), | 22 | SND_SOC_DAPM_HP("Headphone Jack", NULL), |
| 27 | SND_SOC_DAPM_MIC("Mic", NULL), | 23 | SND_SOC_DAPM_MIC("Mic", NULL), |
| @@ -61,26 +57,6 @@ static struct snd_soc_ops atmel_asoc_wm8904_ops = { | |||
| 61 | .hw_params = atmel_asoc_wm8904_hw_params, | 57 | .hw_params = atmel_asoc_wm8904_hw_params, |
| 62 | }; | 58 | }; |
| 63 | 59 | ||
| 64 | static int atmel_set_bias_level(struct snd_soc_card *card, | ||
| 65 | struct snd_soc_dapm_context *dapm, | ||
| 66 | enum snd_soc_bias_level level) | ||
| 67 | { | ||
| 68 | if (dapm->bias_level == SND_SOC_BIAS_STANDBY) { | ||
| 69 | switch (level) { | ||
| 70 | case SND_SOC_BIAS_PREPARE: | ||
| 71 | clk_prepare_enable(mclk); | ||
| 72 | break; | ||
| 73 | case SND_SOC_BIAS_OFF: | ||
| 74 | clk_disable_unprepare(mclk); | ||
| 75 | break; | ||
| 76 | default: | ||
| 77 | break; | ||
| 78 | } | ||
| 79 | } | ||
| 80 | |||
| 81 | return 0; | ||
| 82 | }; | ||
| 83 | |||
| 84 | static struct snd_soc_dai_link atmel_asoc_wm8904_dailink = { | 60 | static struct snd_soc_dai_link atmel_asoc_wm8904_dailink = { |
| 85 | .name = "WM8904", | 61 | .name = "WM8904", |
| 86 | .stream_name = "WM8904 PCM", | 62 | .stream_name = "WM8904 PCM", |
| @@ -94,7 +70,6 @@ static struct snd_soc_dai_link atmel_asoc_wm8904_dailink = { | |||
| 94 | static struct snd_soc_card atmel_asoc_wm8904_card = { | 70 | static struct snd_soc_card atmel_asoc_wm8904_card = { |
| 95 | .name = "atmel_asoc_wm8904", | 71 | .name = "atmel_asoc_wm8904", |
| 96 | .owner = THIS_MODULE, | 72 | .owner = THIS_MODULE, |
| 97 | .set_bias_level = atmel_set_bias_level, | ||
| 98 | .dai_link = &atmel_asoc_wm8904_dailink, | 73 | .dai_link = &atmel_asoc_wm8904_dailink, |
| 99 | .num_links = 1, | 74 | .num_links = 1, |
| 100 | .dapm_widgets = atmel_asoc_wm8904_dapm_widgets, | 75 | .dapm_widgets = atmel_asoc_wm8904_dapm_widgets, |
| @@ -153,7 +128,6 @@ static int atmel_asoc_wm8904_probe(struct platform_device *pdev) | |||
| 153 | { | 128 | { |
| 154 | struct snd_soc_card *card = &atmel_asoc_wm8904_card; | 129 | struct snd_soc_card *card = &atmel_asoc_wm8904_card; |
| 155 | struct snd_soc_dai_link *dailink = &atmel_asoc_wm8904_dailink; | 130 | struct snd_soc_dai_link *dailink = &atmel_asoc_wm8904_dailink; |
| 156 | struct clk *clk_src; | ||
| 157 | int id, ret; | 131 | int id, ret; |
| 158 | 132 | ||
| 159 | card->dev = &pdev->dev; | 133 | card->dev = &pdev->dev; |
| @@ -170,30 +144,6 @@ static int atmel_asoc_wm8904_probe(struct platform_device *pdev) | |||
| 170 | return ret; | 144 | return ret; |
| 171 | } | 145 | } |
| 172 | 146 | ||
| 173 | mclk = clk_get(NULL, "pck0"); | ||
| 174 | if (IS_ERR(mclk)) { | ||
| 175 | dev_err(&pdev->dev, "failed to get pck0\n"); | ||
| 176 | ret = PTR_ERR(mclk); | ||
| 177 | goto err_set_audio; | ||
| 178 | } | ||
| 179 | |||
| 180 | clk_src = clk_get(NULL, "clk32k"); | ||
| 181 | if (IS_ERR(clk_src)) { | ||
| 182 | dev_err(&pdev->dev, "failed to get clk32k\n"); | ||
| 183 | ret = PTR_ERR(clk_src); | ||
| 184 | goto err_set_audio; | ||
| 185 | } | ||
| 186 | |||
| 187 | ret = clk_set_parent(mclk, clk_src); | ||
| 188 | clk_put(clk_src); | ||
| 189 | if (ret != 0) { | ||
| 190 | dev_err(&pdev->dev, "failed to set MCLK parent\n"); | ||
| 191 | goto err_set_audio; | ||
| 192 | } | ||
| 193 | |||
| 194 | dev_info(&pdev->dev, "setting pck0 to %dHz\n", MCLK_RATE); | ||
| 195 | clk_set_rate(mclk, MCLK_RATE); | ||
| 196 | |||
| 197 | ret = snd_soc_register_card(card); | 147 | ret = snd_soc_register_card(card); |
| 198 | if (ret) { | 148 | if (ret) { |
| 199 | dev_err(&pdev->dev, "snd_soc_register_card failed\n"); | 149 | dev_err(&pdev->dev, "snd_soc_register_card failed\n"); |
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 071fc77f2f06..969167d8b71e 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c | |||
| @@ -399,15 +399,15 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = { | |||
| 399 | CS42L52_MASTERB_VOL, 0, 0x34, 0xE4, hl_tlv), | 399 | CS42L52_MASTERB_VOL, 0, 0x34, 0xE4, hl_tlv), |
| 400 | 400 | ||
| 401 | SOC_DOUBLE_R_SX_TLV("Headphone Volume", CS42L52_HPA_VOL, | 401 | SOC_DOUBLE_R_SX_TLV("Headphone Volume", CS42L52_HPA_VOL, |
| 402 | CS42L52_HPB_VOL, 0, 0x34, 0xCC, hpd_tlv), | 402 | CS42L52_HPB_VOL, 0, 0x34, 0xC0, hpd_tlv), |
| 403 | 403 | ||
| 404 | SOC_ENUM("Headphone Analog Gain", hp_gain_enum), | 404 | SOC_ENUM("Headphone Analog Gain", hp_gain_enum), |
| 405 | 405 | ||
| 406 | SOC_DOUBLE_R_SX_TLV("Speaker Volume", CS42L52_SPKA_VOL, | 406 | SOC_DOUBLE_R_SX_TLV("Speaker Volume", CS42L52_SPKA_VOL, |
| 407 | CS42L52_SPKB_VOL, 0, 0x1, 0xff, hl_tlv), | 407 | CS42L52_SPKB_VOL, 0, 0x40, 0xC0, hl_tlv), |
| 408 | 408 | ||
| 409 | SOC_DOUBLE_R_SX_TLV("Bypass Volume", CS42L52_PASSTHRUA_VOL, | 409 | SOC_DOUBLE_R_SX_TLV("Bypass Volume", CS42L52_PASSTHRUA_VOL, |
| 410 | CS42L52_PASSTHRUB_VOL, 6, 0x18, 0x90, pga_tlv), | 410 | CS42L52_PASSTHRUB_VOL, 0, 0x88, 0x90, pga_tlv), |
| 411 | 411 | ||
| 412 | SOC_DOUBLE("Bypass Mute", CS42L52_MISC_CTL, 4, 5, 1, 0), | 412 | SOC_DOUBLE("Bypass Mute", CS42L52_MISC_CTL, 4, 5, 1, 0), |
| 413 | 413 | ||
| @@ -417,10 +417,10 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = { | |||
| 417 | SOC_ENUM("MIC Bias Level", mic_bias_level_enum), | 417 | SOC_ENUM("MIC Bias Level", mic_bias_level_enum), |
| 418 | 418 | ||
| 419 | SOC_DOUBLE_R_SX_TLV("ADC Volume", CS42L52_ADCA_VOL, | 419 | SOC_DOUBLE_R_SX_TLV("ADC Volume", CS42L52_ADCA_VOL, |
| 420 | CS42L52_ADCB_VOL, 7, 0x80, 0xA0, ipd_tlv), | 420 | CS42L52_ADCB_VOL, 0, 0xA0, 0x78, ipd_tlv), |
| 421 | SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume", | 421 | SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume", |
| 422 | CS42L52_ADCA_MIXER_VOL, CS42L52_ADCB_MIXER_VOL, | 422 | CS42L52_ADCA_MIXER_VOL, CS42L52_ADCB_MIXER_VOL, |
| 423 | 6, 0x7f, 0x19, ipd_tlv), | 423 | 0, 0x19, 0x7F, ipd_tlv), |
| 424 | 424 | ||
| 425 | SOC_DOUBLE("ADC Switch", CS42L52_ADC_MISC_CTL, 0, 1, 1, 0), | 425 | SOC_DOUBLE("ADC Switch", CS42L52_ADC_MISC_CTL, 0, 1, 1, 0), |
| 426 | 426 | ||
| @@ -428,11 +428,11 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = { | |||
| 428 | CS42L52_ADCB_MIXER_VOL, 7, 1, 1), | 428 | CS42L52_ADCB_MIXER_VOL, 7, 1, 1), |
| 429 | 429 | ||
| 430 | SOC_DOUBLE_R_SX_TLV("PGA Volume", CS42L52_PGAA_CTL, | 430 | SOC_DOUBLE_R_SX_TLV("PGA Volume", CS42L52_PGAA_CTL, |
| 431 | CS42L52_PGAB_CTL, 0, 0x28, 0x30, pga_tlv), | 431 | CS42L52_PGAB_CTL, 0, 0x28, 0x24, pga_tlv), |
| 432 | 432 | ||
| 433 | SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume", | 433 | SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume", |
| 434 | CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, | 434 | CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, |
| 435 | 0, 0x7f, 0x19, mix_tlv), | 435 | 0, 0x19, 0x7f, mix_tlv), |
| 436 | SOC_DOUBLE_R("PCM Mixer Switch", | 436 | SOC_DOUBLE_R("PCM Mixer Switch", |
| 437 | CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, 7, 1, 1), | 437 | CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, 7, 1, 1), |
| 438 | 438 | ||
diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c index 8e68ef5de849..24fbffee09ea 100644 --- a/sound/soc/codecs/cs42l56.c +++ b/sound/soc/codecs/cs42l56.c | |||
| @@ -421,15 +421,15 @@ static const struct soc_enum ng_delay_enum = | |||
| 421 | static const struct snd_kcontrol_new cs42l56_snd_controls[] = { | 421 | static const struct snd_kcontrol_new cs42l56_snd_controls[] = { |
| 422 | 422 | ||
| 423 | SOC_DOUBLE_R_SX_TLV("Master Volume", CS42L56_MASTER_A_VOLUME, | 423 | SOC_DOUBLE_R_SX_TLV("Master Volume", CS42L56_MASTER_A_VOLUME, |
| 424 | CS42L56_MASTER_B_VOLUME, 0, 0x34, 0xfd, adv_tlv), | 424 | CS42L56_MASTER_B_VOLUME, 0, 0x34, 0xE4, adv_tlv), |
| 425 | SOC_DOUBLE("Master Mute Switch", CS42L56_DSP_MUTE_CTL, 0, 1, 1, 1), | 425 | SOC_DOUBLE("Master Mute Switch", CS42L56_DSP_MUTE_CTL, 0, 1, 1, 1), |
| 426 | 426 | ||
| 427 | SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume", CS42L56_ADCA_MIX_VOLUME, | 427 | SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume", CS42L56_ADCA_MIX_VOLUME, |
| 428 | CS42L56_ADCB_MIX_VOLUME, 0, 0x88, 0xa9, hl_tlv), | 428 | CS42L56_ADCB_MIX_VOLUME, 0, 0x88, 0x90, hl_tlv), |
| 429 | SOC_DOUBLE("ADC Mixer Mute Switch", CS42L56_DSP_MUTE_CTL, 6, 7, 1, 1), | 429 | SOC_DOUBLE("ADC Mixer Mute Switch", CS42L56_DSP_MUTE_CTL, 6, 7, 1, 1), |
| 430 | 430 | ||
| 431 | SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume", CS42L56_PCMA_MIX_VOLUME, | 431 | SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume", CS42L56_PCMA_MIX_VOLUME, |
| 432 | CS42L56_PCMB_MIX_VOLUME, 0, 0x88, 0xa9, hl_tlv), | 432 | CS42L56_PCMB_MIX_VOLUME, 0, 0x88, 0x90, hl_tlv), |
| 433 | SOC_DOUBLE("PCM Mixer Mute Switch", CS42L56_DSP_MUTE_CTL, 4, 5, 1, 1), | 433 | SOC_DOUBLE("PCM Mixer Mute Switch", CS42L56_DSP_MUTE_CTL, 4, 5, 1, 1), |
| 434 | 434 | ||
| 435 | SOC_SINGLE_TLV("Analog Advisory Volume", | 435 | SOC_SINGLE_TLV("Analog Advisory Volume", |
| @@ -438,16 +438,16 @@ static const struct snd_kcontrol_new cs42l56_snd_controls[] = { | |||
| 438 | CS42L56_DIGINPUT_ADV_VOLUME, 0, 0x00, 1, adv_tlv), | 438 | CS42L56_DIGINPUT_ADV_VOLUME, 0, 0x00, 1, adv_tlv), |
| 439 | 439 | ||
| 440 | SOC_DOUBLE_R_SX_TLV("PGA Volume", CS42L56_PGAA_MUX_VOLUME, | 440 | SOC_DOUBLE_R_SX_TLV("PGA Volume", CS42L56_PGAA_MUX_VOLUME, |
| 441 | CS42L56_PGAB_MUX_VOLUME, 0, 0x34, 0xfd, pga_tlv), | 441 | CS42L56_PGAB_MUX_VOLUME, 0, 0x34, 0x24, pga_tlv), |
| 442 | SOC_DOUBLE_R_TLV("ADC Volume", CS42L56_ADCA_ATTENUATOR, | 442 | SOC_DOUBLE_R_TLV("ADC Volume", CS42L56_ADCA_ATTENUATOR, |
| 443 | CS42L56_ADCB_ATTENUATOR, 0, 0x00, 1, adc_tlv), | 443 | CS42L56_ADCB_ATTENUATOR, 0, 0x00, 1, adc_tlv), |
| 444 | SOC_DOUBLE("ADC Mute Switch", CS42L56_MISC_ADC_CTL, 2, 3, 1, 1), | 444 | SOC_DOUBLE("ADC Mute Switch", CS42L56_MISC_ADC_CTL, 2, 3, 1, 1), |
| 445 | SOC_DOUBLE("ADC Boost Switch", CS42L56_GAIN_BIAS_CTL, 3, 2, 1, 1), | 445 | SOC_DOUBLE("ADC Boost Switch", CS42L56_GAIN_BIAS_CTL, 3, 2, 1, 1), |
| 446 | 446 | ||
| 447 | SOC_DOUBLE_R_SX_TLV("Headphone Volume", CS42L56_HPA_VOLUME, | 447 | SOC_DOUBLE_R_SX_TLV("Headphone Volume", CS42L56_HPA_VOLUME, |
| 448 | CS42L56_HPB_VOLUME, 0, 0x44, 0x55, hl_tlv), | 448 | CS42L56_HPB_VOLUME, 0, 0x84, 0x48, hl_tlv), |
| 449 | SOC_DOUBLE_R_SX_TLV("LineOut Volume", CS42L56_LOA_VOLUME, | 449 | SOC_DOUBLE_R_SX_TLV("LineOut Volume", CS42L56_LOA_VOLUME, |
| 450 | CS42L56_LOB_VOLUME, 0, 0x44, 0x55, hl_tlv), | 450 | CS42L56_LOB_VOLUME, 0, 0x84, 0x48, hl_tlv), |
| 451 | 451 | ||
| 452 | SOC_SINGLE_TLV("Bass Shelving Volume", CS42L56_TONE_CTL, | 452 | SOC_SINGLE_TLV("Bass Shelving Volume", CS42L56_TONE_CTL, |
| 453 | 0, 0x00, 1, tone_tlv), | 453 | 0, 0x00, 1, tone_tlv), |
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index ae3717992d56..8658194f50bf 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c | |||
| @@ -401,7 +401,7 @@ static const struct snd_kcontrol_new cs42l73_snd_controls[] = { | |||
| 401 | CS42L73_LOBAVOL, 0, 0x41, 0x4B, hpaloa_tlv), | 401 | CS42L73_LOBAVOL, 0, 0x41, 0x4B, hpaloa_tlv), |
| 402 | 402 | ||
| 403 | SOC_DOUBLE_R_SX_TLV("Input PGA Analog Volume", CS42L73_MICAPREPGAAVOL, | 403 | SOC_DOUBLE_R_SX_TLV("Input PGA Analog Volume", CS42L73_MICAPREPGAAVOL, |
| 404 | CS42L73_MICBPREPGABVOL, 5, 0x34, | 404 | CS42L73_MICBPREPGABVOL, 0, 0x34, |
| 405 | 0x24, micpga_tlv), | 405 | 0x24, micpga_tlv), |
| 406 | 406 | ||
| 407 | SOC_DOUBLE_R("MIC Preamp Switch", CS42L73_MICAPREPGAAVOL, | 407 | SOC_DOUBLE_R("MIC Preamp Switch", CS42L73_MICAPREPGAAVOL, |
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 69e12a311ba2..6ab157065353 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
| @@ -344,17 +344,16 @@ static void twl4030_init_chip(struct snd_soc_codec *codec) | |||
| 344 | static void twl4030_apll_enable(struct snd_soc_codec *codec, int enable) | 344 | static void twl4030_apll_enable(struct snd_soc_codec *codec, int enable) |
| 345 | { | 345 | { |
| 346 | struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); | 346 | struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); |
| 347 | int status = -1; | ||
| 348 | 347 | ||
| 349 | if (enable) { | 348 | if (enable) { |
| 350 | twl4030->apll_enabled++; | 349 | twl4030->apll_enabled++; |
| 351 | if (twl4030->apll_enabled == 1) | 350 | if (twl4030->apll_enabled == 1) |
| 352 | status = twl4030_audio_enable_resource( | 351 | twl4030_audio_enable_resource( |
| 353 | TWL4030_AUDIO_RES_APLL); | 352 | TWL4030_AUDIO_RES_APLL); |
| 354 | } else { | 353 | } else { |
| 355 | twl4030->apll_enabled--; | 354 | twl4030->apll_enabled--; |
| 356 | if (!twl4030->apll_enabled) | 355 | if (!twl4030->apll_enabled) |
| 357 | status = twl4030_audio_disable_resource( | 356 | twl4030_audio_disable_resource( |
| 358 | TWL4030_AUDIO_RES_APLL); | 357 | TWL4030_AUDIO_RES_APLL); |
| 359 | } | 358 | } |
| 360 | } | 359 | } |
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index 392285edb595..d9e634c55e81 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c | |||
| @@ -1341,21 +1341,18 @@ int wm8350_hp_jack_detect(struct snd_soc_codec *codec, enum wm8350_jack which, | |||
| 1341 | { | 1341 | { |
| 1342 | struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); | 1342 | struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); |
| 1343 | struct wm8350 *wm8350 = priv->wm8350; | 1343 | struct wm8350 *wm8350 = priv->wm8350; |
| 1344 | int irq; | ||
| 1345 | int ena; | 1344 | int ena; |
| 1346 | 1345 | ||
| 1347 | switch (which) { | 1346 | switch (which) { |
| 1348 | case WM8350_JDL: | 1347 | case WM8350_JDL: |
| 1349 | priv->hpl.jack = jack; | 1348 | priv->hpl.jack = jack; |
| 1350 | priv->hpl.report = report; | 1349 | priv->hpl.report = report; |
| 1351 | irq = WM8350_IRQ_CODEC_JCK_DET_L; | ||
| 1352 | ena = WM8350_JDL_ENA; | 1350 | ena = WM8350_JDL_ENA; |
| 1353 | break; | 1351 | break; |
| 1354 | 1352 | ||
| 1355 | case WM8350_JDR: | 1353 | case WM8350_JDR: |
| 1356 | priv->hpr.jack = jack; | 1354 | priv->hpr.jack = jack; |
| 1357 | priv->hpr.report = report; | 1355 | priv->hpr.report = report; |
| 1358 | irq = WM8350_IRQ_CODEC_JCK_DET_R; | ||
| 1359 | ena = WM8350_JDR_ENA; | 1356 | ena = WM8350_JDR_ENA; |
| 1360 | break; | 1357 | break; |
| 1361 | 1358 | ||
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index 9304a91b8403..f16ff4f56923 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c | |||
| @@ -620,15 +620,12 @@ static int bg_event(struct snd_soc_dapm_widget *w, | |||
| 620 | static int cp_event(struct snd_soc_dapm_widget *w, | 620 | static int cp_event(struct snd_soc_dapm_widget *w, |
| 621 | struct snd_kcontrol *kcontrol, int event) | 621 | struct snd_kcontrol *kcontrol, int event) |
| 622 | { | 622 | { |
| 623 | int ret = 0; | ||
| 624 | |||
| 625 | switch (event) { | 623 | switch (event) { |
| 626 | case SND_SOC_DAPM_POST_PMU: | 624 | case SND_SOC_DAPM_POST_PMU: |
| 627 | msleep(5); | 625 | msleep(5); |
| 628 | break; | 626 | break; |
| 629 | default: | 627 | default: |
| 630 | WARN(1, "Invalid event %d\n", event); | 628 | WARN(1, "Invalid event %d\n", event); |
| 631 | ret = -EINVAL; | ||
| 632 | } | 629 | } |
| 633 | 630 | ||
| 634 | return 0; | 631 | return 0; |
