aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-08-09 09:35:29 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:36:49 -0400
commitf723af16da8359cda47320001960609b0086082b (patch)
treea23702881ac585001dfe33b1c2d16637ff123343
parent89ce2216e338f62c411bea12df37a2f54f2ce13a (diff)
V4L/DVB (8649): v4l2: add AAC bitrate control
If you can select AAC as audio encoder, then you should also be able to set the bitrate. Add this missing control. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/v4l2-common.c3
-rw-r--r--include/linux/videodev2.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c
index 0c511839f7ee..20c3be8617ea 100644
--- a/drivers/media/video/v4l2-common.c
+++ b/drivers/media/video/v4l2-common.c
@@ -386,6 +386,7 @@ const char *v4l2_ctrl_get_name(u32 id)
386 case V4L2_CID_MPEG_AUDIO_L1_BITRATE: return "Audio Layer I Bitrate"; 386 case V4L2_CID_MPEG_AUDIO_L1_BITRATE: return "Audio Layer I Bitrate";
387 case V4L2_CID_MPEG_AUDIO_L2_BITRATE: return "Audio Layer II Bitrate"; 387 case V4L2_CID_MPEG_AUDIO_L2_BITRATE: return "Audio Layer II Bitrate";
388 case V4L2_CID_MPEG_AUDIO_L3_BITRATE: return "Audio Layer III Bitrate"; 388 case V4L2_CID_MPEG_AUDIO_L3_BITRATE: return "Audio Layer III Bitrate";
389 case V4L2_CID_MPEG_AUDIO_AAC_BITRATE: return "Audio AAC Bitrate";
389 case V4L2_CID_MPEG_AUDIO_AC3_BITRATE: return "Audio AC-3 Bitrate"; 390 case V4L2_CID_MPEG_AUDIO_AC3_BITRATE: return "Audio AC-3 Bitrate";
390 case V4L2_CID_MPEG_AUDIO_MODE: return "Audio Stereo Mode"; 391 case V4L2_CID_MPEG_AUDIO_MODE: return "Audio Stereo Mode";
391 case V4L2_CID_MPEG_AUDIO_MODE_EXTENSION: return "Audio Stereo Mode Extension"; 392 case V4L2_CID_MPEG_AUDIO_MODE_EXTENSION: return "Audio Stereo Mode Extension";
@@ -548,6 +549,8 @@ int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl)
548 V4L2_MPEG_AUDIO_L3_BITRATE_32K, 549 V4L2_MPEG_AUDIO_L3_BITRATE_32K,
549 V4L2_MPEG_AUDIO_L3_BITRATE_320K, 1, 550 V4L2_MPEG_AUDIO_L3_BITRATE_320K, 1,
550 V4L2_MPEG_AUDIO_L3_BITRATE_192K); 551 V4L2_MPEG_AUDIO_L3_BITRATE_192K);
552 case V4L2_CID_MPEG_AUDIO_AAC_BITRATE:
553 return v4l2_ctrl_query_fill(qctrl, 0, 6400, 1, 3200000);
551 case V4L2_CID_MPEG_AUDIO_AC3_BITRATE: 554 case V4L2_CID_MPEG_AUDIO_AC3_BITRATE:
552 return v4l2_ctrl_query_fill(qctrl, 555 return v4l2_ctrl_query_fill(qctrl,
553 V4L2_MPEG_AUDIO_AC3_BITRATE_32K, 556 V4L2_MPEG_AUDIO_AC3_BITRATE_32K,
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 9054764f4cde..d4b03034ee73 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -990,7 +990,8 @@ enum v4l2_mpeg_audio_crc {
990 V4L2_MPEG_AUDIO_CRC_CRC16 = 1, 990 V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
991}; 991};
992#define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_MPEG_BASE+109) 992#define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_MPEG_BASE+109)
993#define V4L2_CID_MPEG_AUDIO_AC3_BITRATE (V4L2_CID_MPEG_BASE+110) 993#define V4L2_CID_MPEG_AUDIO_AAC_BITRATE (V4L2_CID_MPEG_BASE+110)
994#define V4L2_CID_MPEG_AUDIO_AC3_BITRATE (V4L2_CID_MPEG_BASE+111)
994enum v4l2_mpeg_audio_ac3_bitrate { 995enum v4l2_mpeg_audio_ac3_bitrate {
995 V4L2_MPEG_AUDIO_AC3_BITRATE_32K = 0, 996 V4L2_MPEG_AUDIO_AC3_BITRATE_32K = 0,
996 V4L2_MPEG_AUDIO_AC3_BITRATE_40K = 1, 997 V4L2_MPEG_AUDIO_AC3_BITRATE_40K = 1,