aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-hdw.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-08-08 08:10:06 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 10:53:20 -0400
commit434449f4c8902198e6fa90023f60395230f36c23 (patch)
tree0e42af806f2aadc8b7a6951e58ad9f7ada6a480c /drivers/media/video/pvrusb2/pvrusb2-hdw.c
parent1ddf5bc5472f4a45b00bee33fc8c96d4616f8561 (diff)
V4L/DVB (4372): Clean up some post mpeg-controls issues in pvrusb2
Fix a few miscellaneous issues in the pvrusb2 driver related to use of the new mpeg controls. This also should fix problems involving update of the saa7115 / cx25840 configuration as control changes are made. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index be1e5cc78081..4ccbd53c715e 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -221,14 +221,15 @@ static const struct pvr2_mpeg_ids mpeg_ids[] = {
221}; 221};
222#define MPEGDEF_COUNT (sizeof(mpeg_ids)/sizeof(mpeg_ids[0])) 222#define MPEGDEF_COUNT (sizeof(mpeg_ids)/sizeof(mpeg_ids[0]))
223 223
224
224static const char *control_values_srate[] = { 225static const char *control_values_srate[] = {
225 [PVR2_CVAL_SRATE_48] = "48KHz", 226 [V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100] = "44.1 kHz",
226 [PVR2_CVAL_SRATE_44_1] = "44.1KHz", 227 [V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000] = "48 kHz",
228 [V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000] = "32 kHz",
227}; 229};
228 230
229 231
230 232
231
232static const char *control_values_input[] = { 233static const char *control_values_input[] = {
233 [PVR2_CVAL_INPUT_TV] = "television", /*xawtv needs this name*/ 234 [PVR2_CVAL_INPUT_TV] = "television", /*xawtv needs this name*/
234 [PVR2_CVAL_INPUT_RADIO] = "radio", 235 [PVR2_CVAL_INPUT_RADIO] = "radio",
@@ -729,9 +730,9 @@ static const struct pvr2_ctl_info control_defs[] = {
729 DEFINT(200,625), 730 DEFINT(200,625),
730 },{ 731 },{
731 .v4l_id = V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ, 732 .v4l_id = V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ,
732 .desc = "Sample rate", 733 .default_value = V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000,
734 .desc = "Audio Sampling Frequency",
733 .name = "srate", 735 .name = "srate",
734 .default_value = PVR2_CVAL_SRATE_48,
735 DEFREF(srate), 736 DEFREF(srate),
736 DEFENUM(control_values_srate), 737 DEFENUM(control_values_srate),
737 },{ 738 },{
@@ -2237,11 +2238,14 @@ static int pvr2_hdw_commit_ctl_internal(struct pvr2_hdw *hdw)
2237 } 2238 }
2238 2239
2239 if (hdw->std_dirty || 2240 if (hdw->std_dirty ||
2241 hdw->enc_stale ||
2242 hdw->srate_dirty ||
2243 hdw->res_ver_dirty ||
2244 hdw->res_hor_dirty ||
2240 0) { 2245 0) {
2241 /* If any of this changes, then the encoder needs to be 2246 /* If any of this changes, then the encoder needs to be
2242 reconfigured, and we need to reset the stream. */ 2247 reconfigured, and we need to reset the stream. */
2243 stale_subsys_mask |= (1<<PVR2_SUBSYS_B_ENC_CFG); 2248 stale_subsys_mask |= (1<<PVR2_SUBSYS_B_ENC_CFG);
2244 stale_subsys_mask |= hdw->subsys_stream_mask;
2245 } 2249 }
2246 2250
2247 if (hdw->srate_dirty) { 2251 if (hdw->srate_dirty) {