Skip to content

Commit

Permalink
Merge remote-tracking branch 'asoc/fix/arizona' into asoc-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Nov 25, 2015
2 parents 1ec2183 + 341604a commit dfc956d
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions sound/soc/codecs/arizona.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,24 +1023,18 @@ void arizona_init_dvfs(struct arizona_priv *priv)
}
EXPORT_SYMBOL_GPL(arizona_init_dvfs);

static unsigned int arizona_sysclk_48k_rates[] = {
static unsigned int arizona_opclk_ref_48k_rates[] = {
6144000,
12288000,
24576000,
49152000,
73728000,
98304000,
147456000,
};

static unsigned int arizona_sysclk_44k1_rates[] = {
static unsigned int arizona_opclk_ref_44k1_rates[] = {
5644800,
11289600,
22579200,
45158400,
67737600,
90316800,
135475200,
};

static int arizona_set_opclk(struct snd_soc_codec *codec, unsigned int clk,
Expand All @@ -1065,11 +1059,11 @@ static int arizona_set_opclk(struct snd_soc_codec *codec, unsigned int clk,
}

if (refclk % 8000)
rates = arizona_sysclk_44k1_rates;
rates = arizona_opclk_ref_44k1_rates;
else
rates = arizona_sysclk_48k_rates;
rates = arizona_opclk_ref_48k_rates;

for (ref = 0; ref < ARRAY_SIZE(arizona_sysclk_48k_rates) &&
for (ref = 0; ref < ARRAY_SIZE(arizona_opclk_ref_48k_rates) &&
rates[ref] <= refclk; ref++) {
div = 1;
while (rates[ref] / div >= freq && div < 32) {
Expand Down

0 comments on commit dfc956d

Please sign in to comment.