V4L/DVB (8649): v4l2: add AAC bitrate control
authorHans Verkuil <hverkuil@xs4all.nl>
Sat, 9 Aug 2008 13:35:29 +0000 (10:35 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Oct 2008 11:36:49 +0000 (09:36 -0200)
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>
drivers/media/video/v4l2-common.c
include/linux/videodev2.h

index 0c511839f7ee1bfbee5e08c79f64b2bacbd8fda3..20c3be8617ea62eb583fd7827ad6c0c019de6d63 100644 (file)
@@ -386,6 +386,7 @@ const char *v4l2_ctrl_get_name(u32 id)
        case V4L2_CID_MPEG_AUDIO_L1_BITRATE:    return "Audio Layer I Bitrate";
        case V4L2_CID_MPEG_AUDIO_L2_BITRATE:    return "Audio Layer II Bitrate";
        case V4L2_CID_MPEG_AUDIO_L3_BITRATE:    return "Audio Layer III Bitrate";
+       case V4L2_CID_MPEG_AUDIO_AAC_BITRATE:   return "Audio AAC Bitrate";
        case V4L2_CID_MPEG_AUDIO_AC3_BITRATE:   return "Audio AC-3 Bitrate";
        case V4L2_CID_MPEG_AUDIO_MODE:          return "Audio Stereo Mode";
        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)
                                V4L2_MPEG_AUDIO_L3_BITRATE_32K,
                                V4L2_MPEG_AUDIO_L3_BITRATE_320K, 1,
                                V4L2_MPEG_AUDIO_L3_BITRATE_192K);
+       case V4L2_CID_MPEG_AUDIO_AAC_BITRATE:
+               return v4l2_ctrl_query_fill(qctrl, 0, 6400, 1, 3200000);
        case V4L2_CID_MPEG_AUDIO_AC3_BITRATE:
                return v4l2_ctrl_query_fill(qctrl,
                                V4L2_MPEG_AUDIO_AC3_BITRATE_32K,
index 9054764f4cdeb04b58379b1f23dbb3a73792b51d..d4b03034ee73af53507e2ec15bb68235139b029d 100644 (file)
@@ -990,7 +990,8 @@ enum v4l2_mpeg_audio_crc {
        V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
 };
 #define V4L2_CID_MPEG_AUDIO_MUTE               (V4L2_CID_MPEG_BASE+109)
-#define V4L2_CID_MPEG_AUDIO_AC3_BITRATE                (V4L2_CID_MPEG_BASE+110)
+#define V4L2_CID_MPEG_AUDIO_AAC_BITRATE                (V4L2_CID_MPEG_BASE+110)
+#define V4L2_CID_MPEG_AUDIO_AC3_BITRATE                (V4L2_CID_MPEG_BASE+111)
 enum v4l2_mpeg_audio_ac3_bitrate {
        V4L2_MPEG_AUDIO_AC3_BITRATE_32K  = 0,
        V4L2_MPEG_AUDIO_AC3_BITRATE_40K  = 1,