diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-08-29 21:35:39 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-08-29 21:35:39 +0000 |
commit | 41b71b230e0aa4b495c091e7d17c6b939ddbce79 (patch) | |
tree | 171620f6b798d846824be31bbfcfedaba8efb87b /audio/unix.c | |
parent | 87bb7258bdf221195d010b0e03cda7cd7c0195b9 (diff) |
Fix the need to have all parameters.
Diffstat (limited to 'audio/unix.c')
-rw-r--r-- | audio/unix.c | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/audio/unix.c b/audio/unix.c index ef8d6673..6239c203 100644 --- a/audio/unix.c +++ b/audio/unix.c @@ -469,12 +469,8 @@ static int cfg_to_caps(struct ipc_data_cfg *cfg, struct sbc_codec_cap *sbc_cap) default: return -EINVAL; } - } else { - sbc_cap->frequency = ( A2DP_SAMPLING_FREQ_48000 | - A2DP_SAMPLING_FREQ_44100 | - A2DP_SAMPLING_FREQ_32000 | - A2DP_SAMPLING_FREQ_16000 ); - } + } else + sbc_cap->frequency = A2DP_SAMPLING_FREQ_44100; if (cfg->channel_mode > 0) { switch (cfg->channel_mode) { @@ -487,12 +483,8 @@ static int cfg_to_caps(struct ipc_data_cfg *cfg, struct sbc_codec_cap *sbc_cap) default: return -EINVAL; } - } else { - sbc_cap->channel_mode = ( A2DP_CHANNEL_MODE_JOINT_STEREO | - A2DP_CHANNEL_MODE_STEREO | - A2DP_CHANNEL_MODE_DUAL_CHANNEL | - A2DP_CHANNEL_MODE_MONO ); - } + } else + sbc_cap->channel_mode = A2DP_CHANNEL_MODE_JOINT_STEREO; if (sbc->allocation > 0) { switch (sbc->allocation) { @@ -504,8 +496,7 @@ static int cfg_to_caps(struct ipc_data_cfg *cfg, struct sbc_codec_cap *sbc_cap) return -EINVAL; } } else - sbc_cap->allocation_method = ( A2DP_ALLOCATION_LOUDNESS | - A2DP_ALLOCATION_SNR ); + sbc_cap->allocation_method = A2DP_ALLOCATION_LOUDNESS; if (sbc->subbands > 0) { switch (sbc->subbands) { @@ -519,7 +510,7 @@ static int cfg_to_caps(struct ipc_data_cfg *cfg, struct sbc_codec_cap *sbc_cap) return -EINVAL; } } else - sbc_cap->subbands = ( A2DP_SUBBANDS_8 | A2DP_SUBBANDS_4 ); + sbc_cap->subbands = A2DP_SUBBANDS_8; if (sbc->blocks > 0) { switch (sbc->blocks) { @@ -538,21 +529,15 @@ static int cfg_to_caps(struct ipc_data_cfg *cfg, struct sbc_codec_cap *sbc_cap) default: return -EINVAL; } - } else { - sbc_cap->block_length = ( A2DP_BLOCK_LENGTH_16 | - A2DP_BLOCK_LENGTH_12 | - A2DP_BLOCK_LENGTH_8 | - A2DP_BLOCK_LENGTH_4 ); - } + } else + sbc_cap->block_length = A2DP_BLOCK_LENGTH_16; if (sbc->bitpool > 250) return -EINVAL; else if (sbc->bitpool > 0) sbc_cap->min_bitpool = sbc_cap->max_bitpool = sbc->bitpool; - else { - sbc_cap->min_bitpool = 2; - sbc_cap->max_bitpool = 250; - } + else + sbc_cap->min_bitpool = 53; return 0; } |