Skip to content

Commit

Permalink
ASoC: Intel: sof_rt5682: Add support for ptl_max98360a_rt5682
Browse files Browse the repository at this point in the history
This patch adds the driver data for rt5682 codec on SSP0 and
max98360a speaker amplifiers on SSP1 for PTL platform.

Signed-off-by: Dharageswari R <[email protected]>
  • Loading branch information
Dharageswari R authored and bardliao committed Sep 24, 2024
1 parent 29aca91 commit 49e31db
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sound/soc/intel/boards/sof_rt5682.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,14 @@ static const struct platform_device_id board_ids[] = {
/* SSP 0 and SSP 2 are used for HDMI IN */
SOF_SSP_MASK_HDMI_CAPTURE(0x5)),
},
{
.name = "ptl_rt5682_def",
.driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
SOF_SSP_PORT_CODEC(0) |
SOF_SSP_PORT_AMP(1) |
SOF_SSP_PORT_BT_OFFLOAD(2) |
SOF_BT_OFFLOAD_PRESENT),
},
{ }
};
MODULE_DEVICE_TABLE(platform, board_ids);
Expand Down
13 changes: 13 additions & 0 deletions sound/soc/intel/common/soc-acpi-intel-ptl-match.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,21 @@
#include <sound/soc-acpi.h>
#include <sound/soc-acpi-intel-match.h>
#include "soc-acpi-intel-sdw-mockup-match.h"
#include <sound/soc-acpi-intel-ssp-common.h>

static const struct snd_soc_acpi_codecs ptl_rt5682_rt5682s_hp = {
.num_codecs = 2,
.codecs = {RT5682_ACPI_HID, RT5682S_ACPI_HID},
};

struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_machines[] = {
{
.comp_ids = &ptl_rt5682_rt5682s_hp,
.drv_name = "ptl_rt5682_def",
.sof_tplg_filename = "sof-ptl", /* the tplg suffix is added at run time */
.tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
},
{},
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_ptl_machines);
Expand Down

0 comments on commit 49e31db

Please sign in to comment.