diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/ak4642.c | 31 | ||||
-rw-r--r-- | sound/soc/codecs/wm8962.c | 2 | ||||
-rw-r--r-- | sound/soc/sh/fsi.c | 6 |
3 files changed, 18 insertions, 21 deletions
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index 5ef70b5d27e4..278c0a0575f5 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c | |||
@@ -146,13 +146,10 @@ static const struct snd_kcontrol_new ak4642_snd_controls[] = { | |||
146 | 146 | ||
147 | SOC_DOUBLE_R_TLV("Digital Playback Volume", L_DVC, R_DVC, | 147 | SOC_DOUBLE_R_TLV("Digital Playback Volume", L_DVC, R_DVC, |
148 | 0, 0xFF, 1, out_tlv), | 148 | 0, 0xFF, 1, out_tlv), |
149 | |||
150 | SOC_SINGLE("Headphone Switch", PW_MGMT2, 6, 1, 0), | ||
151 | }; | 149 | }; |
152 | 150 | ||
153 | static const struct snd_kcontrol_new ak4642_hpout_mixer_controls[] = { | 151 | static const struct snd_kcontrol_new ak4642_headphone_control = |
154 | SOC_DAPM_SINGLE("DACH", MD_CTL4, 0, 1, 0), | 152 | SOC_DAPM_SINGLE("Switch", PW_MGMT2, 6, 1, 0); |
155 | }; | ||
156 | 153 | ||
157 | static const struct snd_kcontrol_new ak4642_lout_mixer_controls[] = { | 154 | static const struct snd_kcontrol_new ak4642_lout_mixer_controls[] = { |
158 | SOC_DAPM_SINGLE("DACL", SG_SL1, 4, 1, 0), | 155 | SOC_DAPM_SINGLE("DACL", SG_SL1, 4, 1, 0), |
@@ -165,13 +162,12 @@ static const struct snd_soc_dapm_widget ak4642_dapm_widgets[] = { | |||
165 | SND_SOC_DAPM_OUTPUT("HPOUTR"), | 162 | SND_SOC_DAPM_OUTPUT("HPOUTR"), |
166 | SND_SOC_DAPM_OUTPUT("LINEOUT"), | 163 | SND_SOC_DAPM_OUTPUT("LINEOUT"), |
167 | 164 | ||
168 | SND_SOC_DAPM_MIXER("HPOUTL Mixer", PW_MGMT2, 5, 0, | 165 | SND_SOC_DAPM_PGA("HPL Out", PW_MGMT2, 5, 0, NULL, 0), |
169 | &ak4642_hpout_mixer_controls[0], | 166 | SND_SOC_DAPM_PGA("HPR Out", PW_MGMT2, 4, 0, NULL, 0), |
170 | ARRAY_SIZE(ak4642_hpout_mixer_controls)), | 167 | SND_SOC_DAPM_SWITCH("Headphone Enable", SND_SOC_NOPM, 0, 0, |
168 | &ak4642_headphone_control), | ||
171 | 169 | ||
172 | SND_SOC_DAPM_MIXER("HPOUTR Mixer", PW_MGMT2, 4, 0, | 170 | SND_SOC_DAPM_PGA("DACH", MD_CTL4, 0, 0, NULL, 0), |
173 | &ak4642_hpout_mixer_controls[0], | ||
174 | ARRAY_SIZE(ak4642_hpout_mixer_controls)), | ||
175 | 171 | ||
176 | SND_SOC_DAPM_MIXER("LINEOUT Mixer", PW_MGMT1, 3, 0, | 172 | SND_SOC_DAPM_MIXER("LINEOUT Mixer", PW_MGMT1, 3, 0, |
177 | &ak4642_lout_mixer_controls[0], | 173 | &ak4642_lout_mixer_controls[0], |
@@ -184,12 +180,17 @@ static const struct snd_soc_dapm_widget ak4642_dapm_widgets[] = { | |||
184 | static const struct snd_soc_dapm_route ak4642_intercon[] = { | 180 | static const struct snd_soc_dapm_route ak4642_intercon[] = { |
185 | 181 | ||
186 | /* Outputs */ | 182 | /* Outputs */ |
187 | {"HPOUTL", NULL, "HPOUTL Mixer"}, | 183 | {"HPOUTL", NULL, "HPL Out"}, |
188 | {"HPOUTR", NULL, "HPOUTR Mixer"}, | 184 | {"HPOUTR", NULL, "HPR Out"}, |
189 | {"LINEOUT", NULL, "LINEOUT Mixer"}, | 185 | {"LINEOUT", NULL, "LINEOUT Mixer"}, |
190 | 186 | ||
191 | {"HPOUTL Mixer", "DACH", "DAC"}, | 187 | {"HPL Out", NULL, "Headphone Enable"}, |
192 | {"HPOUTR Mixer", "DACH", "DAC"}, | 188 | {"HPR Out", NULL, "Headphone Enable"}, |
189 | |||
190 | {"Headphone Enable", "Switch", "DACH"}, | ||
191 | |||
192 | {"DACH", NULL, "DAC"}, | ||
193 | |||
193 | {"LINEOUT Mixer", "DACL", "DAC"}, | 194 | {"LINEOUT Mixer", "DACL", "DAC"}, |
194 | }; | 195 | }; |
195 | 196 | ||
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 29c4b02c4790..0ac228b7dc04 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -2564,7 +2564,7 @@ static int dsp2_event(struct snd_soc_dapm_widget *w, | |||
2564 | return 0; | 2564 | return 0; |
2565 | } | 2565 | } |
2566 | 2566 | ||
2567 | static const char *st_text[] = { "None", "Right", "Left" }; | 2567 | static const char *st_text[] = { "None", "Left", "Right" }; |
2568 | 2568 | ||
2569 | static const struct soc_enum str_enum = | 2569 | static const struct soc_enum str_enum = |
2570 | SOC_ENUM_SINGLE(WM8962_DAC_DSP_MIXING_1, 2, 3, st_text); | 2570 | SOC_ENUM_SINGLE(WM8962_DAC_DSP_MIXING_1, 2, 3, st_text); |
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index db6c89a28bda..ea4a82d01160 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -1152,12 +1152,8 @@ static snd_pcm_uframes_t fsi_pointer(struct snd_pcm_substream *substream) | |||
1152 | { | 1152 | { |
1153 | struct fsi_priv *fsi = fsi_get_priv(substream); | 1153 | struct fsi_priv *fsi = fsi_get_priv(substream); |
1154 | struct fsi_stream *io = fsi_get_stream(fsi, fsi_is_play(substream)); | 1154 | struct fsi_stream *io = fsi_get_stream(fsi, fsi_is_play(substream)); |
1155 | int samples_pos = io->buff_sample_pos - 1; | ||
1156 | 1155 | ||
1157 | if (samples_pos < 0) | 1156 | return fsi_sample2frame(fsi, io->buff_sample_pos); |
1158 | samples_pos = 0; | ||
1159 | |||
1160 | return fsi_sample2frame(fsi, samples_pos); | ||
1161 | } | 1157 | } |
1162 | 1158 | ||
1163 | static struct snd_pcm_ops fsi_pcm_ops = { | 1159 | static struct snd_pcm_ops fsi_pcm_ops = { |