aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2009-01-30 20:39:26 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:38 -0400
commit072e6183c26cb00de0368a06cbbda2a2d55e6844 (patch)
tree9a7ca9c58baa36154a0f3b2f62fa486a0ebd4f3b
parente474200d3502d4cb3cc240930640c7d857bf777b (diff)
V4L/DVB (10434): cx18: Smarter verification of CX18_AUDIO_ENABLE register writes
The CX18_AUDIO_ENABLE register usually never reads back what was just written under normal circumstances. Perform better checking that a write went to the register as expected with a specification of what bits to verify. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/cx18/cx18-audio.c3
-rw-r--r--drivers/media/video/cx18/cx18-av-firmware.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/cx18/cx18-audio.c b/drivers/media/video/cx18/cx18-audio.c
index 57beddf0af4d..d19bd778c6ac 100644
--- a/drivers/media/video/cx18/cx18-audio.c
+++ b/drivers/media/video/cx18/cx18-audio.c
@@ -64,8 +64,7 @@ int cx18_audio_set_io(struct cx18 *cx)
64 val = cx18_read_reg(cx, CX18_AUDIO_ENABLE) & ~0x30; 64 val = cx18_read_reg(cx, CX18_AUDIO_ENABLE) & ~0x30;
65 val |= (audio_input > CX18_AV_AUDIO_SERIAL2) ? 0x20 : 65 val |= (audio_input > CX18_AV_AUDIO_SERIAL2) ? 0x20 :
66 (audio_input << 4); 66 (audio_input << 4);
67 cx18_write_reg(cx, val | 0xb00, CX18_AUDIO_ENABLE); 67 cx18_write_reg_expect(cx, val | 0xb00, CX18_AUDIO_ENABLE, val, 0x30);
68 cx18_vapi(cx, CX18_APU_RESETAI, 1, 0);
69 return 0; 68 return 0;
70} 69}
71 70
diff --git a/drivers/media/video/cx18/cx18-av-firmware.c b/drivers/media/video/cx18/cx18-av-firmware.c
index b374c74d3e7b..940ea9352115 100644
--- a/drivers/media/video/cx18/cx18-av-firmware.c
+++ b/drivers/media/video/cx18/cx18-av-firmware.c
@@ -131,7 +131,8 @@ int cx18_av_loadfw(struct cx18 *cx)
131 v = cx18_read_reg(cx, CX18_AUDIO_ENABLE); 131 v = cx18_read_reg(cx, CX18_AUDIO_ENABLE);
132 /* If bit 11 is 1, clear bit 10 */ 132 /* If bit 11 is 1, clear bit 10 */
133 if (v & 0x800) 133 if (v & 0x800)
134 cx18_write_reg(cx, v & 0xFFFFFBFF, CX18_AUDIO_ENABLE); 134 cx18_write_reg_expect(cx, v & 0xFFFFFBFF, CX18_AUDIO_ENABLE,
135 0, 0x400);
135 136
136 /* Enable WW auto audio standard detection */ 137 /* Enable WW auto audio standard detection */
137 v = cx18_av_read4(cx, CXADEC_STD_DET_CTL); 138 v = cx18_av_read4(cx, CXADEC_STD_DET_CTL);