coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
alc1308.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 alc1308.c:

Go to the source code of this file.

Functions

static void soundwire_alc1308_fill_ssdt (const struct device *dev)
 
static const char * soundwire_alc1308_acpi_name (const struct device *dev)
 
static void soundwire_alc1308_enable (struct device *dev)
 

Variables

static struct soundwire_address alc1308_address
 
static struct soundwire_slave alc1308_slave
 
static struct soundwire_audio_mode alc1308_audio_mode
 
static struct soundwire_dpn alc1308_dp1
 
static const struct soundwire_codec alc1308_codec
 
static struct device_operations soundwire_alc1308_ops
 
struct chip_operations drivers_soundwire_alc1308_ops
 

Function Documentation

◆ soundwire_alc1308_acpi_name()

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

Definition at line 125 of file alc1308.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_alc1308_enable()

static void soundwire_alc1308_enable ( struct device dev)
static

Definition at line 143 of file alc1308.c.

◆ soundwire_alc1308_fill_ssdt()

Variable Documentation

◆ alc1308_address

struct soundwire_address alc1308_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_ALC1308
Definition: ids.h:24
@ MIPI_CLASS_NONE
Definition: soundwire.h:70
@ SOUNDWIRE_VERSION_1_1
Definition: soundwire.h:57

Definition at line 1 of file alc1308.c.

Referenced by soundwire_alc1308_fill_ssdt().

◆ alc1308_audio_mode

struct soundwire_audio_mode alc1308_audio_mode
static
Initial value:
= {
.bus_frequency_configs_count = 12,
.bus_frequency_configs = {
9600 * KHz, 4800 * KHz, 2400 * KHz, 1200 * KHz,
12000 * KHz, 6000 * KHz, 3000 * KHz, 1500 * KHz,
12288 * KHz, 6144 * KHz, 3072 * KHz, 1536 * KHz
},
.sampling_frequency_configs_count = 8,
.sampling_frequency_configs = {
16 * KHz,
22.05 * KHz,
24 * KHz,
32 * KHz,
44.1 * KHz,
48 * KHz,
88.2 * KHz,
96 * 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 alc1308.c.

◆ alc1308_codec

const struct soundwire_codec alc1308_codec
static
Initial value:
= {
.slave = &alc1308_slave,
.audio_mode = { &alc1308_audio_mode },
.dpn = {
{
.port = 1,
.sink = &alc1308_dp1
},
{
.port = 2,
.source = &alc1308_dp1
},
{
.port = 4,
.source = &alc1308_dp1
}
}
}
static struct soundwire_slave alc1308_slave
Definition: alc1308.c:21
static struct soundwire_dpn alc1308_dp1
Definition: alc1308.c:58
static struct soundwire_audio_mode alc1308_audio_mode
Definition: alc1308.c:35

Definition at line 1 of file alc1308.c.

Referenced by soundwire_alc1308_fill_ssdt().

◆ alc1308_dp1

struct soundwire_dpn alc1308_dp1
static
Initial value:
= {
.port_wordlength_configs_count = 1,
.port_wordlength_configs = { 32 },
.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 alc1308.c.

◆ alc1308_slave

struct soundwire_slave alc1308_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(2) | SOUNDWIRE_PORT(4),
.sink_port_list = SOUNDWIRE_PORT(1)
}
#define SOUNDWIRE_PORT(port)
Definition: soundwire.h:133

Definition at line 1 of file alc1308.c.

◆ drivers_soundwire_alc1308_ops

struct chip_operations drivers_soundwire_alc1308_ops
Initial value:
= {
}
static void soundwire_alc1308_enable(struct device *dev)
Definition: alc1308.c:143

Definition at line 143 of file alc1308.c.

◆ soundwire_alc1308_ops

struct device_operations soundwire_alc1308_ops
static
Initial value:
= {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.acpi_fill_ssdt = soundwire_alc1308_fill_ssdt,
}
static void soundwire_alc1308_fill_ssdt(const struct device *dev)
Definition: alc1308.c:97
static const char * soundwire_alc1308_acpi_name(const struct device *dev)
Definition: alc1308.c:125
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 125 of file alc1308.c.