Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193336
b: refs/heads/master
c: eeb309a
h: refs/heads/master
v: v3
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Mar 12, 2010
1 parent 0d242e3 commit 164dc0b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c3746a07f13f8711885fd3909c03477a1b47ab82
refs/heads/master: eeb309a8a6ff86ce462e072bc95ecbe85618505e
1 change: 1 addition & 0 deletions trunk/include/sound/tlv320dac33-plat.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

struct tlv320dac33_platform_data {
int power_gpio;
int keep_bclk; /* Keep the BCLK running in FIFO modes */
u8 burst_bclkdiv;
};

Expand Down
13 changes: 11 additions & 2 deletions trunk/sound/soc/codecs/tlv320dac33.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ struct tlv320dac33_priv {
unsigned int nsample; /* burst read amount from host */
u8 burst_bclkdiv; /* BCLK divider value in burst mode */

int keep_bclk; /* Keep the BCLK continuously running
* in FIFO modes */
enum dac33_state state;
};

Expand Down Expand Up @@ -803,7 +805,10 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream)
*/
fifoctrl_a &= ~DAC33_FBYPAS;
fifoctrl_a &= ~DAC33_FAUTO;
aictrl_b &= ~DAC33_BCLKON;
if (dac33->keep_bclk)
aictrl_b |= DAC33_BCLKON;
else
aictrl_b &= ~DAC33_BCLKON;
break;
case DAC33_FIFO_MODE7:
/*
Expand All @@ -814,7 +819,10 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream)
*/
fifoctrl_a &= ~DAC33_FBYPAS;
fifoctrl_a |= DAC33_FAUTO;
aictrl_b &= ~DAC33_BCLKON;
if (dac33->keep_bclk)
aictrl_b |= DAC33_BCLKON;
else
aictrl_b &= ~DAC33_BCLKON;
break;
default:
/*
Expand Down Expand Up @@ -1234,6 +1242,7 @@ static int __devinit dac33_i2c_probe(struct i2c_client *client,

dac33->power_gpio = pdata->power_gpio;
dac33->burst_bclkdiv = pdata->burst_bclkdiv;
dac33->keep_bclk = pdata->keep_bclk;
dac33->irq = client->irq;
dac33->nsample = NSAMPLE_MAX;
/* Disable FIFO use by default */
Expand Down

0 comments on commit 164dc0b

Please sign in to comment.