diff options
author | Xinhui Zhou <zxinhui@google.com> | 2021-07-14 22:45:57 -0700 |
---|---|---|
committer | Xinhui Zhou <zxinhui@google.com> | 2021-07-20 02:00:51 +0000 |
commit | d7353ce2ef5afaddb0188a1e6ddd8c8bc196cf12 (patch) | |
tree | e9472358f2863ad67ae1a49a5653e095381a4c23 | |
parent | c01a066df36772865458755124d6dbfbc56a3131 (diff) | |
download | aoc-d7353ce2ef5afaddb0188a1e6ddd8c8bc196cf12.tar.gz |
aoc/alsa: change snd_pcm_hardware setup for usb hifi
Double the max of both buffer size and period size in snd_pcm_hardware
to accommodate the requirement from usb hifi playback/capture.
For pcm stream with data format (32bits, 8 ch, 96 kHZ), 20ms period
size, and 4 periods, the resulting buffer size is 245760 bytes, and
the period size is 61440 bytes.
Bug: 193478866
Signed-off-by: Xinhui Zhou <zxinhui@google.com>
Change-Id: I7d85974a3c08765947b67cfa15b012821495fdfa
-rw-r--r-- | alsa/aoc_alsa_incall.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alsa/aoc_alsa_incall.c b/alsa/aoc_alsa_incall.c index a20cfc9..5e38900 100644 --- a/alsa/aoc_alsa_incall.c +++ b/alsa/aoc_alsa_incall.c @@ -31,9 +31,9 @@ static struct snd_pcm_hardware snd_aoc_playback_hw = { .rate_max = 96000, .channels_min = 1, .channels_max = 8, - .buffer_bytes_max = 16384 * 8, + .buffer_bytes_max = 16384 * 16, .period_bytes_min = 16, - .period_bytes_max = 7680 * 4, + .period_bytes_max = 7680 * 16, .periods_min = 2, .periods_max = 128, }; |