diff options
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/max98088.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/uda134x.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/wm8350.c | 9 | ||||
-rw-r--r-- | sound/soc/codecs/wm8776.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/wm8962.c | 5 | ||||
-rw-r--r-- | sound/soc/codecs/wm8994.c | 2 |
6 files changed, 25 insertions, 4 deletions
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index bc22ee93a75d..470cb93b1d1f 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c | |||
@@ -28,6 +28,11 @@ | |||
28 | #include <sound/max98088.h> | 28 | #include <sound/max98088.h> |
29 | #include "max98088.h" | 29 | #include "max98088.h" |
30 | 30 | ||
31 | enum max98088_type { | ||
32 | MAX98088, | ||
33 | MAX98089, | ||
34 | }; | ||
35 | |||
31 | struct max98088_cdata { | 36 | struct max98088_cdata { |
32 | unsigned int rate; | 37 | unsigned int rate; |
33 | unsigned int fmt; | 38 | unsigned int fmt; |
@@ -36,6 +41,7 @@ struct max98088_cdata { | |||
36 | 41 | ||
37 | struct max98088_priv { | 42 | struct max98088_priv { |
38 | u8 reg_cache[M98088_REG_CNT]; | 43 | u8 reg_cache[M98088_REG_CNT]; |
44 | enum max98088_type devtype; | ||
39 | void *control_data; | 45 | void *control_data; |
40 | struct max98088_pdata *pdata; | 46 | struct max98088_pdata *pdata; |
41 | unsigned int sysclk; | 47 | unsigned int sysclk; |
@@ -2040,6 +2046,8 @@ static int max98088_i2c_probe(struct i2c_client *i2c, | |||
2040 | if (max98088 == NULL) | 2046 | if (max98088 == NULL) |
2041 | return -ENOMEM; | 2047 | return -ENOMEM; |
2042 | 2048 | ||
2049 | max98088->devtype = id->driver_data; | ||
2050 | |||
2043 | i2c_set_clientdata(i2c, max98088); | 2051 | i2c_set_clientdata(i2c, max98088); |
2044 | max98088->control_data = i2c; | 2052 | max98088->control_data = i2c; |
2045 | max98088->pdata = i2c->dev.platform_data; | 2053 | max98088->pdata = i2c->dev.platform_data; |
@@ -2059,7 +2067,8 @@ static int __devexit max98088_i2c_remove(struct i2c_client *client) | |||
2059 | } | 2067 | } |
2060 | 2068 | ||
2061 | static const struct i2c_device_id max98088_i2c_id[] = { | 2069 | static const struct i2c_device_id max98088_i2c_id[] = { |
2062 | { "max98088", 0 }, | 2070 | { "max98088", MAX98088 }, |
2071 | { "max98089", MAX98089 }, | ||
2063 | { } | 2072 | { } |
2064 | }; | 2073 | }; |
2065 | MODULE_DEVICE_TABLE(i2c, max98088_i2c_id); | 2074 | MODULE_DEVICE_TABLE(i2c, max98088_i2c_id); |
diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c index 7540a509a6f5..464f0cfa4c7a 100644 --- a/sound/soc/codecs/uda134x.c +++ b/sound/soc/codecs/uda134x.c | |||
@@ -597,6 +597,7 @@ static struct snd_soc_codec_driver soc_codec_dev_uda134x = { | |||
597 | .resume = uda134x_soc_resume, | 597 | .resume = uda134x_soc_resume, |
598 | .reg_cache_size = sizeof(uda134x_reg), | 598 | .reg_cache_size = sizeof(uda134x_reg), |
599 | .reg_word_size = sizeof(u8), | 599 | .reg_word_size = sizeof(u8), |
600 | .reg_cache_default = uda134x_reg, | ||
600 | .reg_cache_step = 1, | 601 | .reg_cache_step = 1, |
601 | .read = uda134x_read_reg_cache, | 602 | .read = uda134x_read_reg_cache, |
602 | .write = uda134x_write, | 603 | .write = uda134x_write, |
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index f4f1fba38eb9..7611add7f8c3 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c | |||
@@ -831,7 +831,7 @@ static int wm8350_set_dai_sysclk(struct snd_soc_dai *codec_dai, | |||
831 | } | 831 | } |
832 | 832 | ||
833 | /* MCLK direction */ | 833 | /* MCLK direction */ |
834 | if (dir == WM8350_MCLK_DIR_OUT) | 834 | if (dir == SND_SOC_CLOCK_OUT) |
835 | wm8350_set_bits(wm8350, WM8350_CLOCK_CONTROL_2, | 835 | wm8350_set_bits(wm8350, WM8350_CLOCK_CONTROL_2, |
836 | WM8350_MCLK_DIR); | 836 | WM8350_MCLK_DIR); |
837 | else | 837 | else |
@@ -1586,6 +1586,13 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec) | |||
1586 | wm8350_set_bits(wm8350, WM8350_ROUT2_VOLUME, | 1586 | wm8350_set_bits(wm8350, WM8350_ROUT2_VOLUME, |
1587 | WM8350_OUT2_VU | WM8350_OUT2R_MUTE); | 1587 | WM8350_OUT2_VU | WM8350_OUT2R_MUTE); |
1588 | 1588 | ||
1589 | /* Make sure AIF tristating is disabled by default */ | ||
1590 | wm8350_clear_bits(wm8350, WM8350_AI_FORMATING, WM8350_AIF_TRI); | ||
1591 | |||
1592 | /* Make sure we've got a sane companding setup too */ | ||
1593 | wm8350_clear_bits(wm8350, WM8350_ADC_DAC_COMP, | ||
1594 | WM8350_DAC_COMP | WM8350_LOOPBACK); | ||
1595 | |||
1589 | /* Make sure jack detect is disabled to start off with */ | 1596 | /* Make sure jack detect is disabled to start off with */ |
1590 | wm8350_clear_bits(wm8350, WM8350_JACK_DETECT, | 1597 | wm8350_clear_bits(wm8350, WM8350_JACK_DETECT, |
1591 | WM8350_JDL_ENA | WM8350_JDR_ENA); | 1598 | WM8350_JDL_ENA | WM8350_JDR_ENA); |
diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c index 04182c464e35..0132a27140ae 100644 --- a/sound/soc/codecs/wm8776.c +++ b/sound/soc/codecs/wm8776.c | |||
@@ -34,7 +34,6 @@ | |||
34 | /* codec private data */ | 34 | /* codec private data */ |
35 | struct wm8776_priv { | 35 | struct wm8776_priv { |
36 | enum snd_soc_control_type control_type; | 36 | enum snd_soc_control_type control_type; |
37 | u16 reg_cache[WM8776_CACHEREGNUM]; | ||
38 | int sysclk[2]; | 37 | int sysclk[2]; |
39 | }; | 38 | }; |
40 | 39 | ||
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 894d0cd3aa9b..e8092745a207 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -3500,8 +3500,11 @@ static ssize_t wm8962_beep_set(struct device *dev, | |||
3500 | { | 3500 | { |
3501 | struct wm8962_priv *wm8962 = dev_get_drvdata(dev); | 3501 | struct wm8962_priv *wm8962 = dev_get_drvdata(dev); |
3502 | long int time; | 3502 | long int time; |
3503 | int ret; | ||
3503 | 3504 | ||
3504 | strict_strtol(buf, 10, &time); | 3505 | ret = strict_strtol(buf, 10, &time); |
3506 | if (ret != 0) | ||
3507 | return ret; | ||
3505 | 3508 | ||
3506 | input_event(wm8962->beep, EV_SND, SND_TONE, time); | 3509 | input_event(wm8962->beep, EV_SND, SND_TONE, time); |
3507 | 3510 | ||
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 0db59c3aa5d4..830dfdd66c5f 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -3903,6 +3903,8 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) | |||
3903 | return -ENOMEM; | 3903 | return -ENOMEM; |
3904 | snd_soc_codec_set_drvdata(codec, wm8994); | 3904 | snd_soc_codec_set_drvdata(codec, wm8994); |
3905 | 3905 | ||
3906 | codec->reg_cache = &wm8994->reg_cache; | ||
3907 | |||
3906 | wm8994->pdata = dev_get_platdata(codec->dev->parent); | 3908 | wm8994->pdata = dev_get_platdata(codec->dev->parent); |
3907 | wm8994->codec = codec; | 3909 | wm8994->codec = codec; |
3908 | 3910 | ||