-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ASoC/SOF/PCI/Intel: add PantherLake support
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Add initial support for the PantherLake platform, and initial ACPI configurations.
- Loading branch information
Showing
12 changed files
with
290 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
/* | ||
* soc-acpi-intel-ptl-match.c - tables and support for PTL ACPI enumeration. | ||
* | ||
* Copyright (c) 2024, Intel Corporation. | ||
* | ||
*/ | ||
|
||
#include <sound/soc-acpi.h> | ||
#include <sound/soc-acpi-intel-match.h> | ||
#include "soc-acpi-intel-sdw-mockup-match.h" | ||
|
||
struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_machines[] = { | ||
{}, | ||
}; | ||
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_ptl_machines); | ||
|
||
static const struct snd_soc_acpi_endpoint single_endpoint = { | ||
.num = 0, | ||
.aggregated = 0, | ||
.group_position = 0, | ||
.group_id = 0, | ||
}; | ||
|
||
/* | ||
* RT722 is a multi-function codec, three endpoints are created for | ||
* its headset, amp and dmic functions. | ||
*/ | ||
static const struct snd_soc_acpi_endpoint rt722_endpoints[] = { | ||
{ | ||
.num = 0, | ||
.aggregated = 0, | ||
.group_position = 0, | ||
.group_id = 0, | ||
}, | ||
{ | ||
.num = 1, | ||
.aggregated = 0, | ||
.group_position = 0, | ||
.group_id = 0, | ||
}, | ||
{ | ||
.num = 2, | ||
.aggregated = 0, | ||
.group_position = 0, | ||
.group_id = 0, | ||
}, | ||
}; | ||
|
||
static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = { | ||
{ | ||
.adr = 0x000030025D071101ull, | ||
.num_endpoints = 1, | ||
.endpoints = &single_endpoint, | ||
.name_prefix = "rt711" | ||
} | ||
}; | ||
|
||
static const struct snd_soc_acpi_adr_device rt722_0_single_adr[] = { | ||
{ | ||
.adr = 0x000030025d072201ull, | ||
.num_endpoints = ARRAY_SIZE(rt722_endpoints), | ||
.endpoints = rt722_endpoints, | ||
.name_prefix = "rt722" | ||
} | ||
}; | ||
|
||
static const struct snd_soc_acpi_adr_device rt722_3_single_adr[] = { | ||
{ | ||
.adr = 0x000330025d072201ull, | ||
.num_endpoints = ARRAY_SIZE(rt722_endpoints), | ||
.endpoints = rt722_endpoints, | ||
.name_prefix = "rt722" | ||
} | ||
}; | ||
|
||
static const struct snd_soc_acpi_link_adr ptl_rt722_only[] = { | ||
{ | ||
.mask = BIT(0), | ||
.num_adr = ARRAY_SIZE(rt722_0_single_adr), | ||
.adr_d = rt722_0_single_adr, | ||
}, | ||
{} | ||
}; | ||
|
||
static const struct snd_soc_acpi_link_adr ptl_rt722_l3[] = { | ||
{ | ||
.mask = BIT(3), | ||
.num_adr = ARRAY_SIZE(rt722_3_single_adr), | ||
.adr_d = rt722_3_single_adr, | ||
}, | ||
{} | ||
}; | ||
|
||
static const struct snd_soc_acpi_link_adr ptl_rvp[] = { | ||
{ | ||
.mask = BIT(0), | ||
.num_adr = ARRAY_SIZE(rt711_sdca_0_adr), | ||
.adr_d = rt711_sdca_0_adr, | ||
}, | ||
{} | ||
}; | ||
|
||
/* this table is used when there is no I2S codec present */ | ||
struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = { | ||
/* mockup tests need to be first */ | ||
{ | ||
.link_mask = GENMASK(3, 0), | ||
.links = sdw_mockup_headset_2amps_mic, | ||
.drv_name = "sof_sdw", | ||
.sof_tplg_filename = "sof-ptl-rt711-rt1308-rt715.tplg", | ||
}, | ||
{ | ||
.link_mask = BIT(0) | BIT(1) | BIT(3), | ||
.links = sdw_mockup_headset_1amp_mic, | ||
.drv_name = "sof_sdw", | ||
.sof_tplg_filename = "sof-ptl-rt711-rt1308-mono-rt715.tplg", | ||
}, | ||
{ | ||
.link_mask = GENMASK(2, 0), | ||
.links = sdw_mockup_mic_headset_1amp, | ||
.drv_name = "sof_sdw", | ||
.sof_tplg_filename = "sof-ptl-rt715-rt711-rt1308-mono.tplg", | ||
}, | ||
{ | ||
.link_mask = BIT(0), | ||
.links = ptl_rvp, | ||
.drv_name = "sof_sdw", | ||
.sof_tplg_filename = "sof-ptl-rt711.tplg", | ||
}, | ||
{ | ||
.link_mask = BIT(0), | ||
.links = ptl_rt722_only, | ||
.drv_name = "sof_sdw", | ||
.sof_tplg_filename = "sof-ptl-rt722.tplg", | ||
}, | ||
{ | ||
.link_mask = BIT(3), | ||
.links = ptl_rt722_l3, | ||
.drv_name = "sof_sdw", | ||
.sof_tplg_filename = "sof-ptl-rt722.tplg", | ||
}, | ||
{}, | ||
}; | ||
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_ptl_sdw_machines); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) | ||
// | ||
// This file is provided under a dual BSD/GPLv2 license. When using or | ||
// redistributing this file, you may do so under either license. | ||
// | ||
// Copyright(c) 2024 Intel Corporation. | ||
// | ||
|
||
#include <linux/module.h> | ||
#include <linux/pci.h> | ||
#include <sound/soc-acpi.h> | ||
#include <sound/soc-acpi-intel-match.h> | ||
#include <sound/sof.h> | ||
#include "../ops.h" | ||
#include "../sof-pci-dev.h" | ||
|
||
/* platform specific devices */ | ||
#include "hda.h" | ||
#include "mtl.h" | ||
|
||
static const struct sof_dev_desc ptl_desc = { | ||
.use_acpi_target_states = true, | ||
.machines = snd_soc_acpi_intel_ptl_machines, | ||
.alt_machines = snd_soc_acpi_intel_ptl_sdw_machines, | ||
.resindex_lpe_base = 0, | ||
.resindex_pcicfg_base = -1, | ||
.resindex_imr_base = -1, | ||
.irqindex_host_ipc = -1, | ||
.chip_info = &ptl_chip_info, | ||
.ipc_supported_mask = BIT(SOF_IPC_TYPE_4), | ||
.ipc_default = SOF_IPC_TYPE_4, | ||
.dspless_mode_supported = true, | ||
.default_fw_path = { | ||
[SOF_IPC_TYPE_4] = "intel/sof-ipc4/ptl", | ||
}, | ||
.default_lib_path = { | ||
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/ptl", | ||
}, | ||
.default_tplg_path = { | ||
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg", | ||
}, | ||
.default_fw_filename = { | ||
[SOF_IPC_TYPE_4] = "sof-ptl.ri", | ||
}, | ||
.nocodec_tplg_filename = "sof-ptl-nocodec.tplg", | ||
.ops = &sof_lnl_ops, | ||
.ops_init = sof_lnl_ops_init, | ||
}; | ||
|
||
/* PCI IDs */ | ||
static const struct pci_device_id sof_pci_ids[] = { | ||
{ PCI_DEVICE_DATA(INTEL, HDA_PTL, &ptl_desc) }, /* PTL */ | ||
{ 0, } | ||
}; | ||
MODULE_DEVICE_TABLE(pci, sof_pci_ids); | ||
|
||
/* pci_driver definition */ | ||
static struct pci_driver snd_sof_pci_intel_ptl_driver = { | ||
.name = "sof-audio-pci-intel-ptl", | ||
.id_table = sof_pci_ids, | ||
.probe = hda_pci_intel_probe, | ||
.remove = sof_pci_remove, | ||
.shutdown = sof_pci_shutdown, | ||
.driver = { | ||
.pm = &sof_pci_pm, | ||
}, | ||
}; | ||
module_pci_driver(snd_sof_pci_intel_ptl_driver); | ||
|
||
MODULE_LICENSE("Dual BSD/GPL"); | ||
MODULE_DESCRIPTION("SOF support for PantherLake platforms"); | ||
MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_GENERIC); | ||
MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON); | ||
MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_LNL); | ||
MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_MTL); | ||
MODULE_IMPORT_NS(SND_SOC_SOF_HDA_MLINK); | ||
MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV); |
Oops, something went wrong.