audio: Fix compilation errors
Fix compilation errors in HAL and enable DOLBY_DDP as it is needed for compress passthrough feature. Change-Id: I05b5cb757acdb841dd48f0423426405ce8237356
This commit is contained in:
parent
f447ef1e88
commit
20e8b021d6
|
@ -45,6 +45,7 @@ MM_AUDIO_ENABLED_SAFX := true
|
|||
TARGET_USES_QCOM_MM_AUDIO := true
|
||||
AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false
|
||||
|
||||
DOLBY_DDP := true
|
||||
AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true
|
||||
AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
|
||||
##AUDIO_FEATURE_FLAGS
|
||||
|
|
|
@ -140,7 +140,6 @@ void audio_extn_passthru_on_start(struct stream_out * out)
|
|||
/* called with adev lock held */
|
||||
void audio_extn_passthru_on_stop(struct stream_out * out)
|
||||
{
|
||||
struct audio_device * adev = out->dev;
|
||||
if (android_atomic_acquire_load(&compress_passthru_active) > 0) {
|
||||
/*
|
||||
* its possible the count is already zero if pause was called before
|
||||
|
|
|
@ -663,7 +663,7 @@ int audio_extn_utils_send_app_type_cfg(struct audio_device *adev,
|
|||
app_type_cfg[len++] = acdb_dev_id;
|
||||
if (((usecase->stream.out->format == AUDIO_FORMAT_E_AC3) ||
|
||||
(usecase->stream.out->format == AUDIO_FORMAT_E_AC3_JOC))
|
||||
&& audio_extn_dolby_is_passthrough_stream(usecase->stream.out->flags)) {
|
||||
&& audio_extn_dolby_is_passthrough_stream(usecase->stream.out)) {
|
||||
app_type_cfg[len++] = sample_rate * 4;
|
||||
} else {
|
||||
app_type_cfg[len++] = sample_rate;
|
||||
|
|
|
@ -1823,7 +1823,6 @@ static int stop_output_stream(struct stream_out *out)
|
|||
int start_output_stream(struct stream_out *out)
|
||||
{
|
||||
int ret = 0;
|
||||
char prop_value[PROPERTY_VALUE_MAX] = {0};
|
||||
struct audio_usecase *uc_info;
|
||||
struct audio_device *adev = out->dev;
|
||||
int snd_card_status = get_snd_card_state(adev);
|
||||
|
|
|
@ -4313,8 +4313,8 @@ unsigned char platform_map_to_edid_format(int audio_format)
|
|||
format = LPCM;
|
||||
break;
|
||||
default:
|
||||
ALOGE("%s:invalid format:%d", __func__,format);
|
||||
format = -1;
|
||||
ALOGE("%s:invalid format:%d", __func__,format);
|
||||
break;
|
||||
}
|
||||
return format;
|
||||
|
@ -4377,10 +4377,8 @@ bool platform_is_edid_supported_format(void *platform, int format)
|
|||
bool platform_is_edid_supported_sample_rate(void *platform, int sample_rate)
|
||||
{
|
||||
struct platform_data *my_data = (struct platform_data *)platform;
|
||||
struct audio_device *adev = my_data->adev;
|
||||
edid_audio_info *info = NULL;
|
||||
int num_audio_blocks;
|
||||
int i, ret, count;
|
||||
int i, ret;
|
||||
|
||||
ret = platform_get_edid_info(platform);
|
||||
info = (edid_audio_info *)my_data->edid_info;
|
||||
|
@ -4473,6 +4471,22 @@ int platform_set_mixer_control(struct stream_out *out, const char * mixer_ctl_na
|
|||
return mixer_ctl_set_enum_by_string(ctl, mixer_val);
|
||||
}
|
||||
|
||||
static int set_mixer_control(struct mixer *mixer,
|
||||
const char * mixer_ctl_name,
|
||||
const char *mixer_val)
|
||||
{
|
||||
struct mixer_ctl *ctl;
|
||||
ALOGD("setting mixer ctl %s with value %s", mixer_ctl_name, mixer_val);
|
||||
ctl = mixer_get_ctl_by_name(mixer, mixer_ctl_name);
|
||||
if (!ctl) {
|
||||
ALOGE("%s: could not get ctl for mixer cmd - %s",
|
||||
__func__, mixer_ctl_name);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return mixer_ctl_set_enum_by_string(ctl, mixer_val);
|
||||
}
|
||||
|
||||
int platform_set_hdmi_config(void *platform, uint32_t channel_count,
|
||||
uint32_t sample_rate, bool enable_passthrough)
|
||||
{
|
||||
|
|
|
@ -4264,8 +4264,8 @@ unsigned char platform_map_to_edid_format(int audio_format)
|
|||
format = LPCM;
|
||||
break;
|
||||
default:
|
||||
ALOGE("%s:invalid format:%d", __func__,format);
|
||||
format = -1;
|
||||
ALOGE("%s:invalid format:%d", __func__,format);
|
||||
break;
|
||||
}
|
||||
return format;
|
||||
|
@ -4328,10 +4328,8 @@ bool platform_is_edid_supported_format(void *platform, int format)
|
|||
bool platform_is_edid_supported_sample_rate(void *platform, int sample_rate)
|
||||
{
|
||||
struct platform_data *my_data = (struct platform_data *)platform;
|
||||
struct audio_device *adev = my_data->adev;
|
||||
edid_audio_info *info = NULL;
|
||||
int num_audio_blocks;
|
||||
int i, ret, count;
|
||||
int i, ret;
|
||||
|
||||
ret = platform_get_edid_info(platform);
|
||||
info = (edid_audio_info *)my_data->edid_info;
|
||||
|
|
Loading…
Reference in New Issue