Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad1cec25 authored by Eric Laurent's avatar Eric Laurent
Browse files

hal : add default format handling for multi channel HDMI

Allow to open the HDMI multi channel direct output stream
with default sample format.
It is legitimate for the framework to open a stream with default
audio attributes in which case the defaults are chosen by the HAL.

Change-Id: Iff319ea5f47d9f80725ee895e49606e5b6804d22
parent 6dc6dd69
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2162,9 +2162,12 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
            config->sample_rate = DEFAULT_OUTPUT_SAMPLING_RATE;
        if (config->channel_mask == 0)
            config->channel_mask = AUDIO_CHANNEL_OUT_5POINT1;
        if (config->format == AUDIO_FORMAT_DEFAULT)
            config->format = AUDIO_FORMAT_PCM_16_BIT;

        out->channel_mask = config->channel_mask;
        out->sample_rate = config->sample_rate;
        out->format = config->format;
        out->usecase = USECASE_AUDIO_PLAYBACK_MULTI_CH;
        out->config = pcm_config_hdmi_multi;
        out->config.rate = config->sample_rate;
@@ -2782,7 +2785,6 @@ static int adev_verify_devices(struct audio_device *adev)
                    ALOGV("%s: (%s) card %d  device %d", __func__,
                            dir ? "input" : "output", card_id, device_id);
                    pcm_params_to_string(*pparams, info, ARRAY_SIZE(info));
                    ALOGV(info); /* print parameters */
                } else {
                    ALOGV("%s: cannot locate card %d  device %d", __func__, card_id, device_id);
                }