Skip to content

Instantly share code, notes, and snippets.

/-

Created October 25, 2017 06:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/b7a5f9ea92b9b1cb092abd45d64768e8 to your computer and use it in GitHub Desktop.
Save anonymous/b7a5f9ea92b9b1cb092abd45d64768e8 to your computer and use it in GitHub Desktop.
diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c
index 7c989250f45e..777bf5e15a40 100644
--- a/sound/soc/sunxi/sun4i-i2s.c
+++ b/sound/soc/sunxi/sun4i-i2s.c
@@ -328,9 +328,9 @@ static int sun4i_i2s_set_clk_rate(struct sun4i_i2s *i2s,
bclk_div += i2s->variant->bclk_offset;
mclk_div += i2s->variant->mclk_offset;
- regmap_write(i2s->regmap, SUN4I_I2S_CLK_DIV_REG,
- SUN4I_I2S_CLK_DIV_BCLK(bclk_div) |
- SUN4I_I2S_CLK_DIV_MCLK(mclk_div));
+ regmap_write(i2s->regmap, SUN4I_I2S_CLK_DIV_REG, 0x82); // FIXME!
+ //SUN4I_I2S_CLK_DIV_BCLK(bclk_div) |
+ //SUN4I_I2S_CLK_DIV_MCLK(mclk_div));
regmap_field_write(i2s->field_clkdiv_mclk_en, 1);
@@ -412,6 +412,7 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream,
default:
return -EINVAL;
}
+ wss = 3; /* FIXME! */
regmap_field_write(i2s->field_fmt_wss,
wss + i2s->variant->fmt_offset);
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index 8745221ec002..0bc579b0d123 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -177,11 +177,11 @@ static int sun8i_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
case SND_SOC_DAIFMT_CBS_CFS: /* DAI Slave */
printk("%s %d\n", __func__, __LINE__);
- value = 0x0; /* Codec Master */
+ value = 0x1; /* Codec Slave */
break;
case SND_SOC_DAIFMT_CBM_CFM: /* DAI Master */
printk("%s %d\n", __func__, __LINE__);
- value = 0x1; /* Codec Slave */
+ value = 0x0; /* Codec Master */
break;
default:
return -EINVAL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment