Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92514
b: refs/heads/master
c: 867bc6c
h: refs/heads/master
v: v3
  • Loading branch information
Hartmut Hackmann authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 1264e71 commit c0e5258
Show file tree
Hide file tree
Showing 3 changed files with 17 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: c1e6393e24e0fcc8047db18dce05758c3fd54515
refs/heads/master: 867bc6cccc511ccbf40609ccb6ede2aafdeb922e
3 changes: 3 additions & 0 deletions trunk/drivers/media/video/saa7134/saa7134-reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,9 @@
#define SAA7135_DSP_RWSTATE_RDB (1 << 1)
#define SAA7135_DSP_RWSTATE_WRR (1 << 0)

#define SAA7135_DSP_RWCLEAR 0x586
#define SAA7135_DSP_RWCLEAR_RERR 1

/* ------------------------------------------------------------------ */
/*
* Local variables:
Expand Down
15 changes: 13 additions & 2 deletions trunk/drivers/media/video/saa7134/saa7134-tvaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,15 +653,26 @@ static char *stdres[0x20] = {

#define DSP_RETRY 32
#define DSP_DELAY 16
#define SAA7135_DSP_RWCLEAR_RERR 1

static inline int saa_dsp_reset_error_bit(struct saa7134_dev *dev)
{
int state = saa_readb(SAA7135_DSP_RWSTATE);
if (unlikely(state & SAA7135_DSP_RWSTATE_ERR)) {
d2printk("%s: resetting error bit\n", dev->name);
saa_writeb(SAA7135_DSP_RWCLEAR, SAA7135_DSP_RWCLEAR_RERR);
}
return 0;
}

static inline int saa_dsp_wait_bit(struct saa7134_dev *dev, int bit)
{
int state, count = DSP_RETRY;

state = saa_readb(SAA7135_DSP_RWSTATE);
if (unlikely(state & SAA7135_DSP_RWSTATE_ERR)) {
printk("%s: dsp access error\n",dev->name);
/* FIXME: send ack ... */
printk(KERN_WARNING "%s: dsp access error\n", dev->name);
saa_dsp_reset_error_bit(dev);
return -EIO;
}
while (0 == (state & bit)) {
Expand Down

0 comments on commit c0e5258

Please sign in to comment.