mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:37:35 +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
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