mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
Kernel: Add support for Intel HDA
This is an implementation that tries to follow the spec as closely as possible, and works with Qemu's Intel HDA and some bare metal HDA controllers out there. Compiling with `INTEL_HDA_DEBUG=on` will provide a lot of detailed information that could help us getting this to work on more bare metal controllers as well :^) Output format is limited to `i16` samples for now.
This commit is contained in:
parent
c530f74e2f
commit
dd8fa73da1
17 changed files with 2627 additions and 20 deletions
23
Kernel/Devices/Audio/IntelHDA/Format.h
Normal file
23
Kernel/Devices/Audio/IntelHDA/Format.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Jelle Raaijmakers <jelle@gmta.nl>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Error.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
namespace Kernel::Audio::IntelHDA {
|
||||
|
||||
struct FormatParameters {
|
||||
u32 sample_rate;
|
||||
u8 pcm_bits;
|
||||
u8 number_of_channels;
|
||||
};
|
||||
|
||||
ErrorOr<u16> encode_format(FormatParameters format);
|
||||
ErrorOr<FormatParameters> decode_format(u16 format);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue