diff options
| -rw-r--r-- | sound/soc/blackfin/bf5xx-i2s-pcm.c | 13 | ||||
| -rw-r--r-- | sound/soc/codecs/wm8994.c | 2 | ||||
| -rw-r--r-- | sound/soc/tegra/tegra_i2s.c | 6 |
3 files changed, 19 insertions, 2 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s-pcm.c b/sound/soc/blackfin/bf5xx-i2s-pcm.c index b5101efd1c87..f1fd95bb6416 100644 --- a/sound/soc/blackfin/bf5xx-i2s-pcm.c +++ b/sound/soc/blackfin/bf5xx-i2s-pcm.c | |||
| @@ -138,11 +138,20 @@ static snd_pcm_uframes_t bf5xx_pcm_pointer(struct snd_pcm_substream *substream) | |||
| 138 | pr_debug("%s enter\n", __func__); | 138 | pr_debug("%s enter\n", __func__); |
| 139 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | 139 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
| 140 | diff = sport_curr_offset_tx(sport); | 140 | diff = sport_curr_offset_tx(sport); |
| 141 | frames = bytes_to_frames(substream->runtime, diff); | ||
| 142 | } else { | 141 | } else { |
| 143 | diff = sport_curr_offset_rx(sport); | 142 | diff = sport_curr_offset_rx(sport); |
| 144 | frames = bytes_to_frames(substream->runtime, diff); | ||
| 145 | } | 143 | } |
| 144 | |||
| 145 | /* | ||
| 146 | * TX at least can report one frame beyond the end of the | ||
| 147 | * buffer if we hit the wraparound case - clamp to within the | ||
| 148 | * buffer as the ALSA APIs require. | ||
| 149 | */ | ||
| 150 | if (diff == snd_pcm_lib_buffer_bytes(substream)) | ||
| 151 | diff = 0; | ||
| 152 | |||
| 153 | frames = bytes_to_frames(substream->runtime, diff); | ||
| 154 | |||
| 146 | return frames; | 155 | return frames; |
| 147 | } | 156 | } |
| 148 | 157 | ||
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 970a95c5360b..c2fc0356c2a4 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
| @@ -1713,6 +1713,8 @@ static int _wm8994_set_fll(struct snd_soc_codec *codec, int id, int src, | |||
| 1713 | snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_1 + reg_offset, | 1713 | snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_1 + reg_offset, |
| 1714 | WM8994_FLL1_ENA | WM8994_FLL1_FRAC, | 1714 | WM8994_FLL1_ENA | WM8994_FLL1_FRAC, |
| 1715 | reg); | 1715 | reg); |
| 1716 | |||
| 1717 | msleep(5); | ||
| 1716 | } | 1718 | } |
| 1717 | 1719 | ||
| 1718 | wm8994->fll[id].in = freq_in; | 1720 | wm8994->fll[id].in = freq_in; |
diff --git a/sound/soc/tegra/tegra_i2s.c b/sound/soc/tegra/tegra_i2s.c index 6b817e20548c..95f03c10b4f7 100644 --- a/sound/soc/tegra/tegra_i2s.c +++ b/sound/soc/tegra/tegra_i2s.c | |||
| @@ -222,12 +222,18 @@ static int tegra_i2s_hw_params(struct snd_pcm_substream *substream, | |||
| 222 | if (i2sclock % (2 * srate)) | 222 | if (i2sclock % (2 * srate)) |
| 223 | reg |= TEGRA_I2S_TIMING_NON_SYM_ENABLE; | 223 | reg |= TEGRA_I2S_TIMING_NON_SYM_ENABLE; |
| 224 | 224 | ||
| 225 | if (!i2s->clk_refs) | ||
| 226 | clk_enable(i2s->clk_i2s); | ||
| 227 | |||
| 225 | tegra_i2s_write(i2s, TEGRA_I2S_TIMING, reg); | 228 | tegra_i2s_write(i2s, TEGRA_I2S_TIMING, reg); |
| 226 | 229 | ||
| 227 | tegra_i2s_write(i2s, TEGRA_I2S_FIFO_SCR, | 230 | tegra_i2s_write(i2s, TEGRA_I2S_FIFO_SCR, |
| 228 | TEGRA_I2S_FIFO_SCR_FIFO2_ATN_LVL_FOUR_SLOTS | | 231 | TEGRA_I2S_FIFO_SCR_FIFO2_ATN_LVL_FOUR_SLOTS | |
| 229 | TEGRA_I2S_FIFO_SCR_FIFO1_ATN_LVL_FOUR_SLOTS); | 232 | TEGRA_I2S_FIFO_SCR_FIFO1_ATN_LVL_FOUR_SLOTS); |
| 230 | 233 | ||
| 234 | if (!i2s->clk_refs) | ||
| 235 | clk_disable(i2s->clk_i2s); | ||
| 236 | |||
| 231 | return 0; | 237 | return 0; |
| 232 | } | 238 | } |
| 233 | 239 | ||
