diff options
author | Mike Isely <isely@pobox.com> | 2006-08-08 08:10:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-26 10:53:20 -0400 |
commit | 434449f4c8902198e6fa90023f60395230f36c23 (patch) | |
tree | 0e42af806f2aadc8b7a6951e58ad9f7ada6a480c /drivers/media/video | |
parent | 1ddf5bc5472f4a45b00bee33fc8c96d4616f8561 (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')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h | 26 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 16 |
2 files changed, 10 insertions, 32 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h index 0bc85c8fb8d6..14800b69e60c 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h | |||
@@ -40,32 +40,6 @@ | |||
40 | #include "pvrusb2-io.h" | 40 | #include "pvrusb2-io.h" |
41 | #include <media/cx2341x.h> | 41 | #include <media/cx2341x.h> |
42 | 42 | ||
43 | /* Legal values for the SRATE state variable */ | ||
44 | #define PVR2_CVAL_SRATE_48 0 | ||
45 | #define PVR2_CVAL_SRATE_44_1 1 | ||
46 | |||
47 | /* Legal values for the AUDIOBITRATE state variable */ | ||
48 | #define PVR2_CVAL_AUDIOBITRATE_384 0 | ||
49 | #define PVR2_CVAL_AUDIOBITRATE_320 1 | ||
50 | #define PVR2_CVAL_AUDIOBITRATE_256 2 | ||
51 | #define PVR2_CVAL_AUDIOBITRATE_224 3 | ||
52 | #define PVR2_CVAL_AUDIOBITRATE_192 4 | ||
53 | #define PVR2_CVAL_AUDIOBITRATE_160 5 | ||
54 | #define PVR2_CVAL_AUDIOBITRATE_128 6 | ||
55 | #define PVR2_CVAL_AUDIOBITRATE_112 7 | ||
56 | #define PVR2_CVAL_AUDIOBITRATE_96 8 | ||
57 | #define PVR2_CVAL_AUDIOBITRATE_80 9 | ||
58 | #define PVR2_CVAL_AUDIOBITRATE_64 10 | ||
59 | #define PVR2_CVAL_AUDIOBITRATE_56 11 | ||
60 | #define PVR2_CVAL_AUDIOBITRATE_48 12 | ||
61 | #define PVR2_CVAL_AUDIOBITRATE_32 13 | ||
62 | #define PVR2_CVAL_AUDIOBITRATE_VBR 14 | ||
63 | |||
64 | /* Legal values for the AUDIOEMPHASIS state variable */ | ||
65 | #define PVR2_CVAL_AUDIOEMPHASIS_NONE 0 | ||
66 | #define PVR2_CVAL_AUDIOEMPHASIS_50_15 1 | ||
67 | #define PVR2_CVAL_AUDIOEMPHASIS_CCITT 2 | ||
68 | |||
69 | /* Legal values for PVR2_CID_HSM */ | 43 | /* Legal values for PVR2_CID_HSM */ |
70 | #define PVR2_CVAL_HSM_FAIL 0 | 44 | #define PVR2_CVAL_HSM_FAIL 0 |
71 | #define PVR2_CVAL_HSM_FULL 1 | 45 | #define PVR2_CVAL_HSM_FULL 1 |
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 | |||
224 | static const char *control_values_srate[] = { | 225 | static 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 | |||
232 | static const char *control_values_input[] = { | 233 | static 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) { |