Message ID | 20140808133510.GC2665@opensource.wolfsonmicro.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Aug 08, 2014 at 02:35:10PM +0100, Richard Fitzgerald wrote: > From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> > > Some codecs need to boost DVFS for higher sample rates. > > Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> > Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> > --- Hi Mark, Would it be possible to get an Ack for the ASoC patches here, Lee said it would be ok to put the series through the MFD tree once we have an ack? Unless you have any issues with the series? Thanks, Charles
On Tue, Aug 12, 2014 at 02:34:58PM +0100, Charles Keepax wrote: > On Fri, Aug 08, 2014 at 02:35:10PM +0100, Richard Fitzgerald wrote: > > From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> > > Some codecs need to boost DVFS for higher sample rates. > > Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> > > Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> > Would it be possible to get an Ack for the ASoC patches here, Lee > said it would be ok to put the series through the MFD tree once > we have an ack? Unless you have any issues with the series? Don't send contentless pings; if you want patches reviewing please send them to the relevant maintainers.
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index d441d80..c5b6be2 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c @@ -1185,7 +1185,7 @@ static int arizona_hw_params_rate(struct snd_pcm_substream *substream, struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); struct arizona_dai_priv *dai_priv = &priv->dai[dai->id - 1]; int base = dai->driver->base; - int i, sr_val; + int i, sr_val, ret; /* * We will need to be more flexible than this in future, @@ -1201,6 +1201,26 @@ static int arizona_hw_params_rate(struct snd_pcm_substream *substream, } sr_val = i; + switch (priv->arizona->type) { + case WM5102: + case WM8997: + if (arizona_sr_vals[sr_val] >= 88200) + ret = arizona_dvfs_up(priv->arizona, + ARIZONA_DVFS_SR1_RQ); + else + ret = arizona_dvfs_down(priv->arizona, + ARIZONA_DVFS_SR1_RQ); + + if (ret != 0) { + arizona_aif_err(dai, "Failed to change DVFS %d\n", ret); + return ret; + } + break; + + default: + break; + } + switch (dai_priv->clk) { case ARIZONA_CLK_SYSCLK: switch (priv->arizona->type) {