diff options
-rw-r--r-- | include/sound/tlv320dac33-plat.h | 1 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320dac33.c | 13 |
2 files changed, 12 insertions, 2 deletions
diff --git a/include/sound/tlv320dac33-plat.h b/include/sound/tlv320dac33-plat.h index ac0665264bdf..3f428d53195b 100644 --- a/include/sound/tlv320dac33-plat.h +++ b/include/sound/tlv320dac33-plat.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | struct tlv320dac33_platform_data { | 16 | struct tlv320dac33_platform_data { |
17 | int power_gpio; | 17 | int power_gpio; |
18 | int keep_bclk; /* Keep the BCLK running in FIFO modes */ | ||
18 | u8 burst_bclkdiv; | 19 | u8 burst_bclkdiv; |
19 | }; | 20 | }; |
20 | 21 | ||
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index e845c4b9066e..a6f19271aaea 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
@@ -93,6 +93,8 @@ struct tlv320dac33_priv { | |||
93 | unsigned int nsample; /* burst read amount from host */ | 93 | unsigned int nsample; /* burst read amount from host */ |
94 | u8 burst_bclkdiv; /* BCLK divider value in burst mode */ | 94 | u8 burst_bclkdiv; /* BCLK divider value in burst mode */ |
95 | 95 | ||
96 | int keep_bclk; /* Keep the BCLK continuously running | ||
97 | * in FIFO modes */ | ||
96 | enum dac33_state state; | 98 | enum dac33_state state; |
97 | }; | 99 | }; |
98 | 100 | ||
@@ -803,7 +805,10 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream) | |||
803 | */ | 805 | */ |
804 | fifoctrl_a &= ~DAC33_FBYPAS; | 806 | fifoctrl_a &= ~DAC33_FBYPAS; |
805 | fifoctrl_a &= ~DAC33_FAUTO; | 807 | fifoctrl_a &= ~DAC33_FAUTO; |
806 | aictrl_b &= ~DAC33_BCLKON; | 808 | if (dac33->keep_bclk) |
809 | aictrl_b |= DAC33_BCLKON; | ||
810 | else | ||
811 | aictrl_b &= ~DAC33_BCLKON; | ||
807 | break; | 812 | break; |
808 | case DAC33_FIFO_MODE7: | 813 | case DAC33_FIFO_MODE7: |
809 | /* | 814 | /* |
@@ -814,7 +819,10 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream) | |||
814 | */ | 819 | */ |
815 | fifoctrl_a &= ~DAC33_FBYPAS; | 820 | fifoctrl_a &= ~DAC33_FBYPAS; |
816 | fifoctrl_a |= DAC33_FAUTO; | 821 | fifoctrl_a |= DAC33_FAUTO; |
817 | aictrl_b &= ~DAC33_BCLKON; | 822 | if (dac33->keep_bclk) |
823 | aictrl_b |= DAC33_BCLKON; | ||
824 | else | ||
825 | aictrl_b &= ~DAC33_BCLKON; | ||
818 | break; | 826 | break; |
819 | default: | 827 | default: |
820 | /* | 828 | /* |
@@ -1234,6 +1242,7 @@ static int __devinit dac33_i2c_probe(struct i2c_client *client, | |||
1234 | 1242 | ||
1235 | dac33->power_gpio = pdata->power_gpio; | 1243 | dac33->power_gpio = pdata->power_gpio; |
1236 | dac33->burst_bclkdiv = pdata->burst_bclkdiv; | 1244 | dac33->burst_bclkdiv = pdata->burst_bclkdiv; |
1245 | dac33->keep_bclk = pdata->keep_bclk; | ||
1237 | dac33->irq = client->irq; | 1246 | dac33->irq = client->irq; |
1238 | dac33->nsample = NSAMPLE_MAX; | 1247 | dac33->nsample = NSAMPLE_MAX; |
1239 | /* Disable FIFO use by default */ | 1248 | /* Disable FIFO use by default */ |