···2727#include "sof_board_helpers.h"2828#include "sof_maxim_common.h"2929#include "sof_realtek_common.h"3030+#include "sof_ti_common.h"30313132/* Driver-specific board quirks: from bit 0 to 7 */3233#define SOF_RT5682_MCLK_EN BIT(0)···621620 ctx->amp_link->init = rt5650_spk_init;622621 ctx->amp_link->ops = &sof_rt5682_ops;623622 break;623623+ case CODEC_TAS2563:624624+ sof_tas2563_dai_link(ctx->amp_link);625625+ break;624626 default:625627 dev_err(dev, "invalid amp type %d\n", ctx->amp_type);626628 return -EINVAL;···771767 case CODEC_MAX98360A:772768 case CODEC_RT1019P:773769 case CODEC_RT5650:770770+ case CODEC_TAS2563:774771 case CODEC_NONE:775772 /* no codec conf required */776773 break;···939934MODULE_IMPORT_NS("SND_SOC_INTEL_SOF_BOARD_HELPERS");940935MODULE_IMPORT_NS("SND_SOC_INTEL_SOF_MAXIM_COMMON");941936MODULE_IMPORT_NS("SND_SOC_INTEL_SOF_REALTEK_COMMON");937937+MODULE_IMPORT_NS("SND_SOC_INTEL_SOF_TI_COMMON");
+76
sound/soc/intel/boards/sof_ti_common.c
···11+// SPDX-License-Identifier: GPL-2.0-only22+//33+// Copyright(c) 2025 Intel Corporation44+#include <linux/module.h>55+#include <linux/string.h>66+#include <sound/pcm.h>77+#include <sound/pcm_params.h>88+#include <sound/soc.h>99+#include <sound/soc-acpi.h>1010+#include <sound/soc-dai.h>1111+#include <sound/soc-dapm.h>1212+#include <sound/sof.h>1313+#include <uapi/sound/asound.h>1414+#include "../common/soc-intel-quirks.h"1515+#include "sof_ti_common.h"1616+1717+/*1818+ * Texas Instruments TAS2563 just mount one device to manage multiple devices,1919+ * so the kcontrols, widgets and routes just keep one item, respectively.2020+ */2121+static const struct snd_kcontrol_new tas2563_spk_kcontrols[] = {2222+ SOC_DAPM_PIN_SWITCH("Spk"),2323+};2424+2525+static const struct snd_soc_dapm_widget tas2563_spk_dapm_widgets[] = {2626+ SND_SOC_DAPM_SPK("Spk", NULL),2727+};2828+2929+static const struct snd_soc_dapm_route tas2563_spk_dapm_routes[] = {3030+ { "Spk", NULL, "OUT" },3131+};3232+3333+static struct snd_soc_dai_link_component tas2563_dai_link_components[] = {3434+ {3535+ .name = TAS2563_DEV0_NAME,3636+ .dai_name = TAS2563_CODEC_DAI,3737+ },3838+};3939+4040+static int tas2563_init(struct snd_soc_pcm_runtime *rtd)4141+{4242+ struct snd_soc_card *card = rtd->card;4343+ int ret;4444+4545+ ret = snd_soc_dapm_new_controls(&card->dapm, tas2563_spk_dapm_widgets,4646+ ARRAY_SIZE(tas2563_spk_dapm_widgets));4747+ if (ret) {4848+ dev_err(rtd->dev, "unable to add dapm widgets, ret %d\n", ret);4949+ return ret;5050+ }5151+5252+ ret = snd_soc_add_card_controls(card, tas2563_spk_kcontrols,5353+ ARRAY_SIZE(tas2563_spk_kcontrols));5454+ if (ret) {5555+ dev_err(rtd->dev, "unable to add controls, ret %d\n", ret);5656+ return ret;5757+ }5858+5959+ ret = snd_soc_dapm_add_routes(&card->dapm, tas2563_spk_dapm_routes,6060+ ARRAY_SIZE(tas2563_spk_dapm_routes));6161+ if (ret)6262+ dev_err(rtd->dev, "unable to add dapm routes, ret %d\n", ret);6363+6464+ return ret;6565+}6666+6767+void sof_tas2563_dai_link(struct snd_soc_dai_link *link)6868+{6969+ link->codecs = tas2563_dai_link_components;7070+ link->num_codecs = ARRAY_SIZE(tas2563_dai_link_components);7171+ link->init = tas2563_init;7272+}7373+EXPORT_SYMBOL_NS(sof_tas2563_dai_link, "SND_SOC_INTEL_SOF_TI_COMMON");7474+7575+MODULE_DESCRIPTION("ASoC Intel SOF Texas Instruments helpers");7676+MODULE_LICENSE("GPL");
+24
sound/soc/intel/boards/sof_ti_common.h
···11+/* SPDX-License-Identifier: GPL-2.0-only */22+/*33+ * Copyright(c) 2025 Intel Corporation.44+ */55+66+/*77+ * This file defines data structures used in Machine Driver for Intel88+ * platforms with Texas Instruments Codecs.99+ */1010+#ifndef __SOF_TI_COMMON_H1111+#define __SOF_TI_COMMON_H1212+1313+#include <sound/soc.h>1414+#include <sound/soc-acpi-intel-ssp-common.h>1515+1616+/*1717+ * Texas Instruments TAS25631818+ */1919+#define TAS2563_CODEC_DAI "tasdev_codec"2020+#define TAS2563_DEV0_NAME "i2c-" TAS2563_ACPI_HID ":00"2121+2222+void sof_tas2563_dai_link(struct snd_soc_dai_link *link);2323+2424+#endif /* __SOF_TI_COMMON_H */