git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc...
[pandora-kernel.git]
/
sound
/
soc
/
codecs
/
tlv320dac33.c
diff --git
a/sound/soc/codecs/tlv320dac33.c
b/sound/soc/codecs/tlv320dac33.c
index
869c1a9
..
90c361e
100644
(file)
--- a/
sound/soc/codecs/tlv320dac33.c
+++ b/
sound/soc/codecs/tlv320dac33.c
@@
-324,6
+324,10
@@
static void dac33_init_chip(struct snd_soc_codec *codec)
dac33_write(codec, DAC33_OUT_AMP_CTRL,
dac33_read_reg_cache(codec, DAC33_OUT_AMP_CTRL));
dac33_write(codec, DAC33_OUT_AMP_CTRL,
dac33_read_reg_cache(codec, DAC33_OUT_AMP_CTRL));
+ dac33_write(codec, DAC33_LDAC_PWR_CTRL,
+ dac33_read_reg_cache(codec, DAC33_LDAC_PWR_CTRL));
+ dac33_write(codec, DAC33_RDAC_PWR_CTRL,
+ dac33_read_reg_cache(codec, DAC33_RDAC_PWR_CTRL));
}
static inline int dac33_read_id(struct snd_soc_codec *codec)
}
static inline int dac33_read_id(struct snd_soc_codec *codec)
@@
-673,6
+677,7
@@
static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33)
{
struct snd_soc_codec *codec = dac33->codec;
unsigned int delay;
{
struct snd_soc_codec *codec = dac33->codec;
unsigned int delay;
+ unsigned long flags;
switch (dac33->fifo_mode) {
case DAC33_FIFO_MODE1:
switch (dac33->fifo_mode) {
case DAC33_FIFO_MODE1:
@@
-680,10
+685,10
@@
static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33)
DAC33_THRREG(dac33->nsample));
/* Take the timestamps */
DAC33_THRREG(dac33->nsample));
/* Take the timestamps */
- spin_lock_irq
(&dac33->lock
);
+ spin_lock_irq
save(&dac33->lock, flags
);
dac33->t_stamp2 = ktime_to_us(ktime_get());
dac33->t_stamp1 = dac33->t_stamp2;
dac33->t_stamp2 = ktime_to_us(ktime_get());
dac33->t_stamp1 = dac33->t_stamp2;
- spin_unlock_irq
(&dac33->lock
);
+ spin_unlock_irq
restore(&dac33->lock, flags
);
dac33_write16(codec, DAC33_PREFILL_MSB,
DAC33_THRREG(dac33->alarm_threshold));
dac33_write16(codec, DAC33_PREFILL_MSB,
DAC33_THRREG(dac33->alarm_threshold));
@@
-695,11
+700,11
@@
static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33)
break;
case DAC33_FIFO_MODE7:
/* Take the timestamp */
break;
case DAC33_FIFO_MODE7:
/* Take the timestamp */
- spin_lock_irq
(&dac33->lock
);
+ spin_lock_irq
save(&dac33->lock, flags
);
dac33->t_stamp1 = ktime_to_us(ktime_get());
/* Move back the timestamp with drain time */
dac33->t_stamp1 -= dac33->mode7_us_to_lthr;
dac33->t_stamp1 = ktime_to_us(ktime_get());
/* Move back the timestamp with drain time */
dac33->t_stamp1 -= dac33->mode7_us_to_lthr;
- spin_unlock_irq
(&dac33->lock
);
+ spin_unlock_irq
restore(&dac33->lock, flags
);
dac33_write16(codec, DAC33_PREFILL_MSB,
DAC33_THRREG(DAC33_MODE7_MARGIN));
dac33_write16(codec, DAC33_PREFILL_MSB,
DAC33_THRREG(DAC33_MODE7_MARGIN));
@@
-717,13
+722,14
@@
static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33)
static inline void dac33_playback_handler(struct tlv320dac33_priv *dac33)
{
struct snd_soc_codec *codec = dac33->codec;
static inline void dac33_playback_handler(struct tlv320dac33_priv *dac33)
{
struct snd_soc_codec *codec = dac33->codec;
+ unsigned long flags;
switch (dac33->fifo_mode) {
case DAC33_FIFO_MODE1:
/* Take the timestamp */
switch (dac33->fifo_mode) {
case DAC33_FIFO_MODE1:
/* Take the timestamp */
- spin_lock_irq
(&dac33->lock
);
+ spin_lock_irq
save(&dac33->lock, flags
);
dac33->t_stamp2 = ktime_to_us(ktime_get());
dac33->t_stamp2 = ktime_to_us(ktime_get());
- spin_unlock_irq
(&dac33->lock
);
+ spin_unlock_irq
restore(&dac33->lock, flags
);
dac33_write16(codec, DAC33_NSAMPLE_MSB,
DAC33_THRREG(dac33->nsample));
dac33_write16(codec, DAC33_NSAMPLE_MSB,
DAC33_THRREG(dac33->nsample));
@@
-776,10
+782,11
@@
static irqreturn_t dac33_interrupt_handler(int irq, void *dev)
{
struct snd_soc_codec *codec = dev;
struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
{
struct snd_soc_codec *codec = dev;
struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
+ unsigned long flags;
- spin_lock
(&dac33->lock
);
+ spin_lock
_irqsave(&dac33->lock, flags
);
dac33->t_stamp1 = ktime_to_us(ktime_get());
dac33->t_stamp1 = ktime_to_us(ktime_get());
- spin_unlock
(&dac33->lock
);
+ spin_unlock
_irqrestore(&dac33->lock, flags
);
/* Do not schedule the workqueue in Mode7 */
if (dac33->fifo_mode != DAC33_FIFO_MODE7)
/* Do not schedule the workqueue in Mode7 */
if (dac33->fifo_mode != DAC33_FIFO_MODE7)
@@
-1023,7
+1030,7
@@
static int dac33_prepare_chip(struct snd_pcm_substream *substream)
/*
* For FIFO bypass mode:
* Enable the FIFO bypass (Disable the FIFO use)
/*
* For FIFO bypass mode:
* Enable the FIFO bypass (Disable the FIFO use)
- * Set the BCLK as continous
+ * Set the BCLK as contin
u
ous
*/
fifoctrl_a |= DAC33_FBYPAS;
aictrl_b |= DAC33_BCLKON;
*/
fifoctrl_a |= DAC33_FBYPAS;
aictrl_b |= DAC33_BCLKON;
@@
-1176,15
+1183,16
@@
static snd_pcm_sframes_t dac33_dai_delay(
unsigned int time_delta, uthr;
int samples_out, samples_in, samples;
snd_pcm_sframes_t delay = 0;
unsigned int time_delta, uthr;
int samples_out, samples_in, samples;
snd_pcm_sframes_t delay = 0;
+ unsigned long flags;
switch (dac33->fifo_mode) {
case DAC33_FIFO_BYPASS:
break;
case DAC33_FIFO_MODE1:
switch (dac33->fifo_mode) {
case DAC33_FIFO_BYPASS:
break;
case DAC33_FIFO_MODE1:
- spin_lock
(&dac33->lock
);
+ spin_lock
_irqsave(&dac33->lock, flags
);
t0 = dac33->t_stamp1;
t1 = dac33->t_stamp2;
t0 = dac33->t_stamp1;
t1 = dac33->t_stamp2;
- spin_unlock
(&dac33->lock
);
+ spin_unlock
_irqrestore(&dac33->lock, flags
);
t_now = ktime_to_us(ktime_get());
/* We have not started to fill the FIFO yet, delay is 0 */
t_now = ktime_to_us(ktime_get());
/* We have not started to fill the FIFO yet, delay is 0 */
@@
-1249,10
+1257,10
@@
static snd_pcm_sframes_t dac33_dai_delay(
}
break;
case DAC33_FIFO_MODE7:
}
break;
case DAC33_FIFO_MODE7:
- spin_lock
(&dac33->lock
);
+ spin_lock
_irqsave(&dac33->lock, flags
);
t0 = dac33->t_stamp1;
uthr = dac33->uthr;
t0 = dac33->t_stamp1;
uthr = dac33->uthr;
- spin_unlock
(&dac33->lock
);
+ spin_unlock
_irqrestore(&dac33->lock, flags
);
t_now = ktime_to_us(ktime_get());
/* We have not started to fill the FIFO yet, delay is 0 */
t_now = ktime_to_us(ktime_get());
/* We have not started to fill the FIFO yet, delay is 0 */