Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: Intel: add support for TAS2563 amplifier

Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

Add support for TAS2563 amplifier on Intel platforms.

+121
+4
include/sound/soc-acpi-intel-ssp-common.h
··· 37 37 #define RT5682_ACPI_HID "10EC5682" 38 38 #define RT5682S_ACPI_HID "RTL5682" 39 39 40 + /* Texas Instruments */ 41 + #define TAS2563_ACPI_HID "TXNW2563" 42 + 40 43 enum snd_soc_acpi_intel_codec { 41 44 CODEC_NONE, 42 45 ··· 66 63 CODEC_RT1015P, 67 64 CODEC_RT1019P, 68 65 CODEC_RT1308, 66 + CODEC_TAS2563, 69 67 }; 70 68 71 69 enum snd_soc_acpi_intel_codec
+5
sound/soc/intel/boards/Kconfig
··· 41 41 config SND_SOC_INTEL_SOF_NUVOTON_COMMON 42 42 tristate 43 43 44 + config SND_SOC_INTEL_SOF_TI_COMMON 45 + tristate 46 + 44 47 config SND_SOC_INTEL_SOF_BOARD_HELPERS 45 48 select SND_SOC_ACPI_INTEL_MATCH 46 49 tristate ··· 330 327 select SND_SOC_RT5645 331 328 select SND_SOC_RT5682_I2C 332 329 select SND_SOC_RT5682S 330 + select SND_SOC_TAS2781_I2C 333 331 select SND_SOC_DMIC 334 332 select SND_SOC_INTEL_HDA_DSP_COMMON 335 333 select SND_SOC_INTEL_SOF_BOARD_HELPERS 336 334 select SND_SOC_INTEL_SOF_MAXIM_COMMON 337 335 select SND_SOC_INTEL_SOF_REALTEK_COMMON 336 + select SND_SOC_INTEL_SOF_TI_COMMON 338 337 select SND_SOC_ACPI_INTEL_MATCH 339 338 help 340 339 This adds support for ASoC machine driver for SOF platforms
+3
sound/soc/intel/boards/Makefile
··· 69 69 snd-soc-intel-sof-nuvoton-common-y += sof_nuvoton_common.o 70 70 obj-$(CONFIG_SND_SOC_INTEL_SOF_NUVOTON_COMMON) += snd-soc-intel-sof-nuvoton-common.o 71 71 72 + snd-soc-intel-sof-ti-common-y += sof_ti_common.o 73 + obj-$(CONFIG_SND_SOC_INTEL_SOF_TI_COMMON) += snd-soc-intel-sof-ti-common.o 74 + 72 75 snd-soc-intel-sof-board-helpers-y += sof_board_helpers.o 73 76 obj-$(CONFIG_SND_SOC_INTEL_SOF_BOARD_HELPERS) += snd-soc-intel-sof-board-helpers.o
+6
sound/soc/intel/boards/sof_rt5682.c
··· 27 27 #include "sof_board_helpers.h" 28 28 #include "sof_maxim_common.h" 29 29 #include "sof_realtek_common.h" 30 + #include "sof_ti_common.h" 30 31 31 32 /* Driver-specific board quirks: from bit 0 to 7 */ 32 33 #define SOF_RT5682_MCLK_EN BIT(0) ··· 621 620 ctx->amp_link->init = rt5650_spk_init; 622 621 ctx->amp_link->ops = &sof_rt5682_ops; 623 622 break; 623 + case CODEC_TAS2563: 624 + sof_tas2563_dai_link(ctx->amp_link); 625 + break; 624 626 default: 625 627 dev_err(dev, "invalid amp type %d\n", ctx->amp_type); 626 628 return -EINVAL; ··· 771 767 case CODEC_MAX98360A: 772 768 case CODEC_RT1019P: 773 769 case CODEC_RT5650: 770 + case CODEC_TAS2563: 774 771 case CODEC_NONE: 775 772 /* no codec conf required */ 776 773 break; ··· 939 934 MODULE_IMPORT_NS("SND_SOC_INTEL_SOF_BOARD_HELPERS"); 940 935 MODULE_IMPORT_NS("SND_SOC_INTEL_SOF_MAXIM_COMMON"); 941 936 MODULE_IMPORT_NS("SND_SOC_INTEL_SOF_REALTEK_COMMON"); 937 + MODULE_IMPORT_NS("SND_SOC_INTEL_SOF_TI_COMMON");
+76
sound/soc/intel/boards/sof_ti_common.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + // 3 + // Copyright(c) 2025 Intel Corporation 4 + #include <linux/module.h> 5 + #include <linux/string.h> 6 + #include <sound/pcm.h> 7 + #include <sound/pcm_params.h> 8 + #include <sound/soc.h> 9 + #include <sound/soc-acpi.h> 10 + #include <sound/soc-dai.h> 11 + #include <sound/soc-dapm.h> 12 + #include <sound/sof.h> 13 + #include <uapi/sound/asound.h> 14 + #include "../common/soc-intel-quirks.h" 15 + #include "sof_ti_common.h" 16 + 17 + /* 18 + * Texas Instruments TAS2563 just mount one device to manage multiple devices, 19 + * so the kcontrols, widgets and routes just keep one item, respectively. 20 + */ 21 + static const struct snd_kcontrol_new tas2563_spk_kcontrols[] = { 22 + SOC_DAPM_PIN_SWITCH("Spk"), 23 + }; 24 + 25 + static const struct snd_soc_dapm_widget tas2563_spk_dapm_widgets[] = { 26 + SND_SOC_DAPM_SPK("Spk", NULL), 27 + }; 28 + 29 + static const struct snd_soc_dapm_route tas2563_spk_dapm_routes[] = { 30 + { "Spk", NULL, "OUT" }, 31 + }; 32 + 33 + static struct snd_soc_dai_link_component tas2563_dai_link_components[] = { 34 + { 35 + .name = TAS2563_DEV0_NAME, 36 + .dai_name = TAS2563_CODEC_DAI, 37 + }, 38 + }; 39 + 40 + static int tas2563_init(struct snd_soc_pcm_runtime *rtd) 41 + { 42 + struct snd_soc_card *card = rtd->card; 43 + int ret; 44 + 45 + ret = snd_soc_dapm_new_controls(&card->dapm, tas2563_spk_dapm_widgets, 46 + ARRAY_SIZE(tas2563_spk_dapm_widgets)); 47 + if (ret) { 48 + dev_err(rtd->dev, "unable to add dapm widgets, ret %d\n", ret); 49 + return ret; 50 + } 51 + 52 + ret = snd_soc_add_card_controls(card, tas2563_spk_kcontrols, 53 + ARRAY_SIZE(tas2563_spk_kcontrols)); 54 + if (ret) { 55 + dev_err(rtd->dev, "unable to add controls, ret %d\n", ret); 56 + return ret; 57 + } 58 + 59 + ret = snd_soc_dapm_add_routes(&card->dapm, tas2563_spk_dapm_routes, 60 + ARRAY_SIZE(tas2563_spk_dapm_routes)); 61 + if (ret) 62 + dev_err(rtd->dev, "unable to add dapm routes, ret %d\n", ret); 63 + 64 + return ret; 65 + } 66 + 67 + void sof_tas2563_dai_link(struct snd_soc_dai_link *link) 68 + { 69 + link->codecs = tas2563_dai_link_components; 70 + link->num_codecs = ARRAY_SIZE(tas2563_dai_link_components); 71 + link->init = tas2563_init; 72 + } 73 + EXPORT_SYMBOL_NS(sof_tas2563_dai_link, "SND_SOC_INTEL_SOF_TI_COMMON"); 74 + 75 + MODULE_DESCRIPTION("ASoC Intel SOF Texas Instruments helpers"); 76 + MODULE_LICENSE("GPL");
+24
sound/soc/intel/boards/sof_ti_common.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + /* 3 + * Copyright(c) 2025 Intel Corporation. 4 + */ 5 + 6 + /* 7 + * This file defines data structures used in Machine Driver for Intel 8 + * platforms with Texas Instruments Codecs. 9 + */ 10 + #ifndef __SOF_TI_COMMON_H 11 + #define __SOF_TI_COMMON_H 12 + 13 + #include <sound/soc.h> 14 + #include <sound/soc-acpi-intel-ssp-common.h> 15 + 16 + /* 17 + * Texas Instruments TAS2563 18 + */ 19 + #define TAS2563_CODEC_DAI "tasdev_codec" 20 + #define TAS2563_DEV0_NAME "i2c-" TAS2563_ACPI_HID ":00" 21 + 22 + void sof_tas2563_dai_link(struct snd_soc_dai_link *link); 23 + 24 + #endif /* __SOF_TI_COMMON_H */
+3
sound/soc/intel/common/soc-acpi-intel-ssp-common.c
··· 65 65 CODEC_MAP_ENTRY("RT1019P", "rt1019", RT1019P_ACPI_HID, CODEC_RT1019P), 66 66 CODEC_MAP_ENTRY("RT1308", "rt1308", RT1308_ACPI_HID, CODEC_RT1308), 67 67 68 + /* Texas Instruments */ 69 + CODEC_MAP_ENTRY("TAS2563", "tas2563", TAS2563_ACPI_HID, CODEC_TAS2563), 70 + 68 71 /* 69 72 * Monolithic components 70 73 *