diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-06-01 18:24:54 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-06-02 09:01:30 +0200 |
commit | d303c5d38b37eed066c0f704c5a76353bce27284 (patch) | |
tree | 35d8605a4a386798bbf562920d74db789eb8cd18 /sound/usb/card.h | |
parent | cdebd5530360cfd6240b1692a4c60212a2e39c8a (diff) | |
download | linux-d303c5d38b37eed066c0f704c5a76353bce27284.tar.bz2 |
ALSA: usb-audio: Pre-calculate buffer byte size
There are a bunch of lines calculating the buffer size in bytes at
each time. Keep the value in subs->buffer_bytes and use it
consistently for the code simplicity.
Link: https://lore.kernel.org/r/20210601162457.4877-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.h')
-rw-r--r-- | sound/usb/card.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h index a741e7da83a2..b346653d4b76 100644 --- a/sound/usb/card.h +++ b/sound/usb/card.h @@ -158,6 +158,7 @@ struct snd_usb_substream { unsigned int running: 1; /* running status */ + unsigned int buffer_bytes; /* buffer size in bytes */ unsigned int hwptr_done; /* processed byte position in the buffer */ unsigned int transfer_done; /* processed frames since last period update */ unsigned int frame_limit; /* limits number of packets in URB */ |