diff options
Diffstat (limited to 'sound/soc/codecs/sgtl5000.c')
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 29cf7ce610f4..aa98be32bb60 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c | |||
@@ -483,21 +483,21 @@ static int sgtl5000_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) | |||
483 | /* setting i2s data format */ | 483 | /* setting i2s data format */ |
484 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { | 484 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { |
485 | case SND_SOC_DAIFMT_DSP_A: | 485 | case SND_SOC_DAIFMT_DSP_A: |
486 | i2sctl |= SGTL5000_I2S_MODE_PCM; | 486 | i2sctl |= SGTL5000_I2S_MODE_PCM << SGTL5000_I2S_MODE_SHIFT; |
487 | break; | 487 | break; |
488 | case SND_SOC_DAIFMT_DSP_B: | 488 | case SND_SOC_DAIFMT_DSP_B: |
489 | i2sctl |= SGTL5000_I2S_MODE_PCM; | 489 | i2sctl |= SGTL5000_I2S_MODE_PCM << SGTL5000_I2S_MODE_SHIFT; |
490 | i2sctl |= SGTL5000_I2S_LRALIGN; | 490 | i2sctl |= SGTL5000_I2S_LRALIGN; |
491 | break; | 491 | break; |
492 | case SND_SOC_DAIFMT_I2S: | 492 | case SND_SOC_DAIFMT_I2S: |
493 | i2sctl |= SGTL5000_I2S_MODE_I2S_LJ; | 493 | i2sctl |= SGTL5000_I2S_MODE_I2S_LJ << SGTL5000_I2S_MODE_SHIFT; |
494 | break; | 494 | break; |
495 | case SND_SOC_DAIFMT_RIGHT_J: | 495 | case SND_SOC_DAIFMT_RIGHT_J: |
496 | i2sctl |= SGTL5000_I2S_MODE_RJ; | 496 | i2sctl |= SGTL5000_I2S_MODE_RJ << SGTL5000_I2S_MODE_SHIFT; |
497 | i2sctl |= SGTL5000_I2S_LRPOL; | 497 | i2sctl |= SGTL5000_I2S_LRPOL; |
498 | break; | 498 | break; |
499 | case SND_SOC_DAIFMT_LEFT_J: | 499 | case SND_SOC_DAIFMT_LEFT_J: |
500 | i2sctl |= SGTL5000_I2S_MODE_I2S_LJ; | 500 | i2sctl |= SGTL5000_I2S_MODE_I2S_LJ << SGTL5000_I2S_MODE_SHIFT; |
501 | i2sctl |= SGTL5000_I2S_LRALIGN; | 501 | i2sctl |= SGTL5000_I2S_LRALIGN; |
502 | break; | 502 | break; |
503 | default: | 503 | default: |
@@ -1462,6 +1462,9 @@ static int sgtl5000_i2c_probe(struct i2c_client *client, | |||
1462 | if (ret) | 1462 | if (ret) |
1463 | return ret; | 1463 | return ret; |
1464 | 1464 | ||
1465 | /* Need 8 clocks before I2C accesses */ | ||
1466 | udelay(1); | ||
1467 | |||
1465 | /* read chip information */ | 1468 | /* read chip information */ |
1466 | ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, ®); | 1469 | ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, ®); |
1467 | if (ret) | 1470 | if (ret) |