coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
hda_verb.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
console/console.h
>
4
#include <
device/azalia_device.h
>
5
#include <
option.h
>
6
#include <types.h>
7
8
#define AZALIA_CODEC_ALC256 0x10ec0256
9
#define AZALIA_CODEC_ALC269 0x10ec0269
10
11
static
const
u32
override_verb
[] = {
12
AZALIA_PIN_CFG
(0, 0x12, 0x411111f0),
13
};
14
15
static
void
disable_microphone
(
u8
*
base
)
16
{
17
azalia_program_verb_table
(
base
,
override_verb
,
ARRAY_SIZE
(
override_verb
));
18
}
19
20
void
mainboard_azalia_program_runtime_verbs
(
u8
*
base
,
u32
viddid)
21
{
22
if
(viddid ==
AZALIA_CODEC_ALC256
|| viddid ==
AZALIA_CODEC_ALC269
) {
23
printk
(
BIOS_DEBUG
,
"CMOS: viddid = %08x\n"
, viddid);
24
if
(
get_uint_option
(
"microphone"
, 1) == 0)
25
disable_microphone
(
base
);
26
}
27
}
azalia_program_verb_table
int azalia_program_verb_table(u8 *base, const u32 *verbs, u32 verb_size)
Definition:
azalia_device.c:213
azalia_device.h
AZALIA_PIN_CFG
#define AZALIA_PIN_CFG(codec, pin, val)
Definition:
azalia_device.h:134
ARRAY_SIZE
#define ARRAY_SIZE(a)
Definition:
helpers.h:12
printk
#define printk(level,...)
Definition:
stdlib.h:16
console.h
BIOS_DEBUG
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
Definition:
loglevel.h:128
mainboard_azalia_program_runtime_verbs
void mainboard_azalia_program_runtime_verbs(u8 *base, u32 viddid)
Definition:
hda_verb.c:160
disable_microphone
static void disable_microphone(u8 *base)
Definition:
hda_verb.c:15
AZALIA_CODEC_ALC269
#define AZALIA_CODEC_ALC269
Definition:
hda_verb.c:9
AZALIA_CODEC_ALC256
#define AZALIA_CODEC_ALC256
Definition:
hda_verb.c:8
override_verb
static const u32 override_verb[]
Definition:
hda_verb.c:11
get_uint_option
unsigned int get_uint_option(const char *name, const unsigned int fallback)
Definition:
option.c:116
option.h
base
uintptr_t base
Definition:
uart.c:17
u32
uint32_t u32
Definition:
stdint.h:51
u8
uint8_t u8
Definition:
stdint.h:45
src
mainboard
starlabs
labtop
hda_verb.c
Generated by
1.9.1