static void blackbird_set_default_params(struct cx8802_dev *dev)
{
struct v4l2_mpeg_compression *params = &dev->params;
+ u32 au_params;
/* assign stream type */
if( params->st_type >= ARRAY_SIZE(mpeg_stream_types) )
/* assign audio properties */
/* note: it's not necessary to set the samplerate, the mpeg encoder seems to autodetect/adjust */
- u32 au_params = BLACKBIRD_AUDIO_BITS_STEREO |
+ au_params = BLACKBIRD_AUDIO_BITS_STEREO |
/* BLACKBIRD_AUDIO_BITS_BOUND_4 | */
BLACKBIRD_AUDIO_BITS_EMPHASIS_NONE |
BLACKBIRD_AUDIO_BITS_CRC_OFF |
}
if( params->au_bitrate.mode )
{
+ int layer;
+
if( params->au_bitrate.mode == V4L2_BITRATE_CBR )
params->au_bitrate.max = params->vi_bitrate.target;
else
params->au_bitrate.target = params->vi_bitrate.max;
- int layer = params->au_type;
+ layer = params->au_type;
if( params->au_bitrate.target == 0 )
{
/* TODO: use the minimum possible bitrate instead of 0 ? */
#define UPDATE_PARAM( name ) dev->params.name = params->name
void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *params)
{
+ u32 au_params;
+
/* assign stream type */
if( params->st_type >= ARRAY_SIZE(mpeg_stream_types) )
params->st_type = V4L2_MPEG_PS_2;
/* assign audio properties */
/* note: it's not necessary to set the samplerate, the mpeg encoder seems to autodetect/adjust */
- u32 au_params = BLACKBIRD_AUDIO_BITS_STEREO |
+ au_params = BLACKBIRD_AUDIO_BITS_STEREO |
/* BLACKBIRD_AUDIO_BITS_BOUND_4 | */
BLACKBIRD_AUDIO_BITS_EMPHASIS_NONE |
BLACKBIRD_AUDIO_BITS_CRC_OFF |
}
if( params->au_bitrate.mode )
{
+ int layer;
+
if( params->au_bitrate.mode == V4L2_BITRATE_CBR )
params->au_bitrate.max = params->vi_bitrate.target;
else
params->au_bitrate.target = params->vi_bitrate.max;
- int layer = params->au_type;
+ layer = params->au_type;
if( params->au_bitrate.target == 0 )
{
/* TODO: use the minimum possible bitrate instead of 0 ? */