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

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

AudioFlinger: return actual MMAP stream configuration after opening

Fix MmapStreamInterface::openMmapStream() implementation to return
actual sampling rate, channel mask and format used at the audio HAL
once the stream is opened.

Bug: 76213894
Test: make
Change-Id: I0e497b898d86246bcb1bdde42c3114d43e1f14d0
parent 9ce5404e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -347,6 +347,9 @@ status_t AudioFlinger::openMmapStream(MmapStreamInterface::stream_direction_t di
        thread->configure(&localAttr, streamType, actualSessionId, callback, *deviceId, portId);
        *handle = portId;
        *sessionId = actualSessionId;
        config->sample_rate = thread->sampleRate();
        config->channel_mask = thread->channelMask();
        config->format = thread->format();
    } else {
        if (direction == MmapStreamInterface::DIRECTION_OUTPUT) {
            AudioSystem::releaseOutput(portId);