summaryrefslogtreecommitdiff
path: root/src/drivers/sof/chip.h
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2023-01-17 10:57:42 -0600
committerMatt DeVillier <matt.devillier@amd.corp-partner.google.com>2023-05-03 16:06:32 +0000
commit3a4ac3a85efe5d8c46d6d6173b737f0f98fc6845 (patch)
tree26d8b0b5fd163dda4ed818e69289ee69023eb238 /src/drivers/sof/chip.h
parentab05964b917403117b39068d5e03a617e9823158 (diff)
drivers/sof: Add new driver to generate ACPI _DSD table
Add a new chip driver for boards which use SOF (Sound Open Firmware) OS drivers, which will be attached to the HDAS device and generate entries in an ACPI _DSD table for the OS driver to use. This will allow the OS drivers to easily determine the correct topology for the speaker and jack amplifiers and correct microphone configuration. TEST=tested with rest of patch train Change-Id: Ie0431b2002287f35245cbf959828e931d7f375b2 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74813 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: CoolStar <coolstarorganization@gmail.com> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Diffstat (limited to 'src/drivers/sof/chip.h')
-rw-r--r--src/drivers/sof/chip.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/drivers/sof/chip.h b/src/drivers/sof/chip.h
new file mode 100644
index 0000000000..134c0deadc
--- /dev/null
+++ b/src/drivers/sof/chip.h
@@ -0,0 +1,43 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __DRIVERS_AUDIO_SOF_H__
+#define __DRIVERS_AUDIO_SOF_H__
+
+#include <acpi/acpi_device.h>
+#include <stdint.h>
+
+/* Speaker topology */
+enum _spkr_tplg {
+ max98373 = 1,
+ max98360a,
+ max98357a,
+ max98390,
+ rt1011,
+ rt1015,
+};
+
+/* Jack topology */
+enum _jack_tplg {
+ cs42l42 = 1,
+ da7219,
+ nau8825,
+ rt5682,
+};
+
+/* Mic topology */
+enum _mic_tplg {
+ _1ch = 1,
+ _2ch_pdm0,
+ _2ch_pdm1,
+ _4ch,
+};
+
+
+
+struct drivers_sof_config {
+ unsigned int spkr_tplg;
+ unsigned int jack_tplg;
+ unsigned int mic_tplg;
+};
+
+#endif /* __DRIVERS_AUDIO_SOF_H__ */