coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
alc5682.c File Reference
#include <acpi/acpigen.h>
#include <acpi/acpi_device.h>
#include <acpi/acpi_soundwire.h>
#include <device/device.h>
#include <device/path.h>
#include <device/soundwire.h>
#include <mipi/ids.h>
#include <stdio.h>
#include "chip.h"
Include dependency graph for alc5682.c:

Go to the source code of this file.

Functions

static void soundwire_alc5682_fill_ssdt (const struct device *dev)
 
static const char * soundwire_alc5682_acpi_name (const struct device *dev)
 
static void soundwire_alc5682_enable (struct device *dev)
 

Variables

static struct soundwire_address alc5682_address
 
static struct soundwire_slave alc5682_slave
 
static struct soundwire_bra_mode alc5682_dp0_bra_mode
 
static struct soundwire_dp0 alc5682_dp0
 
static struct soundwire_audio_mode alc5682_audio_mode
 
static struct soundwire_dpn alc5682_dpn
 
static const struct soundwire_codec alc5682_codec
 
static struct device_operations soundwire_alc5682_ops
 
struct chip_operations drivers_soundwire_alc5682_ops
 

Function Documentation

◆ soundwire_alc5682_acpi_name()

static const char* soundwire_alc5682_acpi_name ( const struct device dev)
static

Definition at line 153 of file alc5682.c.

References device::chip_info, config, device_path::generic, generic_path::id, name, device::path, snprintf(), and generic_path::subid.

Here is the call graph for this function:

◆ soundwire_alc5682_enable()

static void soundwire_alc5682_enable ( struct device dev)
static

Definition at line 171 of file alc5682.c.

◆ soundwire_alc5682_fill_ssdt()

Variable Documentation

◆ alc5682_address

struct soundwire_address alc5682_address
static
Initial value:
= {
.manufacturer_id = MIPI_MFG_ID_REALTEK,
.class = MIPI_CLASS_NONE
}
#define MIPI_MFG_ID_REALTEK
Definition: ids.h:21
#define MIPI_DEV_ID_REALTEK_ALC5682
Definition: ids.h:22
@ MIPI_CLASS_NONE
Definition: soundwire.h:70
@ SOUNDWIRE_VERSION_1_1
Definition: soundwire.h:57

Definition at line 1 of file alc5682.c.

Referenced by soundwire_alc5682_fill_ssdt().

◆ alc5682_audio_mode

struct soundwire_audio_mode alc5682_audio_mode
static
Initial value:
= {
.bus_frequency_configs_count = 7,
.bus_frequency_configs = {
1000 * KHz,
2400 * KHz,
3000 * KHz,
4000 * KHz,
4800 * KHz,
9600 * KHz,
12000 * KHz,
},
.max_sampling_frequency = 192 * KHz,
.min_sampling_frequency = 8 * KHz,
.prepare_channel_behavior = CHANNEL_PREPARE_ANY_FREQUENCY
}
#define KHz
Definition: helpers.h:79
@ CHANNEL_PREPARE_ANY_FREQUENCY
Definition: soundwire.h:222

Definition at line 1 of file alc5682.c.

◆ alc5682_codec

const struct soundwire_codec alc5682_codec
static
Initial value:
= {
.slave = &alc5682_slave,
.dp0_bra_mode = { &alc5682_dp0_bra_mode },
.dp0 = &alc5682_dp0,
.audio_mode = { &alc5682_audio_mode },
.dpn = {
{
.port = 1,
.source = &alc5682_dpn,
.sink = &alc5682_dpn,
},
{
.port = 2,
.source = &alc5682_dpn,
.sink = &alc5682_dpn,
},
{
.port = 3,
.source = &alc5682_dpn,
.sink = &alc5682_dpn,
},
{
.port = 4,
.source = &alc5682_dpn,
.sink = &alc5682_dpn,
}
}
}
static struct soundwire_bra_mode alc5682_dp0_bra_mode
Definition: alc5682.c:37
static struct soundwire_slave alc5682_slave
Definition: alc5682.c:21
static struct soundwire_audio_mode alc5682_audio_mode
Definition: alc5682.c:63
static struct soundwire_dp0 alc5682_dp0
Definition: alc5682.c:52
static struct soundwire_dpn alc5682_dpn
Definition: alc5682.c:80

Definition at line 1 of file alc5682.c.

Referenced by soundwire_alc5682_fill_ssdt().

◆ alc5682_dp0

struct soundwire_dp0 alc5682_dp0
static
Initial value:
= {
.port_max_wordlength = 64,
.port_min_wordlength = 1,
.bra_imp_def_response_supported = false,
.simplified_channel_prepare_sm = true,
.imp_def_dp0_interrupts_supported = 0,
.imp_def_bpt_supported = true,
.bra_mode_count = 1,
.bra_mode_list = { 0 }
}

Definition at line 1 of file alc5682.c.

◆ alc5682_dp0_bra_mode

struct soundwire_bra_mode alc5682_dp0_bra_mode
static
Initial value:
= {
.bus_frequency_configs_count = 7,
.bus_frequency_configs = {
1000 * KHz,
2400 * KHz,
3000 * KHz,
4000 * KHz,
4800 * KHz,
9600 * KHz,
12000 * KHz,
},
.max_data_per_frame = 470,
.min_us_between_transactions = 0
}

Definition at line 1 of file alc5682.c.

◆ alc5682_dpn

struct soundwire_dpn alc5682_dpn
static
Initial value:
= {
.port_wordlength_configs_count = 3,
.port_wordlength_configs = { 16, 20, 24 },
.data_port_type = FULL_DATA_PORT,
.max_grouping_supported = BLOCK_GROUP_COUNT_1,
.simplified_channelprepare_sm = false,
.imp_def_dpn_interrupts_supported = 0,
.min_channel_number = 1,
.max_channel_number = 2,
.modes_supported = MODE_ISOCHRONOUS | MODE_TX_CONTROLLED |
.block_packing_mode = true,
.port_audio_mode_count = 1,
.port_audio_mode_list = { 0 }
}
@ BLOCK_GROUP_COUNT_1
Definition: soundwire.h:265
@ MODE_ISOCHRONOUS
Definition: soundwire.h:273
@ MODE_RX_CONTROLLED
Definition: soundwire.h:275
@ MODE_TX_CONTROLLED
Definition: soundwire.h:274
@ MODE_FULL_ASYNCHRONOUS
Definition: soundwire.h:276
@ FULL_DATA_PORT
Definition: soundwire.h:258

Definition at line 1 of file alc5682.c.

◆ alc5682_slave

struct soundwire_slave alc5682_slave
static
Initial value:
= {
.wake_up_unavailable = false,
.test_mode_supported = false,
.clock_stop_mode1_supported = true,
.simplified_clockstopprepare_sm_supported = true,
.clockstopprepare_hard_reset_behavior = false,
.highPHY_capable = false,
.paging_supported = false,
.bank_delay_supported = false,
.port15_read_behavior = false,
.source_port_list = SOUNDWIRE_PORT(1) | SOUNDWIRE_PORT(2) |
.sink_port_list = SOUNDWIRE_PORT(1) | SOUNDWIRE_PORT(2) |
}
#define SOUNDWIRE_PORT(port)
Definition: soundwire.h:133

Definition at line 1 of file alc5682.c.

◆ drivers_soundwire_alc5682_ops

struct chip_operations drivers_soundwire_alc5682_ops
Initial value:
= {
}
static void soundwire_alc5682_enable(struct device *dev)
Definition: alc5682.c:171

Definition at line 171 of file alc5682.c.

◆ soundwire_alc5682_ops

struct device_operations soundwire_alc5682_ops
static
Initial value:
= {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.acpi_fill_ssdt = soundwire_alc5682_fill_ssdt,
}
static void soundwire_alc5682_fill_ssdt(const struct device *dev)
Definition: alc5682.c:125
static const char * soundwire_alc5682_acpi_name(const struct device *dev)
Definition: alc5682.c:153
static void noop_read_resources(struct device *dev)
Standard device operations function pointers shims.
Definition: device.h:73
static void noop_set_resources(struct device *dev)
Definition: device.h:74

Definition at line 153 of file alc5682.c.