Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182835
b: refs/heads/master
c: 6aceabb
h: refs/heads/master
i:
  182833: 6307bdd
  182831: 8b9d2a8
v: v3
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Jan 20, 2010
1 parent 95a9cf9 commit 9bfb9b7
Show file tree
Hide file tree
Showing 3 changed files with 15 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: 6cd6cede8c33364d8e1abb5ea35adf627e3781b0
refs/heads/master: 6aceabb459c07a3fb4873c8306de8143c56241b2
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;
u8 burst_bclkdiv;
};

#endif /* __TLV320DAC33_PLAT_H */
15 changes: 13 additions & 2 deletions trunk/sound/soc/codecs/tlv320dac33.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ struct tlv320dac33_priv {
* this */
enum dac33_fifo_modes fifo_mode;/* FIFO mode selection */
unsigned int nsample; /* burst read amount from host */
u8 burst_bclkdiv; /* BCLK divider value in burst mode */

enum dac33_state state;
};
Expand Down Expand Up @@ -845,9 +846,18 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream)
dac33_write(codec, DAC33_SER_AUDIOIF_CTRL_A, aictrl_a);
dac33_write(codec, DAC33_SER_AUDIOIF_CTRL_B, aictrl_b);

/* BCLK divide ratio */
/*
* BCLK divide ratio
* 0: 1.5
* 1: 1
* 2: 2
* ...
* 254: 254
* 255: 255
*/
if (dac33->fifo_mode)
dac33_write(codec, DAC33_SER_AUDIOIF_CTRL_C, 3);
dac33_write(codec, DAC33_SER_AUDIOIF_CTRL_C,
dac33->burst_bclkdiv);
else
dac33_write(codec, DAC33_SER_AUDIOIF_CTRL_C, 32);

Expand Down Expand Up @@ -1239,6 +1249,7 @@ static int __devinit dac33_i2c_probe(struct i2c_client *client,
i2c_set_clientdata(client, dac33);

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

0 comments on commit 9bfb9b7

Please sign in to comment.