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

Commit 7f47fe3a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: reset default parameters when ignoring non-existing USB sound card"

parents 0dfb4540 dbd20561
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -7461,6 +7461,12 @@ int adev_open_output_stream(struct audio_hw_device *dev,
        devices = AUDIO_DEVICE_OUT_SPEAKER;
        ALOGW("%s: ignore set device to non existing USB card, use output device(%#x)",
              __func__, devices);
        if (config->format == AUDIO_FORMAT_DEFAULT)
            config->format = AUDIO_FORMAT_PCM_16_BIT;
        if (config->sample_rate == 0)
            config->sample_rate = DEFAULT_OUTPUT_SAMPLING_RATE;
        if (config->channel_mask == AUDIO_CHANNEL_NONE)
            config->channel_mask = AUDIO_CHANNEL_OUT_STEREO;
    }

    *stream_out = NULL;