Re: [PATCH 1/2] hw/audio/hda-codec: fix multiplication overflow

2023-11-05 Thread Marc-André Lureau
On Sun, Nov 5, 2023 at 9:26 PM Volker Rümelin wrote: > > After a relatively short time, there is an multiplication overflow > when multiplying (now - buft_start) with hda_bytes_per_second(). > While the uptime now - buft_start only overflows after 2**63 ns > = 292.27 years, this happens hda_bytes_

[PATCH 1/2] hw/audio/hda-codec: fix multiplication overflow

2023-11-05 Thread Volker Rümelin
After a relatively short time, there is an multiplication overflow when multiplying (now - buft_start) with hda_bytes_per_second(). While the uptime now - buft_start only overflows after 2**63 ns = 292.27 years, this happens hda_bytes_per_second() times faster with the multiplication. At 44100 samp