The caller's requested latency in frames is based on the stream's requested rate in stream_params. In the default case (when not overriding latency for BT headsets), use this rate when converting frames to hns.
This was discovered while investigating BMO 1732479, where a 192kHz stream created on a device using a 44.1kHz device rate resulted in streams with a latency of ~425ms instead of the expected ~100ms (causing very large shmem requests in AudioIPC; ~668kB for initial refill when the shmem was limited to 512kB).
The caller's requested latency in frames is based on the stream's requested rate in
stream_params
. In the default case (when not overriding latency for BT headsets), use this rate when converting frames to hns.This was discovered while investigating BMO 1732479, where a 192kHz stream created on a device using a 44.1kHz device rate resulted in streams with a latency of ~425ms instead of the expected ~100ms (causing very large shmem requests in AudioIPC; ~668kB for initial refill when the shmem was limited to 512kB).