diff options
-rw-r--r-- | include/sound/soc.h | 6 | ||||
-rw-r--r-- | include/sound/wm8904.h | 2 | ||||
-rw-r--r-- | sound/soc/codecs/rt298.c | 26 | ||||
-rw-r--r-- | sound/soc/codecs/wm8962.c | 2 | ||||
-rw-r--r-- | sound/soc/soc-ops.c | 28 |
5 files changed, 48 insertions, 16 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 884e728b09d9..26ede14597da 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -86,7 +86,7 @@ | |||
86 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ | 86 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ |
87 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ | 87 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ |
88 | .tlv.p = (tlv_array),\ | 88 | .tlv.p = (tlv_array),\ |
89 | .info = snd_soc_info_volsw, \ | 89 | .info = snd_soc_info_volsw_sx, \ |
90 | .get = snd_soc_get_volsw_sx,\ | 90 | .get = snd_soc_get_volsw_sx,\ |
91 | .put = snd_soc_put_volsw_sx, \ | 91 | .put = snd_soc_put_volsw_sx, \ |
92 | .private_value = (unsigned long)&(struct soc_mixer_control) \ | 92 | .private_value = (unsigned long)&(struct soc_mixer_control) \ |
@@ -156,7 +156,7 @@ | |||
156 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ | 156 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ |
157 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ | 157 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ |
158 | .tlv.p = (tlv_array), \ | 158 | .tlv.p = (tlv_array), \ |
159 | .info = snd_soc_info_volsw, \ | 159 | .info = snd_soc_info_volsw_sx, \ |
160 | .get = snd_soc_get_volsw_sx, \ | 160 | .get = snd_soc_get_volsw_sx, \ |
161 | .put = snd_soc_put_volsw_sx, \ | 161 | .put = snd_soc_put_volsw_sx, \ |
162 | .private_value = (unsigned long)&(struct soc_mixer_control) \ | 162 | .private_value = (unsigned long)&(struct soc_mixer_control) \ |
@@ -574,6 +574,8 @@ int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol, | |||
574 | struct snd_ctl_elem_value *ucontrol); | 574 | struct snd_ctl_elem_value *ucontrol); |
575 | int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, | 575 | int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, |
576 | struct snd_ctl_elem_info *uinfo); | 576 | struct snd_ctl_elem_info *uinfo); |
577 | int snd_soc_info_volsw_sx(struct snd_kcontrol *kcontrol, | ||
578 | struct snd_ctl_elem_info *uinfo); | ||
577 | #define snd_soc_info_bool_ext snd_ctl_boolean_mono_info | 579 | #define snd_soc_info_bool_ext snd_ctl_boolean_mono_info |
578 | int snd_soc_get_volsw(struct snd_kcontrol *kcontrol, | 580 | int snd_soc_get_volsw(struct snd_kcontrol *kcontrol, |
579 | struct snd_ctl_elem_value *ucontrol); | 581 | struct snd_ctl_elem_value *ucontrol); |
diff --git a/include/sound/wm8904.h b/include/sound/wm8904.h index 898be3a8db9a..6d8f8fba3341 100644 --- a/include/sound/wm8904.h +++ b/include/sound/wm8904.h | |||
@@ -119,7 +119,7 @@ | |||
119 | #define WM8904_MIC_REGS 2 | 119 | #define WM8904_MIC_REGS 2 |
120 | #define WM8904_GPIO_REGS 4 | 120 | #define WM8904_GPIO_REGS 4 |
121 | #define WM8904_DRC_REGS 4 | 121 | #define WM8904_DRC_REGS 4 |
122 | #define WM8904_EQ_REGS 25 | 122 | #define WM8904_EQ_REGS 24 |
123 | 123 | ||
124 | /** | 124 | /** |
125 | * DRC configurations are specified with a label and a set of register | 125 | * DRC configurations are specified with a label and a set of register |
diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c index 3c2f0f8d6266..f823eb502367 100644 --- a/sound/soc/codecs/rt298.c +++ b/sound/soc/codecs/rt298.c | |||
@@ -50,24 +50,24 @@ struct rt298_priv { | |||
50 | }; | 50 | }; |
51 | 51 | ||
52 | static struct reg_default rt298_index_def[] = { | 52 | static struct reg_default rt298_index_def[] = { |
53 | { 0x01, 0xaaaa }, | 53 | { 0x01, 0xa5a8 }, |
54 | { 0x02, 0x8aaa }, | 54 | { 0x02, 0x8e95 }, |
55 | { 0x03, 0x0002 }, | 55 | { 0x03, 0x0002 }, |
56 | { 0x04, 0xaf01 }, | 56 | { 0x04, 0xaf67 }, |
57 | { 0x08, 0x000d }, | 57 | { 0x08, 0x200f }, |
58 | { 0x09, 0xd810 }, | 58 | { 0x09, 0xd010 }, |
59 | { 0x0a, 0x0120 }, | 59 | { 0x0a, 0x0100 }, |
60 | { 0x0b, 0x0000 }, | 60 | { 0x0b, 0x0000 }, |
61 | { 0x0d, 0x2800 }, | 61 | { 0x0d, 0x2800 }, |
62 | { 0x0f, 0x0000 }, | 62 | { 0x0f, 0x0022 }, |
63 | { 0x19, 0x0a17 }, | 63 | { 0x19, 0x0217 }, |
64 | { 0x20, 0x0020 }, | 64 | { 0x20, 0x0020 }, |
65 | { 0x33, 0x0208 }, | 65 | { 0x33, 0x0208 }, |
66 | { 0x46, 0x0300 }, | 66 | { 0x46, 0x0300 }, |
67 | { 0x49, 0x0004 }, | 67 | { 0x49, 0x4004 }, |
68 | { 0x4f, 0x50e9 }, | 68 | { 0x4f, 0x50c9 }, |
69 | { 0x50, 0x2000 }, | 69 | { 0x50, 0x3000 }, |
70 | { 0x63, 0x2902 }, | 70 | { 0x63, 0x1b02 }, |
71 | { 0x67, 0x1111 }, | 71 | { 0x67, 0x1111 }, |
72 | { 0x68, 0x1016 }, | 72 | { 0x68, 0x1016 }, |
73 | { 0x69, 0x273f }, | 73 | { 0x69, 0x273f }, |
@@ -1214,7 +1214,7 @@ static int rt298_i2c_probe(struct i2c_client *i2c, | |||
1214 | mdelay(10); | 1214 | mdelay(10); |
1215 | 1215 | ||
1216 | if (!rt298->pdata.gpio2_en) | 1216 | if (!rt298->pdata.gpio2_en) |
1217 | regmap_write(rt298->regmap, RT298_SET_DMIC2_DEFAULT, 0x4000); | 1217 | regmap_write(rt298->regmap, RT298_SET_DMIC2_DEFAULT, 0x40); |
1218 | else | 1218 | else |
1219 | regmap_write(rt298->regmap, RT298_SET_DMIC2_DEFAULT, 0); | 1219 | regmap_write(rt298->regmap, RT298_SET_DMIC2_DEFAULT, 0); |
1220 | 1220 | ||
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 2fbc6ef8cbdb..39ebd7bf4f53 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -3808,6 +3808,8 @@ static int wm8962_runtime_resume(struct device *dev) | |||
3808 | 3808 | ||
3809 | wm8962_reset(wm8962); | 3809 | wm8962_reset(wm8962); |
3810 | 3810 | ||
3811 | regcache_mark_dirty(wm8962->regmap); | ||
3812 | |||
3811 | /* SYSCLK defaults to on; make sure it is off so we can safely | 3813 | /* SYSCLK defaults to on; make sure it is off so we can safely |
3812 | * write to registers if the device is declocked. | 3814 | * write to registers if the device is declocked. |
3813 | */ | 3815 | */ |
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index 100d92b5b77e..05977ae1ff2a 100644 --- a/sound/soc/soc-ops.c +++ b/sound/soc/soc-ops.c | |||
@@ -207,6 +207,34 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, | |||
207 | EXPORT_SYMBOL_GPL(snd_soc_info_volsw); | 207 | EXPORT_SYMBOL_GPL(snd_soc_info_volsw); |
208 | 208 | ||
209 | /** | 209 | /** |
210 | * snd_soc_info_volsw_sx - Mixer info callback for SX TLV controls | ||
211 | * @kcontrol: mixer control | ||
212 | * @uinfo: control element information | ||
213 | * | ||
214 | * Callback to provide information about a single mixer control, or a double | ||
215 | * mixer control that spans 2 registers of the SX TLV type. SX TLV controls | ||
216 | * have a range that represents both positive and negative values either side | ||
217 | * of zero but without a sign bit. | ||
218 | * | ||
219 | * Returns 0 for success. | ||
220 | */ | ||
221 | int snd_soc_info_volsw_sx(struct snd_kcontrol *kcontrol, | ||
222 | struct snd_ctl_elem_info *uinfo) | ||
223 | { | ||
224 | struct soc_mixer_control *mc = | ||
225 | (struct soc_mixer_control *)kcontrol->private_value; | ||
226 | |||
227 | snd_soc_info_volsw(kcontrol, uinfo); | ||
228 | /* Max represents the number of levels in an SX control not the | ||
229 | * maximum value, so add the minimum value back on | ||
230 | */ | ||
231 | uinfo->value.integer.max += mc->min; | ||
232 | |||
233 | return 0; | ||
234 | } | ||
235 | EXPORT_SYMBOL_GPL(snd_soc_info_volsw_sx); | ||
236 | |||
237 | /** | ||
210 | * snd_soc_get_volsw - single mixer get callback | 238 | * snd_soc_get_volsw - single mixer get callback |
211 | * @kcontrol: mixer control | 239 | * @kcontrol: mixer control |
212 | * @ucontrol: control element information | 240 | * @ucontrol: control element information |