diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-reg.h | 3 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-tvaudio.c | 15 |
2 files changed, 16 insertions, 2 deletions
diff --git a/drivers/media/video/saa7134/saa7134-reg.h b/drivers/media/video/saa7134/saa7134-reg.h index ac6431ba4fc3..86f5eefdb0f6 100644 --- a/drivers/media/video/saa7134/saa7134-reg.h +++ b/drivers/media/video/saa7134/saa7134-reg.h | |||
@@ -365,6 +365,9 @@ | |||
365 | #define SAA7135_DSP_RWSTATE_RDB (1 << 1) | 365 | #define SAA7135_DSP_RWSTATE_RDB (1 << 1) |
366 | #define SAA7135_DSP_RWSTATE_WRR (1 << 0) | 366 | #define SAA7135_DSP_RWSTATE_WRR (1 << 0) |
367 | 367 | ||
368 | #define SAA7135_DSP_RWCLEAR 0x586 | ||
369 | #define SAA7135_DSP_RWCLEAR_RERR 1 | ||
370 | |||
368 | /* ------------------------------------------------------------------ */ | 371 | /* ------------------------------------------------------------------ */ |
369 | /* | 372 | /* |
370 | * Local variables: | 373 | * Local variables: |
diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c index b90c55c0536e..232af598d947 100644 --- a/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/drivers/media/video/saa7134/saa7134-tvaudio.c | |||
@@ -653,6 +653,17 @@ static char *stdres[0x20] = { | |||
653 | 653 | ||
654 | #define DSP_RETRY 32 | 654 | #define DSP_RETRY 32 |
655 | #define DSP_DELAY 16 | 655 | #define DSP_DELAY 16 |
656 | #define SAA7135_DSP_RWCLEAR_RERR 1 | ||
657 | |||
658 | static inline int saa_dsp_reset_error_bit(struct saa7134_dev *dev) | ||
659 | { | ||
660 | int state = saa_readb(SAA7135_DSP_RWSTATE); | ||
661 | if (unlikely(state & SAA7135_DSP_RWSTATE_ERR)) { | ||
662 | d2printk("%s: resetting error bit\n", dev->name); | ||
663 | saa_writeb(SAA7135_DSP_RWCLEAR, SAA7135_DSP_RWCLEAR_RERR); | ||
664 | } | ||
665 | return 0; | ||
666 | } | ||
656 | 667 | ||
657 | static inline int saa_dsp_wait_bit(struct saa7134_dev *dev, int bit) | 668 | static inline int saa_dsp_wait_bit(struct saa7134_dev *dev, int bit) |
658 | { | 669 | { |
@@ -660,8 +671,8 @@ static inline int saa_dsp_wait_bit(struct saa7134_dev *dev, int bit) | |||
660 | 671 | ||
661 | state = saa_readb(SAA7135_DSP_RWSTATE); | 672 | state = saa_readb(SAA7135_DSP_RWSTATE); |
662 | if (unlikely(state & SAA7135_DSP_RWSTATE_ERR)) { | 673 | if (unlikely(state & SAA7135_DSP_RWSTATE_ERR)) { |
663 | printk("%s: dsp access error\n",dev->name); | 674 | printk(KERN_WARNING "%s: dsp access error\n", dev->name); |
664 | /* FIXME: send ack ... */ | 675 | saa_dsp_reset_error_bit(dev); |
665 | return -EIO; | 676 | return -EIO; |
666 | } | 677 | } |
667 | while (0 == (state & bit)) { | 678 | while (0 == (state & bit)) { |