mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 18:17:23 +00:00
Kernel/Audio: Ignore buffers with more than 4096 bytes of data in SB16
The SB16 card driver doesn't swallow more than 4096 bytes of data at once, so instead of asserting just return ENOSPC for now. To test this, either play normal sound or just this (very!) loud noise: dd if=/dev/random of=/dev/audio/0 bs=4096
This commit is contained in:
parent
bf8c93fe0a
commit
10178dc939
Notes:
sideshowbarker
2024-07-17 18:51:36 +09:00
Author: https://github.com/supercomputer7
Commit: 10178dc939
Pull-request: https://github.com/SerenityOS/serenity/pull/12445
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
1 changed files with 1 additions and 3 deletions
|
@ -252,9 +252,7 @@ ErrorOr<size_t> SB16::write(size_t channel_index, UserOrKernelBuffer const& data
|
|||
|
||||
dbgln_if(SB16_DEBUG, "SB16: Writing buffer of {} bytes", length);
|
||||
|
||||
VERIFY(length <= PAGE_SIZE);
|
||||
int const BLOCK_SIZE = 32 * 1024;
|
||||
if (length > BLOCK_SIZE) {
|
||||
if (length > PAGE_SIZE) {
|
||||
return ENOSPC;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue