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

Go to the source code of this file.

Functions

static void soundwire_max98373_fill_ssdt (const struct device *dev)
 
static const char * soundwire_max98373_acpi_name (const struct device *dev)
 
static void soundwire_max98373_enable (struct device *dev)
 

Variables

static struct soundwire_address max98373_address
 
static struct soundwire_slave max98373_slave
 
static struct soundwire_audio_mode max98373_audio_mode
 
static struct soundwire_dpn max98373_dp1
 
static struct soundwire_dpn max98373_dp3
 
static const struct soundwire_codec max98373_codec
 
static struct device_operations soundwire_max98373_ops
 
struct chip_operations drivers_soundwire_max98373_ops
 

Function Documentation

◆ soundwire_max98373_acpi_name()

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

Definition at line 139 of file max98373.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_max98373_enable()

static void soundwire_max98373_enable ( struct device dev)
static

Definition at line 157 of file max98373.c.

◆ soundwire_max98373_fill_ssdt()

Variable Documentation

◆ drivers_soundwire_max98373_ops

struct chip_operations drivers_soundwire_max98373_ops
Initial value:
= {
}
static void soundwire_max98373_enable(struct device *dev)
Definition: max98373.c:157

Definition at line 157 of file max98373.c.

◆ max98373_address

struct soundwire_address max98373_address
static
Initial value:
= {
.manufacturer_id = MIPI_MFG_ID_MAXIM,
.class = MIPI_CLASS_NONE
}
#define MIPI_MFG_ID_MAXIM
Definition: ids.h:26
#define MIPI_DEV_ID_MAXIM_MAX98373
Definition: ids.h:27
@ MIPI_CLASS_NONE
Definition: soundwire.h:70
@ SOUNDWIRE_VERSION_1_1
Definition: soundwire.h:57

Definition at line 1 of file max98373.c.

Referenced by soundwire_max98373_fill_ssdt().

◆ max98373_audio_mode

struct soundwire_audio_mode max98373_audio_mode
static
Initial value:
= {
.bus_frequency_configs_count = 27,
.bus_frequency_configs = {
7680 * KHz, 3840 * KHz, 1920 * KHz, 960 * KHz,
8400 * KHz, 4200 * KHz, 2100 * KHz, 1050 * KHz,
9600 * KHz, 4800 * KHz, 2400 * KHz, 1200 * KHz,
11289600, 5644800, 2822400, 1411200,
12000 * KHz, 6000 * KHz, 3000 * KHz, 1500 * KHz,
12288 * KHz, 6144 * KHz, 3072 * KHz, 1536 * KHz,
13000 * KHz, 6500 * KHz, 3250 * 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 max98373.c.

◆ max98373_codec

const struct soundwire_codec max98373_codec
static
Initial value:
= {
.slave = &max98373_slave,
.audio_mode = { &max98373_audio_mode },
.dpn = {
{
.port = 1,
.sink = &max98373_dp1
},
{
.port = 3,
.source = &max98373_dp3,
}
}
}
static struct soundwire_dpn max98373_dp3
Definition: max98373.c:78
static struct soundwire_dpn max98373_dp1
Definition: max98373.c:62
static struct soundwire_slave max98373_slave
Definition: max98373.c:21
static struct soundwire_audio_mode max98373_audio_mode
Definition: max98373.c:35

Definition at line 1 of file max98373.c.

Referenced by soundwire_max98373_fill_ssdt().

◆ max98373_dp1

struct soundwire_dpn max98373_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 max98373.c.

◆ max98373_dp3

struct soundwire_dpn max98373_dp3
static
Initial value:
= {
.port_wordlength_configs_count = 1,
.port_wordlength_configs = { 16 },
.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 }
}

Definition at line 1 of file max98373.c.

◆ max98373_slave

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

Definition at line 1 of file max98373.c.

◆ soundwire_max98373_ops

struct device_operations soundwire_max98373_ops
static
Initial value:
= {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.acpi_fill_ssdt = soundwire_max98373_fill_ssdt,
}
static const char * soundwire_max98373_acpi_name(const struct device *dev)
Definition: max98373.c:139
static void soundwire_max98373_fill_ssdt(const struct device *dev)
Definition: max98373.c:111
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 139 of file max98373.c.