diff options
Diffstat (limited to 'drivers/media/video/cx18')
-rw-r--r-- | drivers/media/video/cx18/cx18-av-core.c | 5 | ||||
-rw-r--r-- | drivers/media/video/cx18/cx18-av-core.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/cx18/cx18-av-core.c b/drivers/media/video/cx18/cx18-av-core.c index 3ccdf613bce0..124014253569 100644 --- a/drivers/media/video/cx18/cx18-av-core.c +++ b/drivers/media/video/cx18/cx18-av-core.c | |||
@@ -80,6 +80,7 @@ static void log_video_status(struct cx18 *cx); | |||
80 | 80 | ||
81 | static void cx18_av_initialize(struct cx18 *cx) | 81 | static void cx18_av_initialize(struct cx18 *cx) |
82 | { | 82 | { |
83 | struct cx18_av_state *state = &cx->av_state; | ||
83 | u32 v; | 84 | u32 v; |
84 | 85 | ||
85 | cx18_av_loadfw(cx); | 86 | cx18_av_loadfw(cx); |
@@ -159,6 +160,8 @@ static void cx18_av_initialize(struct cx18 *cx) | |||
159 | /* CxDevWrReg(CXADEC_SRC_COMB_CFG, 0x6628021F); */ | 160 | /* CxDevWrReg(CXADEC_SRC_COMB_CFG, 0x6628021F); */ |
160 | /* } */ | 161 | /* } */ |
161 | cx18_av_write4(cx, CXADEC_SRC_COMB_CFG, 0x6628021F); | 162 | cx18_av_write4(cx, CXADEC_SRC_COMB_CFG, 0x6628021F); |
163 | state->default_volume = 228 - cx18_av_read(cx, 0x8d4); | ||
164 | state->default_volume = ((state->default_volume / 2) + 23) << 9; | ||
162 | } | 165 | } |
163 | 166 | ||
164 | /* ----------------------------------------------------------------------- */ | 167 | /* ----------------------------------------------------------------------- */ |
@@ -559,6 +562,8 @@ int cx18_av_cmd(struct cx18 *cx, unsigned int cmd, void *arg) | |||
559 | 562 | ||
560 | switch (qc->id) { | 563 | switch (qc->id) { |
561 | case V4L2_CID_AUDIO_VOLUME: | 564 | case V4L2_CID_AUDIO_VOLUME: |
565 | return v4l2_ctrl_query_fill(qc, 0, 65535, | ||
566 | 65535 / 100, state->default_volume); | ||
562 | case V4L2_CID_AUDIO_MUTE: | 567 | case V4L2_CID_AUDIO_MUTE: |
563 | case V4L2_CID_AUDIO_BALANCE: | 568 | case V4L2_CID_AUDIO_BALANCE: |
564 | case V4L2_CID_AUDIO_BASS: | 569 | case V4L2_CID_AUDIO_BASS: |
diff --git a/drivers/media/video/cx18/cx18-av-core.h b/drivers/media/video/cx18/cx18-av-core.h index b54239959a68..49e31bccc557 100644 --- a/drivers/media/video/cx18/cx18-av-core.h +++ b/drivers/media/video/cx18/cx18-av-core.h | |||
@@ -79,6 +79,7 @@ struct cx18_av_state { | |||
79 | u32 audclk_freq; | 79 | u32 audclk_freq; |
80 | int audmode; | 80 | int audmode; |
81 | int vbi_line_offset; | 81 | int vbi_line_offset; |
82 | int default_volume; | ||
82 | u32 id; | 83 | u32 id; |
83 | u32 rev; | 84 | u32 rev; |
84 | int is_initialized; | 85 | int is_initialized; |