AMD SOF based generic SoundWire machine driver
Subsystems (5)
Vijendar Mukunda
maintainercover AMD SOF based generic SoundWire machine driver
This patch series majorly consists of below changes.
- Rename structures, macros and codec helper names used in Intel SoundWire generic driver to make it generic.
- Move Intel SoundWire driver common structures, macros and codec helper functions to common placeholder so that it can be used by other platform machine driver.
- Refactor few SoundWire common codec helper functions.
- AMD SOF based generic SoundWire machine driver for ACP 6.3 variant.
This work started a couple of months ago to avoid duplication of code that wasn't really Intel-specific in the "sof_sdw" machine driver. The code went through multiple iterations, was tested for multiple weeks and a couple of build issues reported by the Intel kbuild bots were corrected.
This is the initial version of SoundWire machine driver for AMD platforms. Additional code refactoring will be done in the next step on the AMD side.
Vijendar Mukunda (31):
ASoC: intel: rename codec_info and dai_info structures names
ASoC: intel: rename soundwire common header macros
ASoC: intel: rename soundwire machine driver soc ops
ASoC: intel: rename soundwire codec helper functions
ASoC: intel: rename maxim codec macros
ASoC: intel: rename ignore_pch_dmic variable name
ASoC: intel/sdw-utils: move soundwire machine driver soc ops
ASoC: intel: move soundwire machine driver common structures
ASoC: intel/sdw_utils: move soundwire machine driver helper functions
ASoC: intel/sdw_utils: move dmic codec helper function
ASoC: intel/sdw_utils: move rtk dmic helper functions
ASoC: intel/sdw_utils: move rt712 sdca helper functions
ASoC: intel/sdw_utils: move rt722 sdca helper functions
ASoC: intel: split soundwire machine driver private data
ASoC: intel/sdw_utils: move rt5682 codec helper function
ASoC: intel/sdw_utils: move rtk jack common helper functions
ASoC: intel/sdw_utils: move rt700 and rt711 codec helper functions
ASoC: intel/sdw_utils: move rtk amp codec helper functions
ASoC: intel/sdw_utils: move cirrus soundwire codec helper functions
ASoC: intel/sdw_utils: move maxim codec helper functions
ASoC: intel/sdw_utils: move dai id common macros
ASoC: intel/sdw_utils: move soundwire dai type macros
ASoC: intel/sdw_utils: move soundwire codec_info_list structure
ASoC: intel/sdw_utils: move machine driver dai link helper functions
ASoC: sdw_utils: refactor sof_sdw_card_late_probe function
ASoC: intel/sdw_utils: refactor init_dai_link() and
init_simple_dai_link()
ASoC: soc-acpi: add pci revision id field in mach params structure
ASoC: amd: acp: add soundwire machines for acp6.3 based platform
ASoC: SOF: amd: add alternate machines for acp6.3 based platform
ASoC: SOF: amd: update mach params subsystem_rev variable
ASoC: amd/sdw_utils: add sof based soundwire generic machine driver
include/sound/soc-acpi.h | 2 +
include/sound/soc_sdw_utils.h | 216 ++++
sound/soc/Kconfig | 2 +
sound/soc/Makefile | 1 +
sound/soc/amd/acp/Kconfig | 22 +
sound/soc/amd/acp/Makefile | 4 +
sound/soc/amd/acp/acp-sdw-sof-mach.c | 742 +++++++++++
sound/soc/amd/acp/amd-acp63-acpi-match.c | 90 ++
sound/soc/amd/acp/soc_amd_sdw_common.h | 44 +
sound/soc/amd/mach-config.h | 1 +
sound/soc/intel/boards/Kconfig | 1 +
sound/soc/intel/boards/Makefile | 9 -
sound/soc/intel/boards/sof_sdw.c | 1142 ++---------------
sound/soc/intel/boards/sof_sdw_common.h | 166 +--
sound/soc/intel/boards/sof_sdw_hdmi.c | 14 +-
sound/soc/sdw_utils/Kconfig | 6 +
sound/soc/sdw_utils/Makefile | 11 +
.../soc_sdw_bridge_cs35l56.c} | 56 +-
.../soc_sdw_cs42l42.c} | 13 +-
.../soc_sdw_cs42l43.c} | 38 +-
.../soc_sdw_cs_amp.c} | 18 +-
.../soc_sdw_dmic.c} | 10 +-
.../soc_sdw_maxim.c} | 56 +-
.../soc_sdw_rt5682.c} | 12 +-
.../soc_sdw_rt700.c} | 12 +-
.../soc_sdw_rt711.c} | 38 +-
.../soc_sdw_rt712_sdca.c} | 10 +-
.../soc_sdw_rt722_sdca.c} | 10 +-
.../soc_sdw_rt_amp.c} | 32 +-
.../soc_sdw_rt_amp_coeff_tables.h} | 6 +-
.../soc_sdw_rt_dmic.c} | 11 +-
.../soc_sdw_rt_sdca_jack_common.c} | 40 +-
sound/soc/sdw_utils/soc_sdw_utils.c | 990 ++++++++++++++
sound/soc/sof/amd/Kconfig | 1 +
sound/soc/sof/amd/acp-common.c | 3 +
sound/soc/sof/amd/acp.c | 1 +
sound/soc/sof/amd/acp.h | 1 +
sound/soc/sof/amd/pci-acp63.c | 1 +
38 files changed, 2475 insertions(+), 1357 deletions(-)
create mode 100644 include/sound/soc_sdw_utils.h
create mode 100644 sound/soc/amd/acp/acp-sdw-sof-mach.c
create mode 100644 sound/soc/amd/acp/amd-acp63-acpi-match.c
create mode 100644 sound/soc/amd/acp/soc_amd_sdw_common.h
create mode 100644 sound/soc/sdw_utils/Kconfig
create mode 100644 sound/soc/sdw_utils/Makefile
rename sound/soc/{intel/boards/bridge_cs35l56.c => sdw_utils/soc_sdw_bridge_cs35l56.c} (63%)
rename sound/soc/{intel/boards/sof_sdw_cs42l42.c => sdw_utils/soc_sdw_cs42l42.c} (82%)
rename sound/soc/{intel/boards/sof_sdw_cs42l43.c => sdw_utils/soc_sdw_cs42l43.c} (73%)
rename sound/soc/{intel/boards/sof_sdw_cs_amp.c => sdw_utils/soc_sdw_cs_amp.c} (66%)
rename sound/soc/{intel/boards/sof_sdw_dmic.c => sdw_utils/soc_sdw_dmic.c} (71%)
rename sound/soc/{intel/boards/sof_sdw_maxim.c => sdw_utils/soc_sdw_maxim.c} (63%)
rename sound/soc/{intel/boards/sof_sdw_rt5682.c => sdw_utils/soc_sdw_rt5682.c} (82%)
rename sound/soc/{intel/boards/sof_sdw_rt700.c => sdw_utils/soc_sdw_rt700.c} (81%)
rename sound/soc/{intel/boards/sof_sdw_rt711.c => sdw_utils/soc_sdw_rt711.c} (70%)
rename sound/soc/{intel/boards/sof_sdw_rt712_sdca.c => sdw_utils/soc_sdw_rt712_sdca.c} (74%)
rename sound/soc/{intel/boards/sof_sdw_rt722_sdca.c => sdw_utils/soc_sdw_rt722_sdca.c} (68%)
rename sound/soc/{intel/boards/sof_sdw_rt_amp.c => sdw_utils/soc_sdw_rt_amp.c} (87%)
rename sound/soc/{intel/boards/sof_sdw_amp_coeff_tables.h => sdw_utils/soc_sdw_rt_amp_coeff_tables.h} (97%)
rename sound/soc/{intel/boards/sof_sdw_rt_dmic.c => sdw_utils/soc_sdw_rt_dmic.c} (70%)
rename sound/soc/{intel/boards/sof_sdw_rt_sdca_jack_common.c => sdw_utils/soc_sdw_rt_sdca_jack_common.c} (78%)
create mode 100644 sound/soc/sdw_utils/soc_sdw_utils.cSignature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 1/31 ASoC: intel: rename codec_info and dai_info structures names
To make it generic, rename structure 'sof_sdw_codec_info' as 'asoc_sdw_codec_info' and 'sof_sdw_dai_info' as 'asoc_sdw_dai_info'. These structures will be moved to common header file so that it can be used by other platform machine driver.
--- sound/soc/intel/boards/bridge_cs35l56.c | 2 +- sound/soc/intel/boards/sof_sdw.c | 26 +++++++++---------- sound/soc/intel/boards/sof_sdw_common.h | 24 ++++++++--------- sound/soc/intel/boards/sof_sdw_cs42l43.c | 2 +- sound/soc/intel/boards/sof_sdw_cs_amp.c | 2 +- sound/soc/intel/boards/sof_sdw_maxim.c | 2 +- sound/soc/intel/boards/sof_sdw_rt711.c | 2 +- sound/soc/intel/boards/sof_sdw_rt_amp.c | 2 +- .../boards/sof_sdw_rt_sdca_jack_common.c | 2 +- 9 files changed, 32 insertions(+), 32 deletions(-)
sound/soc/intel/boards/bridge_cs35l56.c +1 -1
@@ -127,7 +127,7 @@ int bridge_cs35l56_add_sidecar(struct snd_soc_card *card,int bridge_cs35l56_spk_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback) {if (sof_sdw_quirk &SOF_SIDECAR_AMPS )
sound/soc/intel/boards/sof_sdw.c +13 -13
@@ -731,7 +731,7 @@ static const struct snd_soc_ops sdw_ops = { .shutdown = sdw_shutdown, }; -static struct sof_sdw_codec_info codec_info_list[] = { +static struct asoc_sdw_codec_info codec_info_list[] = { { .part_id =0x700 , .dais = {
@@ -1220,7 +1220,7 @@ static struct sof_sdw_codec_info codec_info_list[] = { }, }; -static struct sof_sdw_codec_info *find_codec_info_part (const u64 adr) +static struct asoc_sdw_codec_info *find_codec_info_part (const u64 adr) {unsigned int part_id, sdw_version;int i;
@@ -1241,7 +1241,7 @@ static struct sof_sdw_codec_info *find_codec_info_part(const u64 adr) } -static struct sof_sdw_codec_info *find_codec_info_acpi (const u8 *acpi_id) +static struct asoc_sdw_codec_info *find_codec_info_acpi (const u8 *acpi_id) {int i;
@@ -1255,8 +1255,8 @@ static struct sof_sdw_codec_info *find_codec_info_acpi(const u8 *acpi_id)return NULL ; } -static struct sof_sdw_codec_info *find_codec_info_dai (const char *dai_name, -int *dai_index) +static struct asoc_sdw_codec_info *find_codec_info_dai (const char *dai_name, +int *dai_index) {int i, j;
@@ -1355,7 +1355,7 @@ static bool is_unique_device(const struct snd_soc_acpi_link_adr *adr_link, }static const char *get_codec_name (struct device *dev, -const struct sof_sdw_codec_info *codec_info, +const struct asoc_sdw_codec_info *codec_info,const struct snd_soc_acpi_link_adr *adr_link,int adr_index) {
@@ -1383,7 +1383,7 @@ static const char *get_codec_name(struct device *dev,static int sof_sdw_rtd_init (struct snd_soc_pcm_runtime *rtd) {struct snd_soc_card *card = rtd->card; -struct sof_sdw_codec_info *codec_info; +struct asoc_sdw_codec_info *codec_info;struct snd_soc_dai *dai;int dai_index;int ret;
@@ -1451,8 +1451,8 @@ struct sof_sdw_endpoint {const char *name_prefix;bool include_sidecar; -struct sof_sdw_codec_info *codec_info; -const struct sof_sdw_dai_info *dai_info; +struct asoc_sdw_codec_info *codec_info; +const struct asoc_sdw_dai_info *dai_info; };struct sof_sdw_dailink {
@@ -1529,7 +1529,7 @@ static int parse_sdw_endpoints(struct snd_soc_card *card,for (i =0 ; i < adr_link->num_adr; i++) {const struct snd_soc_acpi_adr_device *adr_dev = &adr_link->adr_d[i]; -struct sof_sdw_codec_info *codec_info; +struct asoc_sdw_codec_info *codec_info;const char *codec_name;if (!adr_dev->name_prefix) {
@@ -1563,7 +1563,7 @@ static int parse_sdw_endpoints(struct snd_soc_card *card,for (j =0 ; j < adr_dev->num_endpoints; j++) {const struct snd_soc_acpi_endpoint *adr_end; -const struct sof_sdw_dai_info *dai_info; +const struct asoc_sdw_dai_info *dai_info;struct sof_sdw_dailink *sof_dai;int stream;
@@ -1790,7 +1790,7 @@ static int create_sdw_dailinks(struct snd_soc_card *card,static int create_ssp_dailinks (struct snd_soc_card *card,struct snd_soc_dai_link **dai_links,int *be_id, -struct sof_sdw_codec_info *ssp_info, +struct asoc_sdw_codec_info *ssp_info,unsigned long ssp_mask) {struct device *dev = card->dev;
@@ -1914,7 +1914,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)struct mc_private *ctx =snd_soc_card_get_drvdata (card);struct snd_soc_acpi_mach_params *mach_params = &mach->mach_params;struct snd_soc_codec_conf *codec_conf; -struct sof_sdw_codec_info *ssp_info; +struct asoc_sdw_codec_info *ssp_info;struct sof_sdw_endpoint *sof_ends;struct sof_sdw_dailink *sof_dais;int num_devs =0 ;
sound/soc/intel/boards/sof_sdw_common.h +12 -12
@@ -79,9 +79,9 @@ enum {#define SOF_SDW_MAX_DAI_NUM 8 -struct sof_sdw_codec_info ; +struct asoc_sdw_codec_info ; -struct sof_sdw_dai_info { +struct asoc_sdw_dai_info {const bool direction[2 ];/* playback & capture support */ const char *dai_name;const int dai_type;
@@ -92,7 +92,7 @@ struct sof_sdw_dai_info {const int num_widgets;int (*init)(struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback);int (*exit)(struct snd_soc_card *card,struct snd_soc_dai_link *dai_link);int (*rtd_init)(struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);
@@ -100,7 +100,7 @@ struct sof_sdw_dai_info {unsigned long quirk; }; -struct sof_sdw_codec_info { +struct asoc_sdw_codec_info {const int part_id;const int version_id;const char *codec_name;
@@ -108,7 +108,7 @@ struct sof_sdw_codec_info {const u8 acpi_id[ACPI_ID_LEN ];const bool ignore_pch_dmic;const struct snd_soc_ops *ops; -struct sof_sdw_dai_info dais[SOF_SDW_MAX_DAI_NUM ]; +struct asoc_sdw_dai_info dais[SOF_SDW_MAX_DAI_NUM ];const int dai_num;int (*codec_card_late_probe)(struct snd_soc_card *card);
@@ -153,14 +153,14 @@ int sof_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd);/* RT711 support */ int sof_sdw_rt711_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback);int sof_sdw_rt711_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link);/* RT711-SDCA support */ int sof_sdw_rt_sdca_jack_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback);int sof_sdw_rt_sdca_jack_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link);
@@ -170,20 +170,20 @@ extern const struct snd_soc_ops sof_sdw_rt1308_i2s_ops;/* generic amp support */ int sof_sdw_rt_amp_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback);int sof_sdw_rt_amp_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link);/* MAXIM codec support */ int sof_sdw_maxim_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback);/* CS42L43 support */ int sof_sdw_cs42l43_spk_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback);/* CS AMP support */
@@ -194,12 +194,12 @@ int bridge_cs35l56_add_sidecar(struct snd_soc_card *card, struct snd_soc_codec_conf **codec_conf);int bridge_cs35l56_spk_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback);int sof_sdw_cs_amp_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback);/* dai_link init callbacks */
sound/soc/intel/boards/sof_sdw_cs42l43.c +1 -1
@@ -123,7 +123,7 @@ int cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *daint sof_sdw_cs42l43_spk_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback) {/* Do init on playback link only. */
sound/soc/intel/boards/sof_sdw_cs_amp.c +1 -1
@@ -47,7 +47,7 @@ int cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai)int sof_sdw_cs_amp_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback) {/* Do init on playback link only. */
sound/soc/intel/boards/sof_sdw_maxim.c +1 -1
@@ -120,7 +120,7 @@ static int mx8373_sdw_late_probe(struct snd_soc_card *card)int sof_sdw_maxim_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback) { info->amp_num++;
sound/soc/intel/boards/sof_sdw_rt711.c +1 -1
@@ -126,7 +126,7 @@ int sof_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_lint sof_sdw_rt711_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback) {struct mc_private *ctx =snd_soc_card_get_drvdata (card);
sound/soc/intel/boards/sof_sdw_rt_amp.c +1 -1
@@ -256,7 +256,7 @@ int sof_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_int sof_sdw_rt_amp_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback) {struct mc_private *ctx =snd_soc_card_get_drvdata (card);
sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c +1 -1
@@ -180,7 +180,7 @@ int sof_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_linkint sof_sdw_rt_sdca_jack_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links, -struct sof_sdw_codec_info *info, +struct asoc_sdw_codec_info *info,bool playback) {struct mc_private *ctx =snd_soc_card_get_drvdata (card);
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 2/31 ASoC: intel: rename soundwire common header macros
In reply to Vijendar MukundaRename sof quirk macros, dai type and dai link macros with "SOC_SDW" tag.
--- sound/soc/intel/boards/bridge_cs35l56.c | 6 +- sound/soc/intel/boards/sof_sdw.c | 184 +++++++++--------- sound/soc/intel/boards/sof_sdw_common.h | 46 ++--- sound/soc/intel/boards/sof_sdw_cs42l43.c | 2 +- sound/soc/intel/boards/sof_sdw_rt711.c | 6 +- .../boards/sof_sdw_rt_sdca_jack_common.c | 8 +- 6 files changed, 126 insertions(+), 126 deletions(-)
sound/soc/intel/boards/bridge_cs35l56.c +3 -3
@@ -98,7 +98,7 @@ static const struct snd_soc_dai_link bridge_dai_template = {int bridge_cs35l56_count_sidecar (struct snd_soc_card *card,int *num_dais,int *num_devs) { -if (sof_sdw_quirk &SOF_SIDECAR_AMPS ) { +if (sof_sdw_quirk &SOC_SDW_SIDECAR_AMPS ) { (*num_dais)++; (*num_devs) +=ARRAY_SIZE (bridge_cs35l56_name_prefixes); }
@@ -110,7 +110,7 @@ int bridge_cs35l56_add_sidecar(struct snd_soc_card *card, struct snd_soc_dai_link **dai_links, struct snd_soc_codec_conf **codec_conf) { -if (sof_sdw_quirk &SOF_SIDECAR_AMPS ) { +if (sof_sdw_quirk &SOC_SDW_SIDECAR_AMPS ) { **dai_links = bridge_dai_template;for (int i =0 ; i <ARRAY_SIZE (bridge_cs35l56_name_prefixes); i++) {
@@ -130,7 +130,7 @@ int bridge_cs35l56_spk_init(struct snd_soc_card *card, struct asoc_sdw_codec_info *info, bool playback) { -if (sof_sdw_quirk &SOF_SIDECAR_AMPS ) +if (sof_sdw_quirk &SOC_SDW_SIDECAR_AMPS ) info->amp_num +=ARRAY_SIZE (bridge_cs35l56_name_prefixes);return 0 ;
sound/soc/intel/boards/sof_sdw.c +92 -92
489 lines not on this page · raw message
sound/soc/intel/boards/sof_sdw_common.h +23 -23
84 lines not on this page · raw message
sound/soc/intel/boards/sof_sdw_cs42l43.c +1 -1
@@ -104,7 +104,7 @@ int cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dastruct snd_soc_card *card = rtd->card;int ret; -if (!(sof_sdw_quirk &SOF_SIDECAR_AMPS )) { +if (!(sof_sdw_quirk &SOC_SDW_SIDECAR_AMPS )) {/* Will be set by the bridge code in this case */ card->components = devm_kasprintf(card->dev, GFP_KERNEL, "%s spk:cs42l43-spk",
sound/soc/intel/boards/sof_sdw_rt711.c +3 -3
@@ -23,13 +23,13 @@*/ static int rt711_add_codec_device_props (struct device *sdw_dev) { -struct property_entry props[MAX_NO_PROPS ] = {}; +struct property_entry props[SOC_SDW_MAX_NO_PROPS ] = {};struct fwnode_handle *fwnode;int ret; -if (!SOF_JACK_JDSRC (sof_sdw_quirk)) +if (!SOC_SDW_JACK_JDSRC (sof_sdw_quirk))return 0 ; - props[0 ] =PROPERTY_ENTRY_U32 ("realtek,jd-src" ,SOF_JACK_JDSRC (sof_sdw_quirk)); + props[0 ] =PROPERTY_ENTRY_U32 ("realtek,jd-src" ,SOC_SDW_JACK_JDSRC (sof_sdw_quirk)); fwnode =fwnode_create_software_node (props,NULL );if (IS_ERR (fwnode))
sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c +4 -4
@@ -23,14 +23,14 @@*/ static int rt_sdca_jack_add_codec_device_props (struct device *sdw_dev) { -struct property_entry props[MAX_NO_PROPS ] = {}; +struct property_entry props[SOC_SDW_MAX_NO_PROPS ] = {};struct fwnode_handle *fwnode;int ret; -if (!SOF_JACK_JDSRC (sof_sdw_quirk)) +if (!SOC_SDW_JACK_JDSRC (sof_sdw_quirk))return 0 ; - props[0 ] =PROPERTY_ENTRY_U32 ("realtek,jd-src" ,SOF_JACK_JDSRC (sof_sdw_quirk)); + props[0 ] =PROPERTY_ENTRY_U32 ("realtek,jd-src" ,SOC_SDW_JACK_JDSRC (sof_sdw_quirk)); fwnode =fwnode_create_software_node (props,NULL );if (IS_ERR (fwnode))
@@ -168,7 +168,7 @@ int sof_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_linkif (!ctx->headset_codec_dev)return 0 ; -if (!SOF_JACK_JDSRC (sof_sdw_quirk)) +if (!SOC_SDW_JACK_JDSRC (sof_sdw_quirk))return 0 ;device_remove_software_node (ctx->headset_codec_dev);
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 3/31 ASoC: intel: rename soundwire machine driver soc ops
In reply to Vijendar MukundaRename Soundwire generic machine driver soc ops with tag "asoc".
--- sound/soc/intel/boards/sof_sdw.c | 26 ++++++++++++------------- sound/soc/intel/boards/sof_sdw_common.h | 14 ++++++------- sound/soc/intel/boards/sof_sdw_maxim.c | 12 ++++++------ 3 files changed, 26 insertions(+), 26 deletions(-)
sound/soc/intel/boards/sof_sdw.c +13 -13
@@ -594,12 +594,12 @@ static const struct snd_kcontrol_new rt700_controls[] = { };/* these wrappers are only needed to avoid typecast compilation errors */ -int sdw_startup (struct snd_pcm_substream *substream) +int asoc_sdw_startup (struct snd_pcm_substream *substream) {return sdw_startup_stream (substream); } -int sdw_prepare (struct snd_pcm_substream *substream) +int asoc_sdw_prepare (struct snd_pcm_substream *substream) {struct snd_soc_pcm_runtime *rtd =snd_soc_substream_to_rtd (substream);struct sdw_stream_runtime *sdw_stream;
@@ -617,7 +617,7 @@ int sdw_prepare(struct snd_pcm_substream *substream)return sdw_prepare_stream (sdw_stream); } -int sdw_trigger (struct snd_pcm_substream *substream,int cmd) +int asoc_sdw_trigger (struct snd_pcm_substream *substream,int cmd) {struct snd_soc_pcm_runtime *rtd =snd_soc_substream_to_rtd (substream);struct sdw_stream_runtime *sdw_stream;
@@ -656,8 +656,8 @@ int sdw_trigger(struct snd_pcm_substream *substream, int cmd)return ret; } -int sdw_hw_params (struct snd_pcm_substream *substream, -struct snd_pcm_hw_params *params) +int asoc_sdw_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params) {struct snd_soc_pcm_runtime *rtd =snd_soc_substream_to_rtd (substream);struct snd_soc_dai_link_ch_map *ch_maps;
@@ -699,7 +699,7 @@ int sdw_hw_params(struct snd_pcm_substream *substream,return 0 ; } -int sdw_hw_free (struct snd_pcm_substream *substream) +int asoc_sdw_hw_free (struct snd_pcm_substream *substream) {struct snd_soc_pcm_runtime *rtd =snd_soc_substream_to_rtd (substream);struct sdw_stream_runtime *sdw_stream;
@@ -717,18 +717,18 @@ int sdw_hw_free(struct snd_pcm_substream *substream)return sdw_deprepare_stream (sdw_stream); } -void sdw_shutdown (struct snd_pcm_substream *substream) +void asoc_sdw_shutdown (struct snd_pcm_substream *substream) {sdw_shutdown_stream (substream); }static const struct snd_soc_ops sdw_ops = { - .startup = sdw_startup, - .prepare = sdw_prepare, - .trigger = sdw_trigger, - .hw_params = sdw_hw_params, - .hw_free = sdw_hw_free, - .shutdown = sdw_shutdown, + .startup = asoc_sdw_startup, + .prepare = asoc_sdw_prepare, + .trigger = asoc_sdw_trigger, + .hw_params = asoc_sdw_hw_params, + .hw_free = asoc_sdw_hw_free, + .shutdown = asoc_sdw_shutdown, };static struct asoc_sdw_codec_info codec_info_list[] = {
sound/soc/intel/boards/sof_sdw_common.h +7 -7
@@ -134,13 +134,13 @@ struct mc_private {extern unsigned long sof_sdw_quirk; -int sdw_startup (struct snd_pcm_substream *substream); -int sdw_prepare (struct snd_pcm_substream *substream); -int sdw_trigger (struct snd_pcm_substream *substream,int cmd); -int sdw_hw_params (struct snd_pcm_substream *substream, -struct snd_pcm_hw_params *params); -int sdw_hw_free (struct snd_pcm_substream *substream); -void sdw_shutdown (struct snd_pcm_substream *substream); +int asoc_sdw_startup (struct snd_pcm_substream *substream); +int asoc_sdw_prepare (struct snd_pcm_substream *substream); +int asoc_sdw_trigger (struct snd_pcm_substream *substream,int cmd); +int asoc_sdw_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params); +int asoc_sdw_hw_free (struct snd_pcm_substream *substream); +void asoc_sdw_shutdown (struct snd_pcm_substream *substream);/* generic HDMI support */ int sof_sdw_hdmi_init (struct snd_soc_pcm_runtime *rtd);
sound/soc/intel/boards/sof_sdw_maxim.c +6 -6
@@ -80,7 +80,7 @@ static int mx8373_sdw_prepare(struct snd_pcm_substream *substream)int ret;/* according to soc_pcm_prepare dai link prepare is called first */ - ret =sdw_prepare (substream); + ret =asoc_sdw_prepare (substream);if (ret <0 )return ret;
@@ -92,7 +92,7 @@ static int mx8373_sdw_hw_free(struct snd_pcm_substream *substream)int ret;/* according to soc_pcm_hw_free dai link free is called first */ - ret =sdw_hw_free (substream); + ret =asoc_sdw_hw_free (substream);if (ret <0 )return ret;
@@ -100,12 +100,12 @@ static int mx8373_sdw_hw_free(struct snd_pcm_substream *substream) }static const struct snd_soc_ops max_98373_sdw_ops = { - .startup = sdw_startup, + .startup = asoc_sdw_startup, .prepare = mx8373_sdw_prepare, - .trigger = sdw_trigger, - .hw_params = sdw_hw_params, + .trigger = asoc_sdw_trigger, + .hw_params = asoc_sdw_hw_params, .hw_free = mx8373_sdw_hw_free, - .shutdown = sdw_shutdown, + .shutdown = asoc_sdw_shutdown, };static int mx8373_sdw_late_probe (struct snd_soc_card *card)
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 4/31 ASoC: intel: rename soundwire codec helper functions
In reply to Vijendar MukundaRename SoundWire codec helper functions with "asoc_sdw" tag.
--- sound/soc/intel/boards/bridge_cs35l56.c | 18 +- sound/soc/intel/boards/sof_sdw.c | 154 +++++++++--------- sound/soc/intel/boards/sof_sdw_common.h | 104 ++++++------ sound/soc/intel/boards/sof_sdw_cs42l42.c | 2 +- sound/soc/intel/boards/sof_sdw_cs42l43.c | 16 +- sound/soc/intel/boards/sof_sdw_cs_amp.c | 10 +- sound/soc/intel/boards/sof_sdw_dmic.c | 2 +- sound/soc/intel/boards/sof_sdw_maxim.c | 22 +-- sound/soc/intel/boards/sof_sdw_rt5682.c | 2 +- sound/soc/intel/boards/sof_sdw_rt700.c | 2 +- sound/soc/intel/boards/sof_sdw_rt711.c | 12 +- sound/soc/intel/boards/sof_sdw_rt712_sdca.c | 2 +- sound/soc/intel/boards/sof_sdw_rt722_sdca.c | 2 +- sound/soc/intel/boards/sof_sdw_rt_amp.c | 14 +- sound/soc/intel/boards/sof_sdw_rt_dmic.c | 2 +- .../boards/sof_sdw_rt_sdca_jack_common.c | 12 +- 16 files changed, 188 insertions(+), 188 deletions(-)
sound/soc/intel/boards/bridge_cs35l56.c +9 -9
@@ -95,8 +95,8 @@ static const struct snd_soc_dai_link bridge_dai_template = { SND_SOC_DAILINK_REG(bridge_dai), }; -int bridge_cs35l56_count_sidecar (struct snd_soc_card *card, -int *num_dais,int *num_devs) +int asoc_sdw_bridge_cs35l56_count_sidecar (struct snd_soc_card *card, +int *num_dais,int *num_devs) {if (sof_sdw_quirk &SOC_SDW_SIDECAR_AMPS ) { (*num_dais)++;
@@ -106,9 +106,9 @@ int bridge_cs35l56_count_sidecar(struct snd_soc_card *card,return 0 ; } -int bridge_cs35l56_add_sidecar (struct snd_soc_card *card, -struct snd_soc_dai_link **dai_links, -struct snd_soc_codec_conf **codec_conf) +int asoc_sdw_bridge_cs35l56_add_sidecar (struct snd_soc_card *card, +struct snd_soc_dai_link **dai_links, +struct snd_soc_codec_conf **codec_conf) {if (sof_sdw_quirk &SOC_SDW_SIDECAR_AMPS ) { **dai_links = bridge_dai_template;
@@ -125,10 +125,10 @@ int bridge_cs35l56_add_sidecar(struct snd_soc_card *card,return 0 ; } -int bridge_cs35l56_spk_init (struct snd_soc_card *card, -struct snd_soc_dai_link *dai_links, -struct asoc_sdw_codec_info *info, -bool playback) +int asoc_sdw_bridge_cs35l56_spk_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback) {if (sof_sdw_quirk &SOC_SDW_SIDECAR_AMPS ) info->amp_num +=ARRAY_SIZE (bridge_cs35l56_name_prefixes);
sound/soc/intel/boards/sof_sdw.c +77 -77
405 lines not on this page · raw message
sound/soc/intel/boards/sof_sdw_common.h +52 -52
127 lines not on this page · raw message
sound/soc/intel/boards/sof_sdw_cs42l42.c +1 -1
@@ -36,7 +36,7 @@ static struct snd_soc_jack_pin cs42l42_jack_pins[] = { }, }; -int cs42l42_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) +int asoc_sdw_cs42l42_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card;struct mc_private *ctx =snd_soc_card_get_drvdata (card);
sound/soc/intel/boards/sof_sdw_cs42l43.c +8 -8
@@ -48,7 +48,7 @@ static struct snd_soc_jack_pin sof_jack_pins[] = { }, }; -int cs42l43_hs_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) +int asoc_sdw_cs42l43_hs_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_component *component =snd_soc_rtd_to_codec (rtd,0 )->component;struct mc_private *ctx =snd_soc_card_get_drvdata (rtd->card);
@@ -99,7 +99,7 @@ int cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *daireturn ret; } -int cs42l43_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) +int asoc_sdw_cs42l43_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card;int ret;
@@ -121,10 +121,10 @@ int cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dareturn ret; } -int sof_sdw_cs42l43_spk_init (struct snd_soc_card *card, -struct snd_soc_dai_link *dai_links, -struct asoc_sdw_codec_info *info, -bool playback) +int asoc_sdw_cs42l43_spk_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback) {/* Do init on playback link only. */ if (!playback)
@@ -132,10 +132,10 @@ int sof_sdw_cs42l43_spk_init(struct snd_soc_card *card, info->amp_num++; -return bridge_cs35l56_spk_init (card, dai_links, info, playback); +return asoc_sdw_bridge_cs35l56_spk_init (card, dai_links, info, playback); } -int cs42l43_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) +int asoc_sdw_cs42l43_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card;int ret;
sound/soc/intel/boards/sof_sdw_cs_amp.c +5 -5
@@ -14,7 +14,7 @@#define CODEC_NAME_SIZE 8 -int cs_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) +int asoc_sdw_cs_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {const char *dai_name = rtd->dai_link->codecs->dai_name;struct snd_soc_card *card = rtd->card;
@@ -45,10 +45,10 @@ int cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai)return 0 ; } -int sof_sdw_cs_amp_init (struct snd_soc_card *card, -struct snd_soc_dai_link *dai_links, -struct asoc_sdw_codec_info *info, -bool playback) +int asoc_sdw_cs_amp_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback) {/* Do init on playback link only. */ if (!playback)
sound/soc/intel/boards/sof_sdw_dmic.c +1 -1
@@ -19,7 +19,7 @@ static const struct snd_soc_dapm_route dmic_map[] = { {"DMic", NULL, "SoC DMIC"}, }; -int sof_sdw_dmic_init (struct snd_soc_pcm_runtime *rtd) +int asoc_sdw_dmic_init (struct snd_soc_pcm_runtime *rtd) {struct snd_soc_card *card = rtd->card;int ret;
sound/soc/intel/boards/sof_sdw_maxim.c +11 -11
@@ -21,7 +21,7 @@ static const struct snd_soc_dapm_route max_98373_dapm_routes[] = { { "Right Spk", NULL, "Right BE_OUT" }, }; -int maxim_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) +int asoc_sdw_maxim_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card;int ret;
@@ -75,7 +75,7 @@ static int mx8373_enable_spk_pin(struct snd_pcm_substream *substream, bool enablreturn 0 ; } -static int mx8373_sdw_prepare (struct snd_pcm_substream *substream) +static int asoc_sdw_mx8373_prepare (struct snd_pcm_substream *substream) {int ret;
@@ -87,7 +87,7 @@ static int mx8373_sdw_prepare(struct snd_pcm_substream *substream)return mx8373_enable_spk_pin (substream, true); } -static int mx8373_sdw_hw_free (struct snd_pcm_substream *substream) +static int asoc_sdw_mx8373_hw_free (struct snd_pcm_substream *substream) {int ret;
@@ -101,14 +101,14 @@ static int mx8373_sdw_hw_free(struct snd_pcm_substream *substream)static const struct snd_soc_ops max_98373_sdw_ops = { .startup = asoc_sdw_startup, - .prepare = mx8373_sdw_prepare, + .prepare = asoc_sdw_mx8373_prepare, .trigger = asoc_sdw_trigger, .hw_params = asoc_sdw_hw_params, - .hw_free = mx8373_sdw_hw_free, + .hw_free = asoc_sdw_mx8373_hw_free, .shutdown = asoc_sdw_shutdown, }; -static int mx8373_sdw_late_probe (struct snd_soc_card *card) +static int asoc_sdw_mx8373_sdw_late_probe (struct snd_soc_card *card) {struct snd_soc_dapm_context *dapm = &card->dapm;
@@ -118,10 +118,10 @@ static int mx8373_sdw_late_probe(struct snd_soc_card *card)return snd_soc_dapm_sync (dapm); } -int sof_sdw_maxim_init (struct snd_soc_card *card, -struct snd_soc_dai_link *dai_links, -struct asoc_sdw_codec_info *info, -bool playback) +int asoc_sdw_maxim_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback) { info->amp_num++;
@@ -133,7 +133,7 @@ int sof_sdw_maxim_init(struct snd_soc_card *card,*/ break ;case SOF_SDW_PART_ID_MAX98373 : - info->codec_card_late_probe = mx8373_sdw_late_probe; + info->codec_card_late_probe = asoc_sdw_mx8373_sdw_late_probe; dai_links->ops = &max_98373_sdw_ops;break ;default :
sound/soc/intel/boards/sof_sdw_rt5682.c +1 -1
@@ -35,7 +35,7 @@ static struct snd_soc_jack_pin rt5682_jack_pins[] = { }, }; -int rt5682_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) +int asoc_sdw_rt5682_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card;struct mc_private *ctx =snd_soc_card_get_drvdata (card);
sound/soc/intel/boards/sof_sdw_rt700.c +1 -1
@@ -33,7 +33,7 @@ static struct snd_soc_jack_pin rt700_jack_pins[] = { }, }; -int rt700_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) +int asoc_sdw_rt700_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card;struct mc_private *ctx =snd_soc_card_get_drvdata (card);
sound/soc/intel/boards/sof_sdw_rt711.c +6 -6
@@ -59,7 +59,7 @@ static struct snd_soc_jack_pin rt711_jack_pins[] = { }, }; -int rt711_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) +int asoc_sdw_rt711_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card;struct mc_private *ctx =snd_soc_card_get_drvdata (card);
@@ -111,7 +111,7 @@ int rt711_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai)return ret; } -int sof_sdw_rt711_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link) +int asoc_sdw_rt711_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link) {struct mc_private *ctx =snd_soc_card_get_drvdata (card);
@@ -124,10 +124,10 @@ int sof_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_lreturn 0 ; } -int sof_sdw_rt711_init (struct snd_soc_card *card, -struct snd_soc_dai_link *dai_links, -struct asoc_sdw_codec_info *info, -bool playback) +int asoc_sdw_rt711_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback) {struct mc_private *ctx =snd_soc_card_get_drvdata (card);struct device *sdw_dev;
sound/soc/intel/boards/sof_sdw_rt712_sdca.c +1 -1
@@ -26,7 +26,7 @@ static const struct snd_soc_dapm_route rt712_spk_map[] = { { "Speaker", NULL, "rt712 SPOR" }, }; -int rt712_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) +int asoc_sdw_rt712_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card;int ret;
sound/soc/intel/boards/sof_sdw_rt722_sdca.c +1 -1
@@ -19,7 +19,7 @@ static const struct snd_soc_dapm_route rt722_spk_map[] = { { "Speaker", NULL, "rt722 SPK" }, }; -int rt722_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) +int asoc_sdw_rt722_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card;int ret;
sound/soc/intel/boards/sof_sdw_rt_amp.c +7 -7
@@ -173,7 +173,7 @@ static const struct snd_soc_dapm_route *get_codec_name_and_route(struct snd_soc_return rt1318_map; } -int rt_amp_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) +int asoc_sdw_rt_amp_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card;const struct snd_soc_dapm_route *rt_amp_map;
@@ -233,11 +233,11 @@ static int rt1308_i2s_hw_params(struct snd_pcm_substream *substream, }/* machine stream operations */ -const struct snd_soc_ops sof_sdw_rt1308_i2s_ops = { +const struct snd_soc_ops soc_sdw_rt1308_i2s_ops = { .hw_params = rt1308_i2s_hw_params, }; -int sof_sdw_rt_amp_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link) +int asoc_sdw_rt_amp_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link) {struct mc_private *ctx =snd_soc_card_get_drvdata (card);
@@ -254,10 +254,10 @@ int sof_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_return 0 ; } -int sof_sdw_rt_amp_init (struct snd_soc_card *card, -struct snd_soc_dai_link *dai_links, -struct asoc_sdw_codec_info *info, -bool playback) +int asoc_sdw_rt_amp_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback) {struct mc_private *ctx =snd_soc_card_get_drvdata (card);struct device *sdw_dev1, *sdw_dev2;
sound/soc/intel/boards/sof_sdw_rt_dmic.c +1 -1
@@ -12,7 +12,7 @@#include "sof_board_helpers.h" #include "sof_sdw_common.h" -int rt_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) +int asoc_sdw_rt_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card;struct snd_soc_component *component;
sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c +6 -6
@@ -83,7 +83,7 @@ static const char * const need_sdca_suffix[] = { "rt711", "rt713" }; -int rt_sdca_jack_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) +int asoc_sdw_rt_sdca_jack_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card;struct mc_private *ctx =snd_soc_card_get_drvdata (card);
@@ -161,7 +161,7 @@ int rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dreturn ret; } -int sof_sdw_rt_sdca_jack_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link) +int asoc_sdw_rt_sdca_jack_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link) {struct mc_private *ctx =snd_soc_card_get_drvdata (card);
@@ -178,10 +178,10 @@ int sof_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_linkreturn 0 ; } -int sof_sdw_rt_sdca_jack_init (struct snd_soc_card *card, -struct snd_soc_dai_link *dai_links, -struct asoc_sdw_codec_info *info, -bool playback) +int asoc_sdw_rt_sdca_jack_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback) {struct mc_private *ctx =snd_soc_card_get_drvdata (card);struct device *sdw_dev;
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 5/31 ASoC: intel: rename maxim codec macros
In reply to Vijendar MukundaRename maxim codec part id macros.
--- sound/soc/intel/boards/sof_sdw_maxim.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/intel/boards/sof_sdw_maxim.c +4 -4
@@ -13,8 +13,8 @@#include "sof_sdw_common.h" static int maxim_part_id; -#define SOF_SDW_PART_ID_MAX98363 0x8363 -#define SOF_SDW_PART_ID_MAX98373 0x8373 +#define SOC_SDW_PART_ID_MAX98363 0x8363 +#define SOC_SDW_PART_ID_MAX98373 0x8373static const struct snd_soc_dapm_route max_98373_dapm_routes[] = { {"Left Spk" ,NULL ,"Left BE_OUT" },
@@ -127,12 +127,12 @@ int asoc_sdw_maxim_init(struct snd_soc_card *card, maxim_part_id = info->part_id;switch (maxim_part_id) { -case SOF_SDW_PART_ID_MAX98363 : +case SOC_SDW_PART_ID_MAX98363 :/* Default ops are set in function init_dai_link. * called as part of function create_sdw_dailink */ break ; -case SOF_SDW_PART_ID_MAX98373 : +case SOC_SDW_PART_ID_MAX98373 : info->codec_card_late_probe = asoc_sdw_mx8373_sdw_late_probe; dai_links->ops = &max_98373_sdw_ops;break ;
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 6/31 ASoC: intel: rename ignore_pch_dmic variable name
In reply to Vijendar MukundaRename 'ignore_pch_dmic' variable name as 'ignore_internal_dmic'. This variable will be moved to common header file and will be used by other platform machine driver code.
--- sound/soc/intel/boards/sof_sdw.c | 12 ++++++------ sound/soc/intel/boards/sof_sdw_common.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-)
sound/soc/intel/boards/sof_sdw.c +6 -6
@@ -932,7 +932,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .part_id = 0x714, .version_id = 3, - .ignore_pch_dmic = true, + .ignore_internal_dmic = true, .dais = { { .direction = {false, true},
@@ -947,7 +947,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .part_id = 0x715, .version_id = 3, - .ignore_pch_dmic = true, + .ignore_internal_dmic = true, .dais = { { .direction = {false, true},
@@ -962,7 +962,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .part_id = 0x714, .version_id = 2, - .ignore_pch_dmic = true, + .ignore_internal_dmic = true, .dais = { { .direction = {false, true},
@@ -977,7 +977,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .part_id = 0x715, .version_id = 2, - .ignore_pch_dmic = true, + .ignore_internal_dmic = true, .dais = { { .direction = {false, true},
@@ -1542,7 +1542,7 @@ static int parse_sdw_endpoints(struct snd_soc_card *card,if (!codec_info)return -EINVAL ; - ctx->ignore_pch_dmic |= codec_info->ignore_pch_dmic; + ctx->ignore_internal_dmic |= codec_info->ignore_internal_dmic; codec_name =asoc_sdw_get_codec_name (dev, codec_info, adr_link, i);if (!codec_name)
@@ -2018,7 +2018,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)/* dmic */ if (dmic_num >0 ) { -if (ctx->ignore_pch_dmic) { +if (ctx->ignore_internal_dmic) {dev_warn (dev,"Ignoring PCH DMIC\n" ); }else { ret =create_dmic_dailinks (card, &dai_links, &be_id);
sound/soc/intel/boards/sof_sdw_common.h +2 -2
@@ -106,7 +106,7 @@ struct asoc_sdw_codec_info {const char *codec_name;int amp_num;const u8 acpi_id[ACPI_ID_LEN ]; -const bool ignore_pch_dmic; +const bool ignore_internal_dmic;const struct snd_soc_ops *ops;struct asoc_sdw_dai_info dais[SOC_SDW_MAX_DAI_NUM ];const int dai_num;
@@ -129,7 +129,7 @@ struct mc_private {/* To store SDW Pin index for each SoundWire link */ unsigned int sdw_pin_index[SDW_MAX_LINKS ];bool append_dai_type; -bool ignore_pch_dmic; +bool ignore_internal_dmic; };extern unsigned long sof_sdw_quirk;
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 7/31 ASoC: intel/sdw-utils: move soundwire machine driver soc ops
In reply to Vijendar MukundaMove Intel SoundWire generic machine driver soc ops to common place so that it can be used by other platform machine driver.
--- include/sound/soc_sdw_utils.h | 23 ++++ sound/soc/Kconfig | 2 + sound/soc/Makefile | 1 + sound/soc/intel/boards/Kconfig | 1 + sound/soc/intel/boards/sof_sdw.c | 131 +-------------------- sound/soc/intel/boards/sof_sdw_common.h | 9 +- sound/soc/sdw_utils/Kconfig | 6 + sound/soc/sdw_utils/Makefile | 3 + sound/soc/sdw_utils/soc_sdw_utils.c | 150 ++++++++++++++++++++++++ 9 files changed, 188 insertions(+), 138 deletions(-) create mode 100644 include/sound/soc_sdw_utils.h create mode 100644 sound/soc/sdw_utils/Kconfig create mode 100644 sound/soc/sdw_utils/Makefile create mode 100644 sound/soc/sdw_utils/soc_sdw_utils.c
include/sound/soc_sdw_utils.h new file +23 -0
@@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* This file incorporates work covered by the following copyright notice: +* Copyright (c) 2020 Intel Corporation +* Copyright(c) 2024 Advanced Micro Devices, Inc. +* +*/ + +#ifndef SOC_SDW_UTILS_H +#define SOC_SDW_UTILS_H + +#include <sound/soc.h> + +int asoc_sdw_startup (struct snd_pcm_substream *substream); +int asoc_sdw_prepare (struct snd_pcm_substream *substream); +int asoc_sdw_prepare (struct snd_pcm_substream *substream); +int asoc_sdw_trigger (struct snd_pcm_substream *substream,int cmd); +int asoc_sdw_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params); +int asoc_sdw_hw_free (struct snd_pcm_substream *substream); +void asoc_sdw_shutdown (struct snd_pcm_substream *substream); + +#endif
sound/soc/Kconfig +2 -0
@@ -126,6 +126,8 @@ source "sound/soc/xtensa/Kconfig" # Supported codecs source "sound/soc/codecs/Kconfig" +source "sound/soc/sdw_utils/Kconfig" + # generic frame-work source "sound/soc/generic/Kconfig"
sound/soc/Makefile +1 -0
@@ -75,3 +75,4 @@ obj-$(CONFIG_SND_SOC) += uniphier/ obj-$(CONFIG_SND_SOC) += ux500/ obj-$(CONFIG_SND_SOC) += xilinx/ obj-$(CONFIG_SND_SOC) += xtensa/ +obj-$(CONFIG_SND_SOC) += sdw_utils/
sound/soc/intel/boards/Kconfig +1 -0
@@ -656,6 +656,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH depends on MFD_INTEL_LPSS || COMPILE_TEST depends on SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES || COMPILE_TEST depends on SOUNDWIRE + select SND_SOC_SDW_UTILS select SND_SOC_MAX98363 select SND_SOC_MAX98373_I2C select SND_SOC_MAX98373_SDW
sound/soc/intel/boards/sof_sdw.c +1 -130
146 lines not on this page · raw message
sound/soc/intel/boards/sof_sdw_common.h +1 -8
@@ -12,6 +12,7 @@#include <linux/bits.h> #include <linux/types.h> #include <sound/soc.h> +#include <sound/soc_sdw_utils.h> #include "sof_hdmi_common.h" #define SOC_SDW_MAX_NO_PROPS 2
@@ -134,14 +135,6 @@ struct mc_private {extern unsigned long sof_sdw_quirk; -int asoc_sdw_startup (struct snd_pcm_substream *substream); -int asoc_sdw_prepare (struct snd_pcm_substream *substream); -int asoc_sdw_trigger (struct snd_pcm_substream *substream,int cmd); -int asoc_sdw_hw_params (struct snd_pcm_substream *substream, -struct snd_pcm_hw_params *params); -int asoc_sdw_hw_free (struct snd_pcm_substream *substream); -void asoc_sdw_shutdown (struct snd_pcm_substream *substream); -/* generic HDMI support */ int sof_sdw_hdmi_init (struct snd_soc_pcm_runtime *rtd);
sound/soc/sdw_utils/Kconfig new file +6 -0
@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only +config SND_SOC_SDW_UTILS + tristate + help + This option enables to use SoundWire common helper functions and + SoundWire codec helper functions in machine driver.
sound/soc/sdw_utils/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0-only +snd-soc-sdw-utils-y := soc_sdw_utils.o +obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o
sound/soc/sdw_utils/soc_sdw_utils.c new file +150 -0
150 lines not on this page · raw message
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 8/31 ASoC: intel: move soundwire machine driver common structures
In reply to Vijendar MukundaMove intel generic SoundWire machine driver common structures to soc_sdw_utils.h file. These structures will be used in other platform SoundWire machine driver code.
--- include/sound/soc_sdw_utils.h | 43 +++++++++++++++++++++++++ sound/soc/intel/boards/sof_sdw_common.h | 43 ------------------------- 2 files changed, 43 insertions(+), 43 deletions(-)
include/sound/soc_sdw_utils.h +43 -0
@@ -11,6 +11,49 @@#include <sound/soc.h> +#define SOC_SDW_MAX_DAI_NUM 8 + +struct asoc_sdw_codec_info ; + +struct asoc_sdw_dai_info { +const bool direction[2 ];/* playback & capture support */ +const char *dai_name; +const int dai_type; +const int dailink[2 ];/* dailink id for each direction */ +const struct snd_kcontrol_new *controls; +const int num_controls; +const struct snd_soc_dapm_widget *widgets; +const int num_widgets; +int (*init)(struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback); +int (*exit)(struct snd_soc_card *card,struct snd_soc_dai_link *dai_link); +int (*rtd_init)(struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +bool rtd_init_done;/* Indicate that the rtd_init callback is done */ +unsigned long quirk; +}; + +struct asoc_sdw_codec_info { +const int part_id; +const int version_id; +const char *codec_name; +int amp_num; +const u8 acpi_id[ACPI_ID_LEN ]; +const bool ignore_internal_dmic; +const struct snd_soc_ops *ops; +struct asoc_sdw_dai_info dais[SOC_SDW_MAX_DAI_NUM ]; +const int dai_num; + +int (*codec_card_late_probe)(struct snd_soc_card *card); + +int (*count_sidecar)(struct snd_soc_card *card, +int *num_dais,int *num_devs); +int (*add_sidecar)(struct snd_soc_card *card, +struct snd_soc_dai_link **dai_links, +struct snd_soc_codec_conf **codec_conf); +}; +int asoc_sdw_startup (struct snd_pcm_substream *substream);int asoc_sdw_prepare (struct snd_pcm_substream *substream);int asoc_sdw_prepare (struct snd_pcm_substream *substream);
sound/soc/intel/boards/sof_sdw_common.h +0 -43
49 lines not on this page · raw message
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 9/31 ASoC: intel/sdw_utils: move soundwire machine driver helper functions
In reply to Vijendar MukundaMove below Intel SoundWire machine driver helper functions to soc_sdw_utils.c file so that it can be used by other platform machine driver.
- asoc_sdw_is_unique_device()
- asoc_sdw_get_codec_name()
--- include/sound/soc_sdw_utils.h | 5 +++ sound/soc/intel/boards/sof_sdw.c | 60 ---------------------------- sound/soc/sdw_utils/soc_sdw_utils.c | 61 +++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 60 deletions(-)
include/sound/soc_sdw_utils.h +5 -0
@@ -10,6 +10,7 @@#define SOC_SDW_UTILS_H #include <sound/soc.h> +#include <sound/soc-acpi.h> #define SOC_SDW_MAX_DAI_NUM 8
@@ -63,4 +64,8 @@ int asoc_sdw_hw_params(struct snd_pcm_substream *substream,int asoc_sdw_hw_free (struct snd_pcm_substream *substream);void asoc_sdw_shutdown (struct snd_pcm_substream *substream); +const char *asoc_sdw_get_codec_name (struct device *dev, +const struct asoc_sdw_codec_info *codec_info, +const struct snd_soc_acpi_link_adr *adr_link, +int adr_index);#endif
sound/soc/intel/boards/sof_sdw.c +0 -60
66 lines not on this page · raw message
sound/soc/sdw_utils/soc_sdw_utils.c +61 -0
66 lines not on this page · raw message
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 10/31 ASoC: intel/sdw_utils: move dmic codec helper function
In reply to Vijendar MukundaMove generic dmic codec helper function implementation to sdw_utils folder so that this function can be used by other platform machine drivers.
---
include/sound/soc_sdw_utils.h | 4 ++++
sound/soc/intel/boards/Makefile | 1 -
sound/soc/intel/boards/sof_sdw_common.h | 3 ---
sound/soc/sdw_utils/Makefile | 2 +-
.../boards/sof_sdw_dmic.c => sdw_utils/soc_sdw_dmic.c} | 8 +++++---
5 files changed, 10 insertions(+), 8 deletions(-)
rename sound/soc/{intel/boards/sof_sdw_dmic.c => sdw_utils/soc_sdw_dmic.c} (76%)include/sound/soc_sdw_utils.h +4 -0
@@ -68,4 +68,8 @@ const char *asoc_sdw_get_codec_name(struct device *dev,const struct asoc_sdw_codec_info *codec_info, const struct snd_soc_acpi_link_adr *adr_link, int adr_index); + +/* DMIC support */ +int asoc_sdw_dmic_init (struct snd_soc_pcm_runtime *rtd); +#endif
sound/soc/intel/boards/Makefile +0 -1
@@ -43,7 +43,6 @@ snd-soc-sof-sdw-y += sof_sdw.o \ sof_sdw_rt_dmic.o \ sof_sdw_cs42l42.o sof_sdw_cs42l43.o \ sof_sdw_cs_amp.o \ - sof_sdw_dmic.o \ sof_sdw_hdmi.o obj-$(CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH) += snd-soc-sof_rt5682.o obj-$(CONFIG_SND_SOC_INTEL_SOF_CS42L42_MACH) += snd-soc-sof_cs42l42.o
sound/soc/intel/boards/sof_sdw_common.h +0 -3
@@ -97,9 +97,6 @@ int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd);int sof_sdw_hdmi_card_late_probe (struct snd_soc_card *card); -/* DMIC support */ -int asoc_sdw_dmic_init (struct snd_soc_pcm_runtime *rtd); -/* RT711 support */ int asoc_sdw_rt711_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links,
sound/soc/sdw_utils/Makefile +1 -1
@@ -1,3 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only -snd-soc-sdw-utils-y := soc_sdw_utils.o +snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o
sound/soc/sdw_utils/soc_sdw_dmic.c renamed from sound/soc/intel/boards/sof_sdw_dmic.c +5 -3
@@ -1,14 +1,16 @@// SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2020 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* -* sof_sdw_dmic - Helpers to handle dmic from generic machine driver +* soc_sdw_dmic - Helpers to handle dmic from generic machine driver */ #include <sound/soc.h> #include <sound/soc-acpi.h> #include <sound/soc-dapm.h> -#include "sof_sdw_common.h" +#include <sound/soc_sdw_utils.h> static const struct snd_soc_dapm_widget dmic_widgets[] = {SND_SOC_DAPM_MIC ("SoC DMIC" ,NULL ),
@@ -40,4 +42,4 @@ int asoc_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd)return ret; } - +EXPORT_SYMBOL_NS (asoc_sdw_dmic_init,SND_SOC_SDW_UTILS );
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 11/31 ASoC: intel/sdw_utils: move rtk dmic helper functions
In reply to Vijendar MukundaMove rtk SoundWire dmic helper functions implementation to sdw_utils folder to make it generic.
---
include/sound/soc_sdw_utils.h | 3 +++
sound/soc/intel/boards/Makefile | 1 -
sound/soc/intel/boards/sof_sdw_common.h | 1 -
sound/soc/sdw_utils/Makefile | 2 +-
.../sof_sdw_rt_dmic.c => sdw_utils/soc_sdw_rt_dmic.c} | 9 +++++----
5 files changed, 9 insertions(+), 7 deletions(-)
rename sound/soc/{intel/boards/sof_sdw_rt_dmic.c => sdw_utils/soc_sdw_rt_dmic.c} (77%)include/sound/soc_sdw_utils.h +3 -0
@@ -72,4 +72,7 @@ const char *asoc_sdw_get_codec_name(struct device *dev,/* DMIC support */ int asoc_sdw_dmic_init (struct snd_soc_pcm_runtime *rtd); +/* dai_link init callbacks */ +int asoc_sdw_rt_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +#endif
sound/soc/intel/boards/Makefile +0 -1
@@ -40,7 +40,6 @@ snd-soc-sof-sdw-y += sof_sdw.o \ sof_sdw_rt5682.o sof_sdw_rt700.o \ sof_sdw_rt711.o sof_sdw_rt_sdca_jack_common.o \ sof_sdw_rt712_sdca.o sof_sdw_rt722_sdca.o \ - sof_sdw_rt_dmic.o \ sof_sdw_cs42l42.o sof_sdw_cs42l43.o \ sof_sdw_cs_amp.o \ sof_sdw_hdmi.o
sound/soc/intel/boards/sof_sdw_common.h +0 -1
@@ -162,7 +162,6 @@ int asoc_sdw_rt700_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_daiint asoc_sdw_rt711_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt712_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt722_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); -int asoc_sdw_rt_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt_amp_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt_sdca_jack_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);
sound/soc/sdw_utils/Makefile +1 -1
@@ -1,3 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only -snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o +snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o
sound/soc/sdw_utils/soc_sdw_rt_dmic.c renamed from sound/soc/intel/boards/sof_sdw_rt_dmic.c +5 -4
@@ -1,16 +1,17 @@// SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2024 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* -* sof_sdw_rt_dmic - Helpers to handle Realtek SDW DMIC from generic machine driver +* soc_sdw_rt_dmic - Helpers to handle Realtek SDW DMIC from generic machine driver */ #include <linux/device.h> #include <linux/errno.h> #include <sound/soc.h> #include <sound/soc-acpi.h> -#include "sof_board_helpers.h" -#include "sof_sdw_common.h" +#include <sound/soc_sdw_utils.h> int asoc_sdw_rt_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {
@@ -39,4 +40,4 @@ int asoc_sdw_rt_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dareturn 0 ; } -MODULE_IMPORT_NS (SND_SOC_INTEL_SOF_BOARD_HELPERS ); +EXPORT_SYMBOL_NS (asoc_sdw_rt_dmic_rtd_init,SND_SOC_SDW_UTILS );
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 12/31 ASoC: intel/sdw_utils: move rt712 sdca helper functions
In reply to Vijendar MukundaMove RT712 SDCA codec helper file to sdw_utils folder so that these helper functions can be used by other platform machine drivers.
---
include/sound/soc_sdw_utils.h | 1 +
sound/soc/intel/boards/Makefile | 2 +-
sound/soc/intel/boards/sof_sdw_common.h | 1 -
sound/soc/sdw_utils/Makefile | 3 ++-
.../soc_sdw_rt712_sdca.c} | 8 +++++---
5 files changed, 9 insertions(+), 6 deletions(-)
rename sound/soc/{intel/boards/sof_sdw_rt712_sdca.c => sdw_utils/soc_sdw_rt712_sdca.c} (80%)include/sound/soc_sdw_utils.h +1 -0
@@ -74,5 +74,6 @@ int asoc_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd);/* dai_link init callbacks */ int asoc_sdw_rt_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +int asoc_sdw_rt712_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);#endif
sound/soc/intel/boards/Makefile +1 -1
@@ -39,7 +39,7 @@ snd-soc-sof-sdw-y += sof_sdw.o \ bridge_cs35l56.o \ sof_sdw_rt5682.o sof_sdw_rt700.o \ sof_sdw_rt711.o sof_sdw_rt_sdca_jack_common.o \ - sof_sdw_rt712_sdca.o sof_sdw_rt722_sdca.o \ + sof_sdw_rt722_sdca.o \ sof_sdw_cs42l42.o sof_sdw_cs42l43.o \ sof_sdw_cs_amp.o \ sof_sdw_hdmi.o
sound/soc/intel/boards/sof_sdw_common.h +0 -1
@@ -160,7 +160,6 @@ int asoc_sdw_maxim_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_int asoc_sdw_rt5682_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt700_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt711_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); -int asoc_sdw_rt712_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt722_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt_amp_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt_sdca_jack_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);
sound/soc/sdw_utils/Makefile +2 -1
@@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o +snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \ + soc_sdw_rt712_sdca.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o
sound/soc/sdw_utils/soc_sdw_rt712_sdca.c renamed from sound/soc/intel/boards/sof_sdw_rt712_sdca.c +5 -3
@@ -1,8 +1,10 @@// SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2023 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* -* sof_sdw_rt712_sdca - Helpers to handle RT712-SDCA from generic machine driver +* soc_sdw_rt712_sdca - Helpers to handle RT712-SDCA from generic machine driver */ #include <linux/device.h>
@@ -13,7 +15,7 @@#include <sound/soc.h> #include <sound/soc-acpi.h> #include <sound/soc-dapm.h> -#include "sof_sdw_common.h" +#include <sound/soc_sdw_utils.h> /* * dapm routes for rt712 spk will be registered dynamically according
@@ -43,4 +45,4 @@ int asoc_sdw_rt712_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_return ret; } - +EXPORT_SYMBOL_NS (asoc_sdw_rt712_spk_rtd_init,SND_SOC_SDW_UTILS );
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 13/31 ASoC: intel/sdw_utils: move rt722 sdca helper functions
In reply to Vijendar MukundaMove RT722 SDCA codec helper file to sdw_utils folder to make it generic.
---
include/sound/soc_sdw_utils.h | 1 +
sound/soc/intel/boards/Makefile | 1 -
sound/soc/intel/boards/sof_sdw_common.h | 1 -
sound/soc/sdw_utils/Makefile | 2 +-
.../soc_sdw_rt722_sdca.c} | 8 +++++---
5 files changed, 7 insertions(+), 6 deletions(-)
rename sound/soc/{intel/boards/sof_sdw_rt722_sdca.c => sdw_utils/soc_sdw_rt722_sdca.c} (75%)include/sound/soc_sdw_utils.h +1 -0
@@ -75,5 +75,6 @@ int asoc_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd);/* dai_link init callbacks */ int asoc_sdw_rt_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt712_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +int asoc_sdw_rt722_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);#endif
sound/soc/intel/boards/Makefile +0 -1
@@ -39,7 +39,6 @@ snd-soc-sof-sdw-y += sof_sdw.o \ bridge_cs35l56.o \ sof_sdw_rt5682.o sof_sdw_rt700.o \ sof_sdw_rt711.o sof_sdw_rt_sdca_jack_common.o \ - sof_sdw_rt722_sdca.o \ sof_sdw_cs42l42.o sof_sdw_cs42l43.o \ sof_sdw_cs_amp.o \ sof_sdw_hdmi.o
sound/soc/intel/boards/sof_sdw_common.h +0 -1
@@ -160,7 +160,6 @@ int asoc_sdw_maxim_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_int asoc_sdw_rt5682_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt700_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt711_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); -int asoc_sdw_rt722_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt_amp_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt_sdca_jack_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);
sound/soc/sdw_utils/Makefile +1 -1
@@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \ - soc_sdw_rt712_sdca.o + soc_sdw_rt712_sdca.o soc_sdw_rt722_sdca.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o
sound/soc/sdw_utils/soc_sdw_rt722_sdca.c renamed from sound/soc/intel/boards/sof_sdw_rt722_sdca.c +5 -3
@@ -1,8 +1,10 @@// SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2023 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* -* sof_sdw_rt722_sdca - Helpers to handle RT722-SDCA from generic machine driver +* soc_sdw_rt722_sdca - Helpers to handle RT722-SDCA from generic machine driver */ #include <linux/device.h>
@@ -13,7 +15,7 @@#include <sound/soc.h> #include <sound/soc-acpi.h> #include <sound/soc-dapm.h> -#include "sof_sdw_common.h" +#include <sound/soc_sdw_utils.h> static const struct snd_soc_dapm_route rt722_spk_map[] = { {"Speaker" ,NULL ,"rt722 SPK" },
@@ -36,4 +38,4 @@ int asoc_sdw_rt722_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_return ret; } - +EXPORT_SYMBOL_NS (asoc_sdw_rt722_spk_rtd_init,SND_SOC_SDW_UTILS );
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 14/31 ASoC: intel: split soundwire machine driver private data
In reply to Vijendar MukundaSplit intel generic SoundWire machine driver private data into two structures. One structure is generic one which can be used by other platform machine driver and the other one is intel specific one. Move generic machine driver private data to soc_sdw_utils.h. Define a void pointer in generic machine driver private data structure and assign the vendor specific structure in mc_probe() call.
--- include/sound/soc_sdw_utils.h | 10 +++++ sound/soc/intel/boards/sof_sdw.c | 37 ++++++++++++------- sound/soc/intel/boards/sof_sdw_common.h | 8 +--- sound/soc/intel/boards/sof_sdw_cs42l42.c | 2 +- sound/soc/intel/boards/sof_sdw_cs42l43.c | 2 +- sound/soc/intel/boards/sof_sdw_hdmi.c | 14 ++++--- sound/soc/intel/boards/sof_sdw_rt5682.c | 2 +- sound/soc/intel/boards/sof_sdw_rt700.c | 2 +- sound/soc/intel/boards/sof_sdw_rt711.c | 6 +-- sound/soc/intel/boards/sof_sdw_rt_amp.c | 4 +- .../boards/sof_sdw_rt_sdca_jack_common.c | 6 +-- 11 files changed, 55 insertions(+), 38 deletions(-)
include/sound/soc_sdw_utils.h +10 -0
@@ -55,6 +55,16 @@ struct asoc_sdw_codec_info { struct snd_soc_codec_conf **codec_conf); }; +struct asoc_sdw_mc_private { +struct snd_soc_card card; +struct snd_soc_jack sdw_headset; +struct device *headset_codec_dev;/* only one headset per card */ +struct device *amp_dev1, *amp_dev2; +bool append_dai_type; +bool ignore_internal_dmic; +void *private; +}; +int asoc_sdw_startup (struct snd_pcm_substream *substream);int asoc_sdw_prepare (struct snd_pcm_substream *substream);int asoc_sdw_prepare (struct snd_pcm_substream *substream);
sound/soc/intel/boards/sof_sdw.c +24 -13
@@ -1319,7 +1319,7 @@ static int parse_sdw_endpoints(struct snd_soc_card *card, int *num_devs) {struct device *dev = card->dev; -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card);struct snd_soc_acpi_mach *mach =dev_get_platdata (dev);struct snd_soc_acpi_mach_params *mach_params = &mach->mach_params;const struct snd_soc_acpi_link_adr *adr_link;
@@ -1440,7 +1440,8 @@ static int create_sdw_dailink(struct snd_soc_card *card, int *be_id, struct snd_soc_codec_conf **codec_conf) { struct device *dev = card->dev; -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card); +struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;struct sof_sdw_endpoint *sof_end;int stream;int ret;
@@ -1519,7 +1520,7 @@ static int create_sdw_dailink(struct snd_soc_card *card,if (cur_link != sof_end->link_mask) {int link_num =ffs (sof_end->link_mask) -1 ; -int pin_num = ctx->sdw_pin_index[link_num]++; +int pin_num = intel_ctx->sdw_pin_index[link_num]++; cur_link = sof_end->link_mask;
@@ -1573,11 +1574,12 @@ static int create_sdw_dailinks(struct snd_soc_card *card,struct sof_sdw_dailink *sof_dais, struct snd_soc_codec_conf **codec_conf) { - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); +struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;int ret, i;for (i =0 ; i <SDW_MAX_LINKS ; i++) - ctx->sdw_pin_index[i] =SOC_SDW_INTEL_BIDIR_PDI_BASE ; + intel_ctx->sdw_pin_index[i] =SOC_SDW_INTEL_BIDIR_PDI_BASE ;/* generate DAI links by each sdw link */ while (sof_dais->initialised) {
@@ -1665,7 +1667,8 @@ static int create_hdmi_dailinks(struct snd_soc_card *card, int hdmi_num) {struct device *dev = card->dev; -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card); +struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;int i, ret;for (i =0 ; i < hdmi_num; i++) {
@@ -1673,7 +1676,7 @@ static int create_hdmi_dailinks(struct snd_soc_card *card,char *cpu_dai_name =devm_kasprintf (dev,GFP_KERNEL ,"iDisp%d Pin" , i +1 );char *codec_name, *codec_dai_name; -if (ctx->hdmi.idisp_codec) { +if (intel_ctx->hdmi.idisp_codec) { codec_name ="ehdaudio0D2" ; codec_dai_name =devm_kasprintf (dev,GFP_KERNEL ,"intel-hdmi-hifi%d" , i +1 );
@@ -1721,7 +1724,8 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)struct device *dev = card->dev;struct snd_soc_acpi_mach *mach =dev_get_platdata (card->dev);int sdw_be_num =0 , ssp_num =0 , dmic_num =0 , bt_num =0 ; -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card); +struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;struct snd_soc_acpi_mach_params *mach_params = &mach->mach_params;struct snd_soc_codec_conf *codec_conf;struct asoc_sdw_codec_info *ssp_info;
@@ -1773,7 +1777,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) }if (mach_params->codec_mask &IDISP_CODEC_MASK ) - ctx->hdmi.idisp_codec = true; + intel_ctx->hdmi.idisp_codec = true;if (sof_sdw_quirk &SOF_SDW_TGL_HDMI ) hdmi_num =SOF_TGL_HDMI_COUNT ;
@@ -1789,7 +1793,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)dev_dbg (dev,"sdw %d, ssp %d, dmic %d, hdmi %d, bt: %d\n" , sdw_be_num, ssp_num, dmic_num, - ctx->hdmi.idisp_codec ? hdmi_num :0 , bt_num); + intel_ctx->hdmi.idisp_codec ? hdmi_num :0 , bt_num); codec_conf =devm_kcalloc (dev, num_devs,sizeof (*codec_conf),GFP_KERNEL );if (!codec_conf) {
@@ -1862,7 +1866,8 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)static int sof_sdw_card_late_probe (struct snd_soc_card *card) { -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card); +struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;int ret =0 ;int i;
@@ -1875,7 +1880,7 @@ static int sof_sdw_card_late_probe(struct snd_soc_card *card) } } -if (ctx->hdmi.idisp_codec) +if (intel_ctx->hdmi.idisp_codec) ret =sof_sdw_hdmi_card_late_probe (card);return ret;
@@ -1934,16 +1939,22 @@ static int mc_probe(struct platform_device *pdev) {struct snd_soc_acpi_mach *mach =dev_get_platdata (&pdev->dev);struct snd_soc_card *card; -struct mc_private *ctx; +struct asoc_sdw_mc_private *ctx; +struct intel_mc_ctx *intel_ctx;int amp_num =0 , i;int ret;dev_dbg (&pdev->dev,"Entry\n" ); + intel_ctx =devm_kzalloc (&pdev->dev,sizeof (*intel_ctx),GFP_KERNEL ); +if (!intel_ctx) +return -ENOMEM ; + ctx =devm_kzalloc (&pdev->dev,sizeof (*ctx),GFP_KERNEL );if (!ctx)return -ENOMEM ; + ctx->private = intel_ctx; card = &ctx->card; card->dev = &pdev->dev; card->name ="soundwire" ;
sound/soc/intel/boards/sof_sdw_common.h +1 -7
@@ -78,16 +78,10 @@ enum {#define SOC_SDW_DAI_TYPE_AMP 1#define SOC_SDW_DAI_TYPE_MIC 2 -struct mc_private { -struct snd_soc_card card; -struct snd_soc_jack sdw_headset; +struct intel_mc_ctx {struct sof_hdmi_private hdmi; -struct device *headset_codec_dev;/* only one headset per card */ -struct device *amp_dev1, *amp_dev2;/* To store SDW Pin index for each SoundWire link */ unsigned int sdw_pin_index[SDW_MAX_LINKS ]; -bool append_dai_type; -bool ignore_internal_dmic; };extern unsigned long sof_sdw_quirk;
sound/soc/intel/boards/sof_sdw_cs42l42.c +1 -1
@@ -39,7 +39,7 @@ static struct snd_soc_jack_pin cs42l42_jack_pins[] = {int asoc_sdw_cs42l42_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card; -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card);struct snd_soc_component *component;struct snd_soc_jack *jack;int ret;
sound/soc/intel/boards/sof_sdw_cs42l43.c +1 -1
@@ -51,7 +51,7 @@ static struct snd_soc_jack_pin sof_jack_pins[] = {int asoc_sdw_cs42l43_hs_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_component *component =snd_soc_rtd_to_codec (rtd,0 )->component; -struct mc_private *ctx =snd_soc_card_get_drvdata (rtd->card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (rtd->card);struct snd_soc_jack *jack = &ctx->sdw_headset;struct snd_soc_card *card = rtd->card;int ret;
sound/soc/intel/boards/sof_sdw_hdmi.c +8 -6
@@ -17,23 +17,25 @@int sof_sdw_hdmi_init (struct snd_soc_pcm_runtime *rtd) { -struct mc_private *ctx =snd_soc_card_get_drvdata (rtd->card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (rtd->card); +struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;struct snd_soc_dai *dai =snd_soc_rtd_to_codec (rtd,0 ); - ctx->hdmi.hdmi_comp = dai->component; + intel_ctx->hdmi.hdmi_comp = dai->component;return 0 ; }int sof_sdw_hdmi_card_late_probe (struct snd_soc_card *card) { -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card); +struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private; -if (!ctx->hdmi.idisp_codec) +if (!intel_ctx->hdmi.idisp_codec)return 0 ; -if (!ctx->hdmi.hdmi_comp) +if (!intel_ctx->hdmi.hdmi_comp)return -EINVAL ; -return hda_dsp_hdmi_build_controls (card, ctx->hdmi.hdmi_comp); +return hda_dsp_hdmi_build_controls (card, intel_ctx->hdmi.hdmi_comp); }
sound/soc/intel/boards/sof_sdw_rt5682.c +1 -1
@@ -38,7 +38,7 @@ static struct snd_soc_jack_pin rt5682_jack_pins[] = {int asoc_sdw_rt5682_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card; -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card);struct snd_soc_component *component;struct snd_soc_jack *jack;int ret;
sound/soc/intel/boards/sof_sdw_rt700.c +1 -1
@@ -36,7 +36,7 @@ static struct snd_soc_jack_pin rt700_jack_pins[] = {int asoc_sdw_rt700_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card; -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card);struct snd_soc_component *component;struct snd_soc_jack *jack;int ret;
sound/soc/intel/boards/sof_sdw_rt711.c +3 -3
@@ -62,7 +62,7 @@ static struct snd_soc_jack_pin rt711_jack_pins[] = {int asoc_sdw_rt711_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card; -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card);struct snd_soc_component *component;struct snd_soc_jack *jack;int ret;
@@ -113,7 +113,7 @@ int asoc_sdw_rt711_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_daiint asoc_sdw_rt711_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link) { -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card);if (!ctx->headset_codec_dev)return 0 ;
@@ -129,7 +129,7 @@ int asoc_sdw_rt711_init(struct snd_soc_card *card, struct asoc_sdw_codec_info *info, bool playback) { -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card);struct device *sdw_dev;int ret;
sound/soc/intel/boards/sof_sdw_rt_amp.c +2 -2
@@ -239,7 +239,7 @@ const struct snd_soc_ops soc_sdw_rt1308_i2s_ops = {int asoc_sdw_rt_amp_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link) { -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card);if (ctx->amp_dev1) {device_remove_software_node (ctx->amp_dev1);
@@ -259,7 +259,7 @@ int asoc_sdw_rt_amp_init(struct snd_soc_card *card, struct asoc_sdw_codec_info *info, bool playback) { -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card);struct device *sdw_dev1, *sdw_dev2;int ret;
sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c +3 -3
@@ -86,7 +86,7 @@ static const char * const need_sdca_suffix[] = {int asoc_sdw_rt_sdca_jack_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card; -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card);struct snd_soc_component *component;struct snd_soc_jack *jack;int ret;
@@ -163,7 +163,7 @@ int asoc_sdw_rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_sint asoc_sdw_rt_sdca_jack_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link) { -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card);if (!ctx->headset_codec_dev)return 0 ;
@@ -183,7 +183,7 @@ int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card, struct asoc_sdw_codec_info *info, bool playback) { -struct mc_private *ctx =snd_soc_card_get_drvdata (card); +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card);struct device *sdw_dev;int ret;
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 15/31 ASoC: intel/sdw_utils: move rt5682 codec helper function
In reply to Vijendar MukundaMove rt5682 sdw codec helper function to common place holder to make it generic.
---
include/sound/soc_sdw_utils.h | 1 +
sound/soc/intel/boards/Makefile | 4 ++--
sound/soc/intel/boards/sof_sdw_common.h | 1 -
sound/soc/sdw_utils/Makefile | 3 ++-
.../sof_sdw_rt5682.c => sdw_utils/soc_sdw_rt5682.c} | 8 +++++---
5 files changed, 10 insertions(+), 7 deletions(-)
rename sound/soc/{intel/boards/sof_sdw_rt5682.c => sdw_utils/soc_sdw_rt5682.c} (88%)include/sound/soc_sdw_utils.h +1 -0
@@ -86,5 +86,6 @@ int asoc_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd);int asoc_sdw_rt_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt712_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt722_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +int asoc_sdw_rt5682_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);#endif
sound/soc/intel/boards/Makefile +2 -2
@@ -37,8 +37,8 @@ snd-soc-sof-ssp-amp-y := sof_ssp_amp.o snd-soc-sof-sdw-y += sof_sdw.o \ sof_sdw_maxim.o sof_sdw_rt_amp.o \ bridge_cs35l56.o \ - sof_sdw_rt5682.o sof_sdw_rt700.o \ - sof_sdw_rt711.o sof_sdw_rt_sdca_jack_common.o \ + sof_sdw_rt700.o sof_sdw_rt711.o \ + sof_sdw_rt_sdca_jack_common.o \ sof_sdw_cs42l42.o sof_sdw_cs42l43.o \ sof_sdw_cs_amp.o \ sof_sdw_hdmi.o
sound/soc/intel/boards/sof_sdw_common.h +0 -1
@@ -151,7 +151,6 @@ int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soint asoc_sdw_cs42l43_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_cs_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_maxim_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); -int asoc_sdw_rt5682_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt700_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt711_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt_amp_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);
sound/soc/sdw_utils/Makefile +2 -1
@@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \ - soc_sdw_rt712_sdca.o soc_sdw_rt722_sdca.o + soc_sdw_rt712_sdca.o soc_sdw_rt722_sdca.o \ + soc_sdw_rt5682.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o
sound/soc/sdw_utils/soc_sdw_rt5682.c renamed from sound/soc/intel/boards/sof_sdw_rt5682.c +5 -3
@@ -1,8 +1,10 @@// SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2020 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* -* sof_sdw_rt5682 - Helpers to handle RT5682 from generic machine driver +* soc_sdw_rt5682 - Helpers to handle RT5682 from generic machine driver */ #include <linux/device.h>
@@ -15,7 +17,7 @@#include <sound/soc-acpi.h> #include <sound/soc-dapm.h> #include <sound/jack.h> -#include "sof_sdw_common.h" +#include <sound/soc_sdw_utils.h> static const struct snd_soc_dapm_route rt5682_map[] = {/*Headphones*/
@@ -86,4 +88,4 @@ int asoc_sdw_rt5682_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_daireturn ret; } -MODULE_IMPORT_NS (SND_SOC_INTEL_SOF_BOARD_HELPERS ); +EXPORT_SYMBOL_NS (asoc_sdw_rt5682_rtd_init,SND_SOC_SDW_UTILS );
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 16/31 ASoC: intel/sdw_utils: move rtk jack common helper functions
In reply to Vijendar MukundaMove RTK codec jack common helper functions to common place holder (sdw_utils folder) to make it generic so that it will be used by other platform machine driver code.
---
include/sound/soc_sdw_utils.h | 11 ++++++++++
sound/soc/intel/boards/Makefile | 1 -
sound/soc/intel/boards/sof_sdw.c | 1 +
sound/soc/intel/boards/sof_sdw_common.h | 10 ----------
sound/soc/sdw_utils/Makefile | 2 +-
.../soc_sdw_rt_sdca_jack_common.c} | 20 +++++++++++--------
6 files changed, 25 insertions(+), 20 deletions(-)
rename sound/soc/{intel/boards/sof_sdw_rt_sdca_jack_common.c => sdw_utils/soc_sdw_rt_sdca_jack_common.c} (90%)include/sound/soc_sdw_utils.h +11 -0
@@ -13,6 +13,8 @@#include <sound/soc-acpi.h> #define SOC_SDW_MAX_DAI_NUM 8 +#define SOC_SDW_MAX_NO_PROPS 2 +#define SOC_SDW_JACK_JDSRC (quirk) ((quirk) & GENMASK(3, 0))struct asoc_sdw_codec_info ;
@@ -63,6 +65,7 @@ struct asoc_sdw_mc_private {bool append_dai_type;bool ignore_internal_dmic;void *private; +unsigned long mc_quirk; };int asoc_sdw_startup (struct snd_pcm_substream *substream);
@@ -82,8 +85,16 @@ const char *asoc_sdw_get_codec_name(struct device *dev,/* DMIC support */ int asoc_sdw_dmic_init (struct snd_soc_pcm_runtime *rtd); +/* RT711-SDCA support */ +int asoc_sdw_rt_sdca_jack_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback); +int asoc_sdw_rt_sdca_jack_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link); +/* dai_link init callbacks */ int asoc_sdw_rt_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +int asoc_sdw_rt_sdca_jack_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt712_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt722_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt5682_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);
sound/soc/intel/boards/Makefile +0 -1
@@ -38,7 +38,6 @@ snd-soc-sof-sdw-y += sof_sdw.o \ sof_sdw_maxim.o sof_sdw_rt_amp.o \ bridge_cs35l56.o \ sof_sdw_rt700.o sof_sdw_rt711.o \ - sof_sdw_rt_sdca_jack_common.o \ sof_sdw_cs42l42.o sof_sdw_cs42l43.o \ sof_sdw_cs_amp.o \ sof_sdw_hdmi.o
sound/soc/intel/boards/sof_sdw.c +1 -0
@@ -1973,6 +1973,7 @@ static int mc_probe(struct platform_device *pdev)log_quirks (card->dev); + ctx->mc_quirk = sof_sdw_quirk;/* reset amp_num to ensure amp_num++ starts from 0 in each probe */ for (i =0 ; i <ARRAY_SIZE (codec_info_list); i++) codec_info_list[i].amp_num =0 ;
sound/soc/intel/boards/sof_sdw_common.h +0 -10
@@ -15,7 +15,6 @@#include <sound/soc_sdw_utils.h> #include "sof_hdmi_common.h" -#define SOC_SDW_MAX_NO_PROPS 2#define MAX_HDMI_NUM 4#define SOC_SDW_UNUSED_DAI_ID -1#define SOC_SDW_JACK_OUT_DAI_ID 0
@@ -45,7 +44,6 @@ enum { SOF_I2S_SSP5 = BIT(5), }; -#define SOC_SDW_JACK_JDSRC (quirk) ((quirk) & GENMASK(3, 0))/* Deprecated and no longer supported by the code */ #define SOC_SDW_FOUR_SPK BIT(4)#define SOF_SDW_TGL_HDMI BIT(5)
@@ -98,13 +96,6 @@ int asoc_sdw_rt711_init(struct snd_soc_card *card, bool playback);int asoc_sdw_rt711_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link); -/* RT711-SDCA support */ -int asoc_sdw_rt_sdca_jack_init (struct snd_soc_card *card, -struct snd_soc_dai_link *dai_links, -struct asoc_sdw_codec_info *info, -bool playback); -int asoc_sdw_rt_sdca_jack_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link); -/* RT1308 I2S support */ extern const struct snd_soc_ops soc_sdw_rt1308_i2s_ops;
@@ -154,6 +145,5 @@ int asoc_sdw_maxim_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_int asoc_sdw_rt700_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt711_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt_amp_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); -int asoc_sdw_rt_sdca_jack_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);#endif
sound/soc/sdw_utils/Makefile +1 -1
@@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \ soc_sdw_rt712_sdca.o soc_sdw_rt722_sdca.o \ - soc_sdw_rt5682.o + soc_sdw_rt5682.o soc_sdw_rt_sdca_jack_common.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o
sound/soc/sdw_utils/soc_sdw_rt_sdca_jack_common.c renamed from sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c +12 -8
@@ -1,8 +1,10 @@// SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2020 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* -* sof_sdw_rt711_sdca - Helpers to handle RT711-SDCA from generic machine driver +* soc_sdw_rt711_sdca - Helpers to handle RT711-SDCA from generic machine driver */ #include <linux/device.h>
@@ -15,22 +17,22 @@#include <sound/soc-acpi.h> #include <sound/soc-dapm.h> #include <sound/jack.h> -#include "sof_sdw_common.h" +#include <sound/soc_sdw_utils.h> /* * Note this MUST be called before snd_soc_register_card(), so that the props * are in place before the codec component driver's probe function parses them. */ -static int rt_sdca_jack_add_codec_device_props (struct device *sdw_dev) +static int rt_sdca_jack_add_codec_device_props (struct device *sdw_dev,unsigned long quirk) {struct property_entry props[SOC_SDW_MAX_NO_PROPS ] = {};struct fwnode_handle *fwnode;int ret; -if (!SOC_SDW_JACK_JDSRC (sof_sdw_quirk)) +if (!SOC_SDW_JACK_JDSRC (quirk))return 0 ; - props[0 ] =PROPERTY_ENTRY_U32 ("realtek,jd-src" ,SOC_SDW_JACK_JDSRC (sof_sdw_quirk)); + props[0 ] =PROPERTY_ENTRY_U32 ("realtek,jd-src" ,SOC_SDW_JACK_JDSRC (quirk)); fwnode =fwnode_create_software_node (props,NULL );if (IS_ERR (fwnode))
@@ -160,6 +162,7 @@ int asoc_sdw_rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_sreturn ret; } +EXPORT_SYMBOL_NS (asoc_sdw_rt_sdca_jack_rtd_init,SND_SOC_SDW_UTILS );int asoc_sdw_rt_sdca_jack_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link) {
@@ -168,7 +171,7 @@ int asoc_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_linif (!ctx->headset_codec_dev)return 0 ; -if (!SOC_SDW_JACK_JDSRC (sof_sdw_quirk)) +if (!SOC_SDW_JACK_JDSRC (ctx->mc_quirk))return 0 ;device_remove_software_node (ctx->headset_codec_dev);
@@ -177,6 +180,7 @@ int asoc_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_linreturn 0 ; } +EXPORT_SYMBOL_NS (asoc_sdw_rt_sdca_jack_exit,SND_SOC_SDW_UTILS ); int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links,
@@ -198,7 +202,7 @@ int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card,if (!sdw_dev)return -EPROBE_DEFER ; - ret =rt_sdca_jack_add_codec_device_props (sdw_dev); + ret =rt_sdca_jack_add_codec_device_props (sdw_dev, ctx->mc_quirk);if (ret <0 ) {put_device (sdw_dev);return ret;
@@ -207,4 +211,4 @@ int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card,return 0 ; } -MODULE_IMPORT_NS (SND_SOC_INTEL_SOF_BOARD_HELPERS ); +EXPORT_SYMBOL_NS (asoc_sdw_rt_sdca_jack_init,SND_SOC_SDW_UTILS );
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 17/31 ASoC: intel/sdw_utils: move rt700 and rt711 codec helper functions
In reply to Vijendar MukundaMove RT700 and RT711 Soundwire codec helper functions to common place holder so that it can be used by other platform machine driver.
---
include/sound/soc_sdw_utils.h | 9 +++++++++
sound/soc/intel/boards/Makefile | 1 -
sound/soc/intel/boards/sof_sdw_common.h | 9 ---------
sound/soc/sdw_utils/Makefile | 1 +
.../soc_sdw_rt700.c} | 8 +++++---
.../soc_sdw_rt711.c} | 18 +++++++++++-------
6 files changed, 26 insertions(+), 20 deletions(-)
rename sound/soc/{intel/boards/sof_sdw_rt700.c => sdw_utils/soc_sdw_rt700.c} (88%)
rename sound/soc/{intel/boards/sof_sdw_rt711.c => sdw_utils/soc_sdw_rt711.c} (85%)include/sound/soc_sdw_utils.h +9 -0
@@ -85,6 +85,13 @@ const char *asoc_sdw_get_codec_name(struct device *dev,/* DMIC support */ int asoc_sdw_dmic_init (struct snd_soc_pcm_runtime *rtd); +/* RT711 support */ +int asoc_sdw_rt711_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback); +int asoc_sdw_rt711_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link); +/* RT711-SDCA support */ int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links,
@@ -95,6 +102,8 @@ int asoc_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_lin/* dai_link init callbacks */ int asoc_sdw_rt_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt_sdca_jack_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +int asoc_sdw_rt700_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +int asoc_sdw_rt711_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt712_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt722_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt5682_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);
sound/soc/intel/boards/Makefile +0 -1
@@ -37,7 +37,6 @@ snd-soc-sof-ssp-amp-y := sof_ssp_amp.o snd-soc-sof-sdw-y += sof_sdw.o \ sof_sdw_maxim.o sof_sdw_rt_amp.o \ bridge_cs35l56.o \ - sof_sdw_rt700.o sof_sdw_rt711.o \ sof_sdw_cs42l42.o sof_sdw_cs42l43.o \ sof_sdw_cs_amp.o \ sof_sdw_hdmi.o
sound/soc/intel/boards/sof_sdw_common.h +0 -9
@@ -89,13 +89,6 @@ int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd);int sof_sdw_hdmi_card_late_probe (struct snd_soc_card *card); -/* RT711 support */ -int asoc_sdw_rt711_init (struct snd_soc_card *card, -struct snd_soc_dai_link *dai_links, -struct asoc_sdw_codec_info *info, -bool playback); -int asoc_sdw_rt711_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link); -/* RT1308 I2S support */ extern const struct snd_soc_ops soc_sdw_rt1308_i2s_ops;
@@ -142,8 +135,6 @@ int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soint asoc_sdw_cs42l43_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_cs_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_maxim_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); -int asoc_sdw_rt700_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); -int asoc_sdw_rt711_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt_amp_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);#endif
sound/soc/sdw_utils/Makefile +1 -0
@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \ + soc_sdw_rt700.o soc_sdw_rt711.o \ soc_sdw_rt712_sdca.o soc_sdw_rt722_sdca.o \ soc_sdw_rt5682.o soc_sdw_rt_sdca_jack_common.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o
sound/soc/sdw_utils/soc_sdw_rt700.c renamed from sound/soc/intel/boards/sof_sdw_rt700.c +5 -3
@@ -1,8 +1,10 @@// SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2020 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* -* sof_sdw_rt700 - Helpers to handle RT700 from generic machine driver +* soc_sdw_rt700 - Helpers to handle RT700 from generic machine driver */ #include <linux/device.h>
@@ -13,7 +15,7 @@#include <sound/soc-acpi.h> #include <sound/soc-dapm.h> #include <sound/jack.h> -#include "sof_sdw_common.h" +#include <sound/soc_sdw_utils.h> static const struct snd_soc_dapm_route rt700_map[] = {/* Headphones */
@@ -83,4 +85,4 @@ int asoc_sdw_rt700_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_daireturn ret; } -MODULE_IMPORT_NS (SND_SOC_INTEL_SOF_BOARD_HELPERS ); +EXPORT_SYMBOL_NS (asoc_sdw_rt700_rtd_init,SND_SOC_SDW_UTILS );
sound/soc/sdw_utils/soc_sdw_rt711.c renamed from sound/soc/intel/boards/sof_sdw_rt711.c +11 -7
@@ -1,8 +1,10 @@// SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2020 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* -* sof_sdw_rt711 - Helpers to handle RT711 from generic machine driver +* soc_sdw_rt711 - Helpers to handle RT711 from generic machine driver */ #include <linux/device.h>
@@ -15,21 +17,21 @@#include <sound/soc-acpi.h> #include <sound/soc-dapm.h> #include <sound/jack.h> -#include "sof_sdw_common.h" +#include <sound/soc_sdw_utils.h> /* * Note this MUST be called before snd_soc_register_card(), so that the props * are in place before the codec component driver's probe function parses them. */ -static int rt711_add_codec_device_props (struct device *sdw_dev) +static int rt711_add_codec_device_props (struct device *sdw_dev,unsigned long quirk) {struct property_entry props[SOC_SDW_MAX_NO_PROPS ] = {};struct fwnode_handle *fwnode;int ret; -if (!SOC_SDW_JACK_JDSRC (sof_sdw_quirk)) +if (!SOC_SDW_JACK_JDSRC (quirk))return 0 ; - props[0 ] =PROPERTY_ENTRY_U32 ("realtek,jd-src" ,SOC_SDW_JACK_JDSRC (sof_sdw_quirk)); + props[0 ] =PROPERTY_ENTRY_U32 ("realtek,jd-src" ,SOC_SDW_JACK_JDSRC (quirk)); fwnode =fwnode_create_software_node (props,NULL );if (IS_ERR (fwnode))
@@ -110,6 +112,7 @@ int asoc_sdw_rt711_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_daireturn ret; } +EXPORT_SYMBOL_NS (asoc_sdw_rt711_rtd_init,SND_SOC_SDW_UTILS );int asoc_sdw_rt711_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link) {
@@ -123,6 +126,7 @@ int asoc_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_return 0 ; } +EXPORT_SYMBOL_NS (asoc_sdw_rt711_exit,SND_SOC_SDW_UTILS ); int asoc_sdw_rt711_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links,
@@ -144,7 +148,7 @@ int asoc_sdw_rt711_init(struct snd_soc_card *card,if (!sdw_dev)return -EPROBE_DEFER ; - ret =rt711_add_codec_device_props (sdw_dev); + ret =rt711_add_codec_device_props (sdw_dev, ctx->mc_quirk);if (ret <0 ) {put_device (sdw_dev);return ret;
@@ -153,4 +157,4 @@ int asoc_sdw_rt711_init(struct snd_soc_card *card,return 0 ; } -MODULE_IMPORT_NS (SND_SOC_INTEL_SOF_BOARD_HELPERS ); +EXPORT_SYMBOL_NS (asoc_sdw_rt711_init,SND_SOC_SDW_UTILS );
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 18/31 ASoC: intel/sdw_utils: move rtk amp codec helper functions
In reply to Vijendar MukundaMove RTK amp codec helper functions related implementation to common place holder to make it generic so that these helper functions will be used by other platform machine driver modules.
---
include/sound/soc_sdw_utils.h | 11 +++++++++++
sound/soc/intel/boards/Makefile | 2 +-
sound/soc/intel/boards/sof_sdw_common.h | 11 -----------
sound/soc/sdw_utils/Makefile | 3 ++-
.../soc_sdw_rt_amp.c} | 14 ++++++++++----
.../soc_sdw_rt_amp_coeff_tables.h} | 6 +++---
6 files changed, 27 insertions(+), 20 deletions(-)
rename sound/soc/{intel/boards/sof_sdw_rt_amp.c => sdw_utils/soc_sdw_rt_amp.c} (93%)
rename sound/soc/{intel/boards/sof_sdw_amp_coeff_tables.h => sdw_utils/soc_sdw_rt_amp_coeff_tables.h} (97%)include/sound/soc_sdw_utils.h +11 -0
@@ -99,9 +99,20 @@ int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card, bool playback);int asoc_sdw_rt_sdca_jack_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link); +/* RT1308 I2S support */ +extern const struct snd_soc_ops soc_sdw_rt1308_i2s_ops; + +/* generic amp support */ +int asoc_sdw_rt_amp_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback); +int asoc_sdw_rt_amp_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link); +/* dai_link init callbacks */ int asoc_sdw_rt_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt_sdca_jack_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +int asoc_sdw_rt_amp_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt700_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt711_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt712_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);
sound/soc/intel/boards/Makefile +1 -1
@@ -35,7 +35,7 @@ snd-soc-skl_nau88l25_ssm4567-y := skl_nau88l25_ssm4567.o snd-soc-ehl-rt5660-y := ehl_rt5660.o snd-soc-sof-ssp-amp-y := sof_ssp_amp.o snd-soc-sof-sdw-y += sof_sdw.o \ - sof_sdw_maxim.o sof_sdw_rt_amp.o \ + sof_sdw_maxim.o \ bridge_cs35l56.o \ sof_sdw_cs42l42.o sof_sdw_cs42l43.o \ sof_sdw_cs_amp.o \
sound/soc/intel/boards/sof_sdw_common.h +0 -11
@@ -89,16 +89,6 @@ int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd);int sof_sdw_hdmi_card_late_probe (struct snd_soc_card *card); -/* RT1308 I2S support */ -extern const struct snd_soc_ops soc_sdw_rt1308_i2s_ops; - -/* generic amp support */ -int asoc_sdw_rt_amp_init (struct snd_soc_card *card, -struct snd_soc_dai_link *dai_links, -struct asoc_sdw_codec_info *info, -bool playback); -int asoc_sdw_rt_amp_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link); -/* MAXIM codec support */ int asoc_sdw_maxim_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links,
@@ -135,6 +125,5 @@ int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soint asoc_sdw_cs42l43_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_cs_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_maxim_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); -int asoc_sdw_rt_amp_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);#endif
sound/soc/sdw_utils/Makefile +2 -1
@@ -2,5 +2,6 @@ snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \ soc_sdw_rt700.o soc_sdw_rt711.o \ soc_sdw_rt712_sdca.o soc_sdw_rt722_sdca.o \ - soc_sdw_rt5682.o soc_sdw_rt_sdca_jack_common.o + soc_sdw_rt5682.o soc_sdw_rt_sdca_jack_common.o \ + soc_sdw_rt_amp.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o
sound/soc/sdw_utils/soc_sdw_rt_amp.c renamed from sound/soc/intel/boards/sof_sdw_rt_amp.c +10 -4
@@ -1,8 +1,10 @@// SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2022 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* -* sof_sdw_rt_amp - Helpers to handle RT1308/RT1316/RT1318 from generic machine driver +* soc_sdw_rt_amp - Helpers to handle RT1308/RT1316/RT1318 from generic machine driver */ #include <linux/device.h>
@@ -14,9 +16,9 @@#include <linux/soundwire/sdw.h> #include <linux/soundwire/sdw_type.h> #include <linux/dmi.h> -#include "sof_sdw_common.h" -#include "sof_sdw_amp_coeff_tables.h" -#include "../../codecs/rt1308.h" +#include <sound/soc_sdw_utils.h> +#include "soc_sdw_rt_amp_coeff_tables.h" +#include "../codecs/rt1308.h" #define CODEC_NAME_SIZE 7
@@ -199,6 +201,7 @@ int asoc_sdw_rt_amp_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_socreturn ret; } +EXPORT_SYMBOL_NS (asoc_sdw_rt_amp_spk_rtd_init,SND_SOC_SDW_UTILS );static int rt1308_i2s_hw_params (struct snd_pcm_substream *substream,struct snd_pcm_hw_params *params)
@@ -236,6 +239,7 @@ static int rt1308_i2s_hw_params(struct snd_pcm_substream *substream,const struct snd_soc_ops soc_sdw_rt1308_i2s_ops = { .hw_params = rt1308_i2s_hw_params, }; +EXPORT_SYMBOL_NS (soc_sdw_rt1308_i2s_ops,SND_SOC_SDW_UTILS );int asoc_sdw_rt_amp_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link) {
@@ -253,6 +257,7 @@ int asoc_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *daireturn 0 ; } +EXPORT_SYMBOL_NS (asoc_sdw_rt_amp_exit,SND_SOC_SDW_UTILS ); int asoc_sdw_rt_amp_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links,
@@ -295,3 +300,4 @@ int asoc_sdw_rt_amp_init(struct snd_soc_card *card,return 0 ; } +EXPORT_SYMBOL_NS (asoc_sdw_rt_amp_init,SND_SOC_SDW_UTILS );
sound/soc/sdw_utils/soc_sdw_rt_amp_coeff_tables.h renamed from sound/soc/intel/boards/sof_sdw_amp_coeff_tables.h +3 -3
@@ -2,11 +2,11 @@*/ /* -* sof_sdw_amp_coeff_tables.h - related coefficients for amplifier parameters +* soc_sdw_rt_amp_coeff_tables.h - related coefficients for RTK amplifier parameters */ -#ifndef SND_SOC_SOF_SDW_AMP_COEFF_H -#define SND_SOC_SOF_SDW_AMP_COEFF_H +#ifndef SND_SOC_SDW_RT_SDW_AMP_COEFF_H +#define SND_SOC_SDW_RT_SDW_AMP_COEFF_H #define RT1308_MAX_BQ_REG 480#define RT1316_MAX_BQ_REG 580
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 19/31 ASoC: intel/sdw_utils: move cirrus soundwire codec helper functions
In reply to Vijendar MukundaTo make it generic, move Cirrus Soundwire codec helper functions to common place holder so that it can be used by other platform machine driver.
---
include/sound/soc_sdw_utils.h | 40 +++++++++++++++++++
sound/soc/intel/boards/Makefile | 3 --
sound/soc/intel/boards/sof_sdw_common.h | 39 ------------------
sound/soc/sdw_utils/Makefile | 5 ++-
.../soc_sdw_bridge_cs35l56.c} | 38 ++++++++++++------
.../soc_sdw_cs42l42.c} | 9 +++--
.../soc_sdw_cs42l43.c} | 20 ++++++----
.../soc_sdw_cs_amp.c} | 8 +++-
8 files changed, 94 insertions(+), 68 deletions(-)
rename sound/soc/{intel/boards/bridge_cs35l56.c => sdw_utils/soc_sdw_bridge_cs35l56.c} (73%)
rename sound/soc/{intel/boards/sof_sdw_cs42l42.c => sdw_utils/soc_sdw_cs42l42.c} (88%)
rename sound/soc/{intel/boards/sof_sdw_cs42l43.c => sdw_utils/soc_sdw_cs42l43.c} (85%)
rename sound/soc/{intel/boards/sof_sdw_cs_amp.c => sdw_utils/soc_sdw_cs_amp.c} (80%)include/sound/soc_sdw_utils.h +40 -0
@@ -16,6 +16,19 @@#define SOC_SDW_MAX_NO_PROPS 2#define SOC_SDW_JACK_JDSRC (quirk) ((quirk) & GENMASK(3, 0)) +/* If a CODEC has an optional speaker output, this quirk will enable it */ +#define SOC_SDW_CODEC_SPKR BIT(15) +/* +* If the CODEC has additional devices attached directly to it. +* +* For the cs42l43: +* - 0 - No speaker output +* - SOC_SDW_CODEC_SPKR - CODEC internal speaker +* - SOC_SDW_SIDECAR_AMPS - 2x Sidecar amplifiers + CODEC internal speaker +* - SOC_SDW_CODEC_SPKR | SOF_SIDECAR_AMPS - Not currently supported +*/ +#define SOC_SDW_SIDECAR_AMPS BIT(16) +struct asoc_sdw_codec_info ;struct asoc_sdw_dai_info {
@@ -109,6 +122,28 @@ int asoc_sdw_rt_amp_init(struct snd_soc_card *card, bool playback);int asoc_sdw_rt_amp_exit (struct snd_soc_card *card,struct snd_soc_dai_link *dai_link); +/* CS42L43 support */ +int asoc_sdw_cs42l43_spk_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback); + +/* CS AMP support */ +int asoc_sdw_bridge_cs35l56_count_sidecar (struct snd_soc_card *card, +int *num_dais,int *num_devs); +int asoc_sdw_bridge_cs35l56_add_sidecar (struct snd_soc_card *card, +struct snd_soc_dai_link **dai_links, +struct snd_soc_codec_conf **codec_conf); +int asoc_sdw_bridge_cs35l56_spk_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback); + +int asoc_sdw_cs_amp_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback); +/* dai_link init callbacks */ int asoc_sdw_rt_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt_sdca_jack_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);
@@ -118,5 +153,10 @@ int asoc_sdw_rt711_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_daiint asoc_sdw_rt712_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt722_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt5682_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +int asoc_sdw_cs42l42_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +int asoc_sdw_cs42l43_hs_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +int asoc_sdw_cs42l43_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +int asoc_sdw_cs42l43_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +int asoc_sdw_cs_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);#endif
sound/soc/intel/boards/Makefile +0 -3
@@ -36,9 +36,6 @@ snd-soc-ehl-rt5660-y := ehl_rt5660.o snd-soc-sof-ssp-amp-y := sof_ssp_amp.o snd-soc-sof-sdw-y += sof_sdw.o \ sof_sdw_maxim.o \ - bridge_cs35l56.o \ - sof_sdw_cs42l42.o sof_sdw_cs42l43.o \ - sof_sdw_cs_amp.o \ sof_sdw_hdmi.o obj-$(CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH) += snd-soc-sof_rt5682.o obj-$(CONFIG_SND_SOC_INTEL_SOF_CS42L42_MACH) += snd-soc-sof_cs42l42.o
sound/soc/intel/boards/sof_sdw_common.h +0 -39
@@ -52,18 +52,6 @@ enum {#define SOF_SSP_GET_PORT (quirk) (((quirk) >> 7) & GENMASK(5, 0))/* Deprecated and no longer supported by the code */ #define SOC_SDW_NO_AGGREGATION BIT(14) -/* If a CODEC has an optional speaker output, this quirk will enable it */ -#define SOC_SDW_CODEC_SPKR BIT(15) -/* -* If the CODEC has additional devices attached directly to it. -* -* For the cs42l43: -* - 0 - No speaker output -* - SOC_SDW_CODEC_SPKR - CODEC internal speaker -* - SOC_SDW_SIDECAR_AMPS - 2x Sidecar amplifiers + CODEC internal speaker -* - SOC_SDW_CODEC_SPKR | SOC_SDW_SIDECAR_AMPS - Not currently supported -*/ -#define SOC_SDW_SIDECAR_AMPS BIT(16)/* BT audio offload: reserve 3 bits for future */ #define SOF_BT_OFFLOAD_SSP_SHIFT 15
@@ -95,35 +83,8 @@ int asoc_sdw_maxim_init(struct snd_soc_card *card,struct asoc_sdw_codec_info *info, bool playback); -/* CS42L43 support */ -int asoc_sdw_cs42l43_spk_init (struct snd_soc_card *card, -struct snd_soc_dai_link *dai_links, -struct asoc_sdw_codec_info *info, -bool playback); - -/* CS AMP support */ -int asoc_sdw_bridge_cs35l56_count_sidecar (struct snd_soc_card *card, -int *num_dais,int *num_devs); -int asoc_sdw_bridge_cs35l56_add_sidecar (struct snd_soc_card *card, -struct snd_soc_dai_link **dai_links, -struct snd_soc_codec_conf **codec_conf); -int asoc_sdw_bridge_cs35l56_spk_init (struct snd_soc_card *card, -struct snd_soc_dai_link *dai_links, -struct asoc_sdw_codec_info *info, -bool playback); - -int asoc_sdw_cs_amp_init (struct snd_soc_card *card, -struct snd_soc_dai_link *dai_links, -struct asoc_sdw_codec_info *info, -bool playback); -/* dai_link init callbacks */ -int asoc_sdw_cs42l42_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); -int asoc_sdw_cs42l43_hs_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); -int asoc_sdw_cs42l43_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); -int asoc_sdw_cs42l43_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); -int asoc_sdw_cs_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_maxim_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);#endif
sound/soc/sdw_utils/Makefile +4 -1
@@ -3,5 +3,8 @@ snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \ soc_sdw_rt700.o soc_sdw_rt711.o \ soc_sdw_rt712_sdca.o soc_sdw_rt722_sdca.o \ soc_sdw_rt5682.o soc_sdw_rt_sdca_jack_common.o \ - soc_sdw_rt_amp.o + soc_sdw_rt_amp.o \ + soc_sdw_bridge_cs35l56.o \ + soc_sdw_cs42l42.o soc_sdw_cs42l43.o \ + soc_sdw_cs_amp.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o
sound/soc/sdw_utils/soc_sdw_bridge_cs35l56.c renamed from sound/soc/intel/boards/bridge_cs35l56.c +26 -12
@@ -1,6 +1,11 @@// SPDX-License-Identifier: GPL-2.0-only -// -// Intel SOF Machine Driver with Cirrus Logic CS35L56 Smart Amp +// This file incorporates work covered by the following copyright notice: +// Copyright (c) 2024 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. + +/* +* soc_sdw_bridge_cs35l56 - codec helper functions for handling CS35L56 Smart AMP +*/ #include <linux/module.h> #include <linux/platform_device.h>
@@ -9,7 +14,7 @@#include <sound/pcm_params.h> #include <sound/soc.h> #include <sound/soc-acpi.h> -#include "sof_sdw_common.h" +#include <sound/soc_sdw_utils.h> static const struct snd_soc_dapm_widget bridge_widgets[] = {SND_SOC_DAPM_SPK ("Bridge Speaker" ,NULL ),
@@ -25,7 +30,7 @@ static const char * const bridge_cs35l56_name_prefixes[] = { "AMPR", }; -static int bridge_cs35l56_asp_init (struct snd_soc_pcm_runtime *rtd) +static int asoc_sdw_bridge_cs35l56_asp_init (struct snd_soc_pcm_runtime *rtd) {struct snd_soc_card *card = rtd->card;int i, ret;
@@ -73,7 +78,7 @@ static int bridge_cs35l56_asp_init(struct snd_soc_pcm_runtime *rtd)return 0 ; } -static const struct snd_soc_pcm_stream bridge_params = { +static const struct snd_soc_pcm_stream asoc_sdw_bridge_params = { .formats =SNDRV_PCM_FMTBIT_S16_LE , .rate_min =48000 , .rate_max =48000 ,
@@ -81,7 +86,7 @@ static const struct snd_soc_pcm_stream bridge_params = { .channels_max = 2, }; -SND_SOC_DAILINK_DEFS(bridge_dai, +SND_SOC_DAILINK_DEFS(asoc_sdw_bridge_dai, DAILINK_COMP_ARRAY(COMP_CODEC("cs42l43-codec", "cs42l43-asp")), DAILINK_COMP_ARRAY(COMP_CODEC("spi-cs35l56-left", "cs35l56-asp1"), COMP_CODEC("spi-cs35l56-right", "cs35l56-asp1")),
@@ -89,28 +94,33 @@ SND_SOC_DAILINK_DEFS(bridge_dai,static const struct snd_soc_dai_link bridge_dai_template = { .name ="cs42l43-cs35l56" , - .init = bridge_cs35l56_asp_init, - .c2c_params = &bridge_params, + .init = asoc_sdw_bridge_cs35l56_asp_init, + .c2c_params = &asoc_sdw_bridge_params, .dai_fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_IB_IF |SND_SOC_DAIFMT_CBC_CFC , -SND_SOC_DAILINK_REG (bridge_dai), +SND_SOC_DAILINK_REG (asoc_sdw_bridge_dai), };int asoc_sdw_bridge_cs35l56_count_sidecar (struct snd_soc_card *card,int *num_dais,int *num_devs) { -if (sof_sdw_quirk &SOC_SDW_SIDECAR_AMPS ) { +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card); + +if (ctx->mc_quirk &SOC_SDW_SIDECAR_AMPS ) { (*num_dais)++; (*num_devs) +=ARRAY_SIZE (bridge_cs35l56_name_prefixes); }return 0 ; } +EXPORT_SYMBOL_NS (asoc_sdw_bridge_cs35l56_count_sidecar,SND_SOC_SDW_UTILS );int asoc_sdw_bridge_cs35l56_add_sidecar (struct snd_soc_card *card,struct snd_soc_dai_link **dai_links,struct snd_soc_codec_conf **codec_conf) { -if (sof_sdw_quirk &SOC_SDW_SIDECAR_AMPS ) { +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card); + +if (ctx->mc_quirk &SOC_SDW_SIDECAR_AMPS ) { **dai_links = bridge_dai_template;for (int i =0 ; i <ARRAY_SIZE (bridge_cs35l56_name_prefixes); i++) {
@@ -124,14 +134,18 @@ int asoc_sdw_bridge_cs35l56_add_sidecar(struct snd_soc_card *card,return 0 ; } +EXPORT_SYMBOL_NS (asoc_sdw_bridge_cs35l56_add_sidecar,SND_SOC_SDW_UTILS );int asoc_sdw_bridge_cs35l56_spk_init (struct snd_soc_card *card,struct snd_soc_dai_link *dai_links,struct asoc_sdw_codec_info *info,bool playback) { -if (sof_sdw_quirk &SOC_SDW_SIDECAR_AMPS ) +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card); + +if (ctx->mc_quirk &SOC_SDW_SIDECAR_AMPS ) info->amp_num +=ARRAY_SIZE (bridge_cs35l56_name_prefixes);return 0 ; } +EXPORT_SYMBOL_NS (asoc_sdw_bridge_cs35l56_spk_init,SND_SOC_SDW_UTILS );
sound/soc/sdw_utils/soc_sdw_cs42l42.c renamed from sound/soc/intel/boards/sof_sdw_cs42l42.c +5 -4
@@ -1,8 +1,9 @@// SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2023 Intel Corporation - +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* -* sof_sdw_cs42l42 - Helpers to handle CS42L42 from generic machine driver +* soc_sdw_cs42l42 - Helpers to handle CS42L42 from generic machine driver */ #include <linux/device.h>
@@ -15,7 +16,7 @@#include <sound/soc-acpi.h> #include <sound/soc-dapm.h> #include <sound/jack.h> -#include "sof_sdw_common.h" +#include <sound/soc_sdw_utils.h> static const struct snd_soc_dapm_route cs42l42_map[] = {/* HP jack connectors - unknown if we have jack detection */
@@ -87,4 +88,4 @@ int asoc_sdw_cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dareturn ret; } -MODULE_IMPORT_NS (SND_SOC_INTEL_SOF_BOARD_HELPERS ); +EXPORT_SYMBOL_NS (asoc_sdw_cs42l42_rtd_init,SND_SOC_SDW_UTILS );
sound/soc/sdw_utils/soc_sdw_cs42l43.c renamed from sound/soc/intel/boards/sof_sdw_cs42l43.c +13 -7
@@ -1,9 +1,11 @@// SPDX-License-Identifier: GPL-2.0-only // Based on sof_sdw_rt5682.c +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2023 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* -* sof_sdw_cs42l43 - Helpers to handle CS42L43 from generic machine driver +* soc_sdw_cs42l43 - Helpers to handle CS42L43 from generic machine driver */ #include <linux/device.h> #include <linux/errno.h>
@@ -16,7 +18,7 @@#include <sound/soc.h> #include <sound/soc-acpi.h> #include <sound/soc-dapm.h> -#include "sof_sdw_common.h" +#include <sound/soc_sdw_utils.h> static const struct snd_soc_dapm_route cs42l43_hs_map[] = { {"Headphone" ,NULL ,"cs42l43 AMP3_OUT" },
@@ -37,7 +39,7 @@ static const struct snd_soc_dapm_route cs42l43_dmic_map[] = { { "cs42l43 PDM2_DIN", NULL, "DMIC" }, }; -static struct snd_soc_jack_pin sof_jack_pins[] = { +static struct snd_soc_jack_pin soc_jack_pins[] = { { .pin = "Headphone", .mask = SND_JACK_HEADPHONE,
@@ -73,8 +75,8 @@ int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_socSND_JACK_HEADSET |SND_JACK_LINEOUT |SND_JACK_BTN_0 |SND_JACK_BTN_1 |SND_JACK_BTN_2 |SND_JACK_BTN_3 , - jack, sof_jack_pins, - ARRAY_SIZE(sof_jack_pins)); + jack, soc_jack_pins, + ARRAY_SIZE(soc_jack_pins));if (ret) {dev_err (card->dev,"Failed to create jack: %d\n" , ret);return ret;
@@ -98,13 +100,15 @@ int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_socreturn ret; } +EXPORT_SYMBOL_NS (asoc_sdw_cs42l43_hs_rtd_init,SND_SOC_SDW_UTILS );int asoc_sdw_cs42l43_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {struct snd_soc_card *card = rtd->card; +struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card);int ret; -if (!(sof_sdw_quirk &SOC_SDW_SIDECAR_AMPS )) { +if (!(ctx->mc_quirk &SOC_SDW_SIDECAR_AMPS )) {/* Will be set by the bridge code in this case */ card->components = devm_kasprintf(card->dev, GFP_KERNEL, "%s spk:cs42l43-spk",
@@ -120,6 +124,7 @@ int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soreturn ret; } +EXPORT_SYMBOL_NS (asoc_sdw_cs42l43_spk_rtd_init,SND_SOC_SDW_UTILS ); int asoc_sdw_cs42l43_spk_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links,
@@ -134,6 +139,7 @@ int asoc_sdw_cs42l43_spk_init(struct snd_soc_card *card,return asoc_sdw_bridge_cs35l56_spk_init (card, dai_links, info, playback); } +EXPORT_SYMBOL_NS (asoc_sdw_cs42l43_spk_init,SND_SOC_SDW_UTILS );int asoc_sdw_cs42l43_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai) {
@@ -152,4 +158,4 @@ int asoc_sdw_cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_sreturn ret; } - +EXPORT_SYMBOL_NS (asoc_sdw_cs42l43_dmic_rtd_init,SND_SOC_SDW_UTILS );
sound/soc/sdw_utils/soc_sdw_cs_amp.c renamed from sound/soc/intel/boards/sof_sdw_cs_amp.c +6 -2
@@ -1,8 +1,10 @@// SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2023 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* -* sof_sdw_cs_amp - Helpers to handle CS35L56 from generic machine driver +* soc_sdw_cs_amp - Helpers to handle CS35L56 from generic machine driver */ #include <linux/device.h>
@@ -10,7 +12,7 @@#include <sound/soc.h> #include <sound/soc-acpi.h> #include <sound/soc-dai.h> -#include "sof_sdw_common.h" +#include <sound/soc_sdw_utils.h> #define CODEC_NAME_SIZE 8
@@ -44,6 +46,7 @@ int asoc_sdw_cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_daireturn 0 ; } +EXPORT_SYMBOL_NS (asoc_sdw_cs_spk_rtd_init,SND_SOC_SDW_UTILS ); int asoc_sdw_cs_amp_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links,
@@ -58,3 +61,4 @@ int asoc_sdw_cs_amp_init(struct snd_soc_card *card,return 0 ; } +EXPORT_SYMBOL_NS (asoc_sdw_cs_amp_init,SND_SOC_SDW_UTILS );
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 20/31 ASoC: intel/sdw_utils: move maxim codec helper functions
In reply to Vijendar MukundaMove maxim codec helper functions to common place holder so that it can be used by other platform machine driver.
---
include/sound/soc_sdw_utils.h | 7 +++++++
sound/soc/intel/boards/Makefile | 1 -
sound/soc/intel/boards/sof_sdw_common.h | 10 ----------
sound/soc/sdw_utils/Makefile | 3 ++-
.../sof_sdw_maxim.c => sdw_utils/soc_sdw_maxim.c} | 14 +++++++++-----
5 files changed, 18 insertions(+), 17 deletions(-)
rename sound/soc/{intel/boards/sof_sdw_maxim.c => sdw_utils/soc_sdw_maxim.c} (86%)include/sound/soc_sdw_utils.h +7 -0
@@ -144,6 +144,12 @@ int asoc_sdw_cs_amp_init(struct snd_soc_card *card,struct asoc_sdw_codec_info *info, bool playback); +/* MAXIM codec support */ +int asoc_sdw_maxim_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback); +/* dai_link init callbacks */ int asoc_sdw_rt_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_rt_sdca_jack_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);
@@ -158,5 +164,6 @@ int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_socint asoc_sdw_cs42l43_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_cs42l43_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_cs_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +int asoc_sdw_maxim_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);#endif
sound/soc/intel/boards/Makefile +0 -1
@@ -35,7 +35,6 @@ snd-soc-skl_nau88l25_ssm4567-y := skl_nau88l25_ssm4567.o snd-soc-ehl-rt5660-y := ehl_rt5660.o snd-soc-sof-ssp-amp-y := sof_ssp_amp.o snd-soc-sof-sdw-y += sof_sdw.o \ - sof_sdw_maxim.o \ sof_sdw_hdmi.o obj-$(CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH) += snd-soc-sof_rt5682.o obj-$(CONFIG_SND_SOC_INTEL_SOF_CS42L42_MACH) += snd-soc-sof_cs42l42.o
sound/soc/intel/boards/sof_sdw_common.h +0 -10
@@ -77,14 +77,4 @@ int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd);int sof_sdw_hdmi_card_late_probe (struct snd_soc_card *card); -/* MAXIM codec support */ -int asoc_sdw_maxim_init (struct snd_soc_card *card, -struct snd_soc_dai_link *dai_links, -struct asoc_sdw_codec_info *info, -bool playback); - -/* dai_link init callbacks */ - -int asoc_sdw_maxim_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); -#endif
sound/soc/sdw_utils/Makefile +2 -1
@@ -6,5 +6,6 @@ snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \ soc_sdw_rt_amp.o \ soc_sdw_bridge_cs35l56.o \ soc_sdw_cs42l42.o soc_sdw_cs42l43.o \ - soc_sdw_cs_amp.o + soc_sdw_cs_amp.o \ + soc_sdw_maxim.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o
sound/soc/sdw_utils/soc_sdw_maxim.c renamed from sound/soc/intel/boards/sof_sdw_maxim.c +9 -5
@@ -1,7 +1,9 @@// SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2020 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. // -// sof_sdw_maxim - Helpers to handle maxim codecs +// soc_sdw_maxim - Helpers to handle maxim codecs // codec devices from generic machine driver #include <linux/device.h>
@@ -10,7 +12,7 @@#include <sound/soc.h> #include <sound/soc-acpi.h> #include <sound/soc-dapm.h> -#include "sof_sdw_common.h" +#include <sound/soc_sdw_utils.h> static int maxim_part_id;#define SOC_SDW_PART_ID_MAX98363 0x8363
@@ -41,8 +43,9 @@ int asoc_sdw_maxim_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_return ret; } +EXPORT_SYMBOL_NS (asoc_sdw_maxim_spk_rtd_init,SND_SOC_SDW_UTILS ); -static int mx8373_enable_spk_pin (struct snd_pcm_substream *substream,bool enable) +static int asoc_sdw_mx8373_enable_spk_pin (struct snd_pcm_substream *substream,bool enable) {struct snd_soc_pcm_runtime *rtd =snd_soc_substream_to_rtd (substream);struct snd_soc_dai *codec_dai;
@@ -84,7 +87,7 @@ static int asoc_sdw_mx8373_prepare(struct snd_pcm_substream *substream)if (ret <0 )return ret; -return mx8373_enable_spk_pin (substream, true); +return asoc_sdw_mx8373_enable_spk_pin (substream, true); }static int asoc_sdw_mx8373_hw_free (struct snd_pcm_substream *substream)
@@ -96,7 +99,7 @@ static int asoc_sdw_mx8373_hw_free(struct snd_pcm_substream *substream)if (ret <0 )return ret; -return mx8373_enable_spk_pin (substream, false); +return asoc_sdw_mx8373_enable_spk_pin (substream, false); }static const struct snd_soc_ops max_98373_sdw_ops = {
@@ -142,3 +145,4 @@ int asoc_sdw_maxim_init(struct snd_soc_card *card, }return 0 ; } +EXPORT_SYMBOL_NS (asoc_sdw_maxim_init,SND_SOC_SDW_UTILS );
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 21/31 ASoC: intel/sdw_utils: move dai id common macros
In reply to Vijendar MukundaMove dai id common macros from intel SoundWire generic driver to soc_sdw_utils.h file so that it can be used by other platform machine driver.
--- include/sound/soc_sdw_utils.h | 7 +++++++ sound/soc/intel/boards/sof_sdw_common.h | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-)
include/sound/soc_sdw_utils.h +7 -0
@@ -29,6 +29,13 @@*/ #define SOC_SDW_SIDECAR_AMPS BIT(16) +#define SOC_SDW_UNUSED_DAI_ID -1 +#define SOC_SDW_JACK_OUT_DAI_ID 0 +#define SOC_SDW_JACK_IN_DAI_ID 1 +#define SOC_SDW_AMP_OUT_DAI_ID 2 +#define SOC_SDW_AMP_IN_DAI_ID 3 +#define SOC_SDW_DMIC_DAI_ID 4 +struct asoc_sdw_codec_info ;struct asoc_sdw_dai_info {
sound/soc/intel/boards/sof_sdw_common.h +0 -6
@@ -16,12 +16,6 @@#include "sof_hdmi_common.h" #define MAX_HDMI_NUM 4 -#define SOC_SDW_UNUSED_DAI_ID -1 -#define SOC_SDW_JACK_OUT_DAI_ID 0 -#define SOC_SDW_JACK_IN_DAI_ID 1 -#define SOC_SDW_AMP_OUT_DAI_ID 2 -#define SOC_SDW_AMP_IN_DAI_ID 3 -#define SOC_SDW_DMIC_DAI_ID 4#define SOC_SDW_MAX_CPU_DAIS 16#define SOC_SDW_INTEL_BIDIR_PDI_BASE 2
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 22/31 ASoC: intel/sdw_utils: move soundwire dai type macros
Move SoundWire dai type macros to common header file(soc_sdw_util.h). So that these macros will be used by other platform machine driver.
--- include/sound/soc_sdw_utils.h | 4 ++++ sound/soc/intel/boards/sof_sdw_common.h | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-)
include/sound/soc_sdw_utils.h +4 -0
@@ -36,6 +36,10 @@#define SOC_SDW_AMP_IN_DAI_ID 3#define SOC_SDW_DMIC_DAI_ID 4 +#define SOC_SDW_DAI_TYPE_JACK 0 +#define SOC_SDW_DAI_TYPE_AMP 1 +#define SOC_SDW_DAI_TYPE_MIC 2 +struct asoc_sdw_codec_info ;struct asoc_sdw_dai_info {
sound/soc/intel/boards/sof_sdw_common.h +0 -4
@@ -54,10 +54,6 @@ enum { (((quirk) << SOF_BT_OFFLOAD_SSP_SHIFT) & SOF_BT_OFFLOAD_SSP_MASK)#define SOF_SSP_BT_OFFLOAD_PRESENT BIT(18) -#define SOC_SDW_DAI_TYPE_JACK 0 -#define SOC_SDW_DAI_TYPE_AMP 1 -#define SOC_SDW_DAI_TYPE_MIC 2 -struct intel_mc_ctx {struct sof_hdmi_private hdmi;/* To store SDW Pin index for each SoundWire link */
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 23/31 ASoC: intel/sdw_utils: move soundwire codec_info_list structure
In reply to Vijendar MukundaSoundWire 'codec_info_list' structure is not a platform specific one. Move codec_info_list structure to common file soc_sdw_utils.c. Move codec helper functions which uses codec_info_list structure to common place holder and rename the function by adding _sdw tag. This will allow to use 'codec_info_list' structure and it's helper functions in other platform machine driver.
--- include/sound/soc_sdw_utils.h | 13 + sound/soc/intel/boards/sof_sdw.c | 658 +--------------------------- sound/soc/sdw_utils/soc_sdw_utils.c | 657 +++++++++++++++++++++++++++ 3 files changed, 676 insertions(+), 652 deletions(-)
include/sound/soc_sdw_utils.h +13 -0
@@ -90,8 +90,12 @@ struct asoc_sdw_mc_private {bool ignore_internal_dmic;void *private;unsigned long mc_quirk; +int codec_info_list_count; }; +extern struct asoc_sdw_codec_info codec_info_list[]; +int asoc_sdw_get_codec_info_list_count (void ); +int asoc_sdw_startup (struct snd_pcm_substream *substream);int asoc_sdw_prepare (struct snd_pcm_substream *substream);int asoc_sdw_prepare (struct snd_pcm_substream *substream);
@@ -106,6 +110,15 @@ const char *asoc_sdw_get_codec_name(struct device *dev,const struct snd_soc_acpi_link_adr *adr_link, int adr_index); +struct asoc_sdw_codec_info *asoc_sdw_find_codec_info_part (const u64 adr); + +struct asoc_sdw_codec_info *asoc_sdw_find_codec_info_acpi (const u8 *acpi_id); + +struct asoc_sdw_codec_info *asoc_sdw_find_codec_info_dai (const char *dai_name, +int *dai_index); + +int asoc_sdw_rtd_init (struct snd_soc_pcm_runtime *rtd); +/* DMIC support */ int asoc_sdw_dmic_init (struct snd_soc_pcm_runtime *rtd);
sound/soc/intel/boards/sof_sdw.c +6 -652
709 lines not on this page · raw message
sound/soc/sdw_utils/soc_sdw_utils.c +657 -0
663 lines not on this page · raw message
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 24/31 ASoC: intel/sdw_utils: move machine driver dai link helper functions
In reply to Vijendar MukundaMove machine driver dai link helper functions to common place holder, So that it can be used by other platform machine driver. Rename these functions with "asoc_sdw" tag as a prefix.
--- include/sound/soc_sdw_utils.h | 5 +++ sound/soc/intel/boards/sof_sdw.c | 54 ++--------------------------- sound/soc/sdw_utils/soc_sdw_utils.c | 52 +++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 52 deletions(-)
include/sound/soc_sdw_utils.h +5 -0
@@ -117,6 +117,11 @@ struct asoc_sdw_codec_info *asoc_sdw_find_codec_info_acpi(const u8 *acpi_id);struct asoc_sdw_codec_info *asoc_sdw_find_codec_info_dai (const char *dai_name,int *dai_index); +struct snd_soc_dai_link *asoc_sdw_mc_find_codec_dai_used (struct snd_soc_card *card, +const char *dai_name); + +void asoc_sdw_mc_dailink_exit_loop (struct snd_soc_card *card); +int asoc_sdw_rtd_init (struct snd_soc_pcm_runtime *rtd);/* DMIC support */
sound/soc/intel/boards/sof_sdw.c +2 -52
72 lines not on this page · raw message
sound/soc/sdw_utils/soc_sdw_utils.c +52 -0
57 lines not on this page · raw message
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 25/31 ASoC: sdw_utils: refactor sof_sdw_card_late_probe function
In reply to Vijendar MukundaRefactor sof_sdw_card_late_probe() function and derive a generic function soc_sdw_card_late_probe() function which can be used by SoundWire generic machine driver.
--- include/sound/soc_sdw_utils.h | 2 ++ sound/soc/intel/boards/sof_sdw.c | 12 +++--------- sound/soc/sdw_utils/soc_sdw_utils.c | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 9 deletions(-)
include/sound/soc_sdw_utils.h +2 -0
@@ -122,6 +122,8 @@ struct snd_soc_dai_link *asoc_sdw_mc_find_codec_dai_used(struct snd_soc_card *cavoid asoc_sdw_mc_dailink_exit_loop (struct snd_soc_card *card); +int asoc_sdw_card_late_probe (struct snd_soc_card *card); +int asoc_sdw_rtd_init (struct snd_soc_pcm_runtime *rtd);/* DMIC support */
sound/soc/intel/boards/sof_sdw.c +3 -9
@@ -1221,16 +1221,10 @@ static int sof_sdw_card_late_probe(struct snd_soc_card *card)struct asoc_sdw_mc_private *ctx =snd_soc_card_get_drvdata (card);struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;int ret =0 ; -int i; - -for (i =0 ; i < ctx->codec_info_list_count; i++) { -if (codec_info_list[i].codec_card_late_probe) { - ret = codec_info_list[i].codec_card_late_probe (card); -if (ret <0 ) -return ret; - } - } + ret =asoc_sdw_card_late_probe (card); +if (ret <0 ) +return ret;if (intel_ctx->hdmi.idisp_codec) ret =sof_sdw_hdmi_card_late_probe (card);
sound/soc/sdw_utils/soc_sdw_utils.c +16 -0
@@ -916,5 +916,21 @@ void asoc_sdw_mc_dailink_exit_loop(struct snd_soc_card *card) }EXPORT_SYMBOL_NS (asoc_sdw_mc_dailink_exit_loop,SND_SOC_SDW_UTILS ); +int asoc_sdw_card_late_probe (struct snd_soc_card *card) +{ +int ret =0 ; +int i; + +for (i =0 ; i <ARRAY_SIZE (codec_info_list); i++) { +if (codec_info_list[i].codec_card_late_probe) { + ret = codec_info_list[i].codec_card_late_probe (card); +if (ret <0 ) +return ret; + } + } +return ret; +} +EXPORT_SYMBOL_NS (asoc_sdw_card_late_probe,SND_SOC_SDW_UTILS ); +MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("SoundWire ASoC helpers" );
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 26/31 ASoC: intel/sdw_utils: refactor init_dai_link() and init_simple_dai_link()
In reply to Vijendar MukundaTo make it generic, refactor existing implementation for init_dai_link() and init_simple_dai_link() as mentioned below.
- Move init_dai_link() and init_simple_dai_link() to common place holder
- Rename the functions with "asoc_sdw" as prefix.
- Pass the platform specific 'platform_component' structure and its size as arguments for init_simple_dai_link() function and allocate one more extra dlc for platform component.
- Pass the 'platform_component' and 'num_platforms' as arguments for init_dai_link().
--- include/sound/soc_sdw_utils.h | 16 +++++ sound/soc/intel/boards/sof_sdw.c | 105 +++++++++------------------- sound/soc/sdw_utils/soc_sdw_utils.c | 54 ++++++++++++++ 3 files changed, 104 insertions(+), 71 deletions(-)
include/sound/soc_sdw_utils.h +16 -0
@@ -124,6 +124,22 @@ void asoc_sdw_mc_dailink_exit_loop(struct snd_soc_card *card);int asoc_sdw_card_late_probe (struct snd_soc_card *card); +void asoc_sdw_init_dai_link (struct device *dev,struct snd_soc_dai_link *dai_links, +int *be_id,char *name,int playback,int capture, +struct snd_soc_dai_link_component *cpus,int cpus_num, +struct snd_soc_dai_link_component *platform_component, +int num_platforms,struct snd_soc_dai_link_component *codecs, +int codecs_num,int (*init)(struct snd_soc_pcm_runtime *rtd), +const struct snd_soc_ops *ops); + +int asoc_sdw_init_simple_dai_link (struct device *dev,struct snd_soc_dai_link *dai_links, +int *be_id,char *name,int playback,int capture, +const char *cpu_dai_name,const char *platform_comp_name, +int num_platforms,const char *codec_name, +const char *codec_dai_name, +int (*init)(struct snd_soc_pcm_runtime *rtd), +const struct snd_soc_ops *ops); +int asoc_sdw_rtd_init (struct snd_soc_pcm_runtime *rtd);/* DMIC support */
sound/soc/intel/boards/sof_sdw.c +34 -71
146 lines not on this page · raw message
sound/soc/sdw_utils/soc_sdw_utils.c +54 -0
59 lines not on this page · raw message
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 27/31 ASoC: soc-acpi: add pci revision id field in mach params structure
In reply to Vijendar MukundaFew IP's may have same PCI vendor id and device id and different revision id. Add revision id field to the 'snd_soc_acpi_mach_params' so that using this field platform specific implementation can be added in machine driver.
--- include/sound/soc-acpi.h | 2 ++ 1 file changed, 2 insertions(+)
include/sound/soc-acpi.h +2 -0
@@ -70,6 +70,7 @@ static inline struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)* @dai_drivers: pointer to dai_drivers, used e.g. in nocodec mode * @subsystem_vendor: optional PCI SSID vendor value * @subsystem_device: optional PCI SSID device value +* @subsystem_rev: optional PCI SSID revision value * @subsystem_id_set: true if a value has been written to * subsystem_vendor and subsystem_device. */
@@ -86,6 +87,7 @@ struct snd_soc_acpi_mach_params {struct snd_soc_dai_driver *dai_drivers;unsigned short subsystem_vendor;unsigned short subsystem_device; +unsigned short subsystem_rev;bool subsystem_id_set; };
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 28/31 ASoC: amd: acp: add soundwire machines for acp6.3 based platform
In reply to Vijendar MukundaAdd Soundwire machines for acp6.3 based platform.
--- sound/soc/amd/acp/Kconfig | 4 ++ sound/soc/amd/acp/Makefile | 2 + sound/soc/amd/acp/amd-acp63-acpi-match.c | 90 ++++++++++++++++++++++++ sound/soc/amd/mach-config.h | 1 + sound/soc/sof/amd/Kconfig | 1 + 5 files changed, 98 insertions(+) create mode 100644 sound/soc/amd/acp/amd-acp63-acpi-match.c
sound/soc/amd/acp/Kconfig +4 -0
@@ -13,6 +13,10 @@ config SND_SOC_AMD_ACP_COMMON This option enables common modules for Audio-Coprocessor i.e. ACP IP block on AMD platforms. +config SND_SOC_ACPI_AMD_MATCH + tristate + select SND_SOC_ACPI if ACPI + if SND_SOC_AMD_ACP_COMMON config SND_SOC_AMD_ACP_PDM
sound/soc/amd/acp/Makefile +2 -0
@@ -22,6 +22,7 @@ snd-acp70-y := acp70.o snd-acp-mach-y := acp-mach-common.o snd-acp-legacy-mach-y := acp-legacy-mach.o acp3x-es83xx/acp3x-es83xx.o snd-acp-sof-mach-y := acp-sof-mach.o +snd-soc-acpi-amd-match-y := amd-acp63-acpi-match.o obj-$(CONFIG_SND_SOC_AMD_ACP_PCM) += snd-acp-pcm.o obj-$(CONFIG_SND_SOC_AMD_ACP_I2S) += snd-acp-i2s.o
@@ -38,3 +39,4 @@ obj-$(CONFIG_SND_AMD_SOUNDWIRE_ACPI) += snd-amd-sdw-acpi.o obj-$(CONFIG_SND_SOC_AMD_MACH_COMMON) += snd-acp-mach.o obj-$(CONFIG_SND_SOC_AMD_LEGACY_MACH) += snd-acp-legacy-mach.o obj-$(CONFIG_SND_SOC_AMD_SOF_MACH) += snd-acp-sof-mach.o +obj-$(CONFIG_SND_SOC_ACPI_AMD_MATCH) += snd-soc-acpi-amd-match.o
sound/soc/amd/acp/amd-acp63-acpi-match.c new file +90 -0
90 lines not on this page · raw message
sound/soc/amd/mach-config.h +1 -0
@@ -23,6 +23,7 @@ extern struct snd_soc_acpi_mach snd_soc_acpi_amd_sof_machines[];extern struct snd_soc_acpi_mach snd_soc_acpi_amd_rmb_sof_machines[];extern struct snd_soc_acpi_mach snd_soc_acpi_amd_vangogh_sof_machines[];extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_sof_machines[]; +extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_sof_sdw_machines[];struct config_entry {u32 flags;
sound/soc/sof/amd/Kconfig +1 -0
@@ -23,6 +23,7 @@ config SND_SOC_SOF_AMD_COMMON select SND_AMD_ACP_CONFIG select SND_SOC_SOF_XTENSA select SND_SOC_SOF_ACP_PROBES + select SND_SOC_ACPI_AMD_MATCH select SND_SOC_ACPI if ACPI help This option is not user-selectable but automatically handled by
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 29/31 ASoC: SOF: amd: add alternate machines for acp6.3 based platform
In reply to Vijendar MukundaAdd SoundWire machines as alternate machines for acp6.3 based platform.
--- sound/soc/sof/amd/pci-acp63.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/sof/amd/pci-acp63.c +1 -0
@@ -48,6 +48,7 @@ static const struct sof_amd_acp_desc acp63_chip_info = {static const struct sof_dev_desc acp63_desc = { .machines = snd_soc_acpi_amd_acp63_sof_machines, + .alt_machines = snd_soc_acpi_amd_acp63_sof_sdw_machines, .resindex_lpe_base =0 , .resindex_pcicfg_base =-1 , .resindex_imr_base =-1 ,
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 30/31 ASoC: SOF: amd: update mach params subsystem_rev variable
In reply to Vijendar MukundaAdd pci_rev variable in acp sof driver private data structure and assign this value to mach_params structure subsystem_rev variable.
--- sound/soc/sof/amd/acp-common.c | 3 +++ sound/soc/sof/amd/acp.c | 1 + sound/soc/sof/amd/acp.h | 1 + 3 files changed, 5 insertions(+)
sound/soc/sof/amd/acp-common.c +3 -0
@@ -153,6 +153,7 @@ static struct snd_soc_acpi_mach *amd_sof_sdw_machine_select(struct snd_sof_dev *break ; }if (mach && mach->link_mask) { + mach->mach_params.subsystem_rev = acp_data->pci_rev; mach->mach_params.links = mach->links; mach->mach_params.link_mask = mach->link_mask; mach->mach_params.platform =dev_name (sdev->dev);
@@ -173,6 +174,7 @@ static struct snd_soc_acpi_mach *amd_sof_sdw_machine_select(struct snd_sof_dev *struct snd_soc_acpi_mach *amd_sof_machine_select (struct snd_sof_dev *sdev) {struct snd_sof_pdata *sof_pdata = sdev->pdata; +struct acp_dev_data *acp_data = sdev->pdata->hw_pdata;const struct sof_dev_desc *desc = sof_pdata->desc;struct snd_soc_acpi_mach *mach =NULL ;
@@ -186,6 +188,7 @@ struct snd_soc_acpi_mach *amd_sof_machine_select(struct snd_sof_dev *sdev) } } + mach->mach_params.subsystem_rev = acp_data->pci_rev; sof_pdata->tplg_filename = mach->sof_tplg_filename; sof_pdata->fw_filename = mach->fw_filename;
sound/soc/sof/amd/acp.c +1 -0
@@ -695,6 +695,7 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev)pci_set_master (pci); adata->addr = addr; adata->reg_range = chip->reg_end_addr - chip->reg_start_addr; + adata->pci_rev = pci->revision;mutex_init (&adata->acp_lock); sdev->pdata->hw_pdata = adata; adata->smn_dev =pci_get_device (PCI_VENDOR_ID_AMD , chip->host_bridge_id,NULL );
sound/soc/sof/amd/acp.h +1 -0
@@ -251,6 +251,7 @@ struct acp_dev_data {bool is_dram_in_use;bool is_sram_in_use;bool sdw_en_stat; +unsigned int pci_rev; };void memcpy_to_scratch (struct snd_sof_dev *sdev,u32 offset,unsigned int *src,size_t bytes);
Signature · 1 line
2.34.1
Vijendar Mukunda
maintainerPATCH RESEND 31/31 ASoC: amd/sdw_utils: add sof based soundwire generic machine driver
In reply to Vijendar MukundaAdd sof based Soundwire generic driver for amd platforms. Currently support added for ACP6.3 based platforms.
--- sound/soc/amd/acp/Kconfig | 18 + sound/soc/amd/acp/Makefile | 2 + sound/soc/amd/acp/acp-sdw-sof-mach.c | 742 +++++++++++++++++++++++++ sound/soc/amd/acp/soc_amd_sdw_common.h | 44 ++ 4 files changed, 806 insertions(+) create mode 100644 sound/soc/amd/acp/acp-sdw-sof-mach.c create mode 100644 sound/soc/amd/acp/soc_amd_sdw_common.h
sound/soc/amd/acp/Kconfig +18 -0
@@ -119,6 +119,24 @@ config SND_SOC_AMD_SOF_MACH help This option enables SOF sound card support for ACP audio. +config SND_SOC_AMD_SOF_SDW_MACH + tristate "AMD SOF Soundwire Machine Driver Support" + depends on X86 && PCI && ACPI + depends on SOUNDWIRE + select SND_SOC_SDW_UTILS + select SND_SOC_DMIC + select SND_SOC_RT711_SDW + select SND_SOC_RT711_SDCA_SDW + select SND_SOC_RT1316_SDW + select SND_SOC_RT715_SDW + select SND_SOC_RT715_SDCA_SDW + help + This option enables SOF sound card support for SoundWire enabled + AMD platforms along with ACP PDM controller. + Say Y if you want to enable SoundWire based machine driver support + on AMD platform. + If unsure select "N". + endif # SND_SOC_AMD_ACP_COMMON config SND_AMD_SOUNDWIRE_ACPI
sound/soc/amd/acp/Makefile +2 -0
@@ -23,6 +23,7 @@ snd-acp-mach-y := acp-mach-common.o snd-acp-legacy-mach-y := acp-legacy-mach.o acp3x-es83xx/acp3x-es83xx.o snd-acp-sof-mach-y := acp-sof-mach.o snd-soc-acpi-amd-match-y := amd-acp63-acpi-match.o +snd-acp-sdw-sof-mach-y += acp-sdw-sof-mach.o obj-$(CONFIG_SND_SOC_AMD_ACP_PCM) += snd-acp-pcm.o obj-$(CONFIG_SND_SOC_AMD_ACP_I2S) += snd-acp-i2s.o
@@ -40,3 +41,4 @@ obj-$(CONFIG_SND_SOC_AMD_MACH_COMMON) += snd-acp-mach.o obj-$(CONFIG_SND_SOC_AMD_LEGACY_MACH) += snd-acp-legacy-mach.o obj-$(CONFIG_SND_SOC_AMD_SOF_MACH) += snd-acp-sof-mach.o obj-$(CONFIG_SND_SOC_ACPI_AMD_MATCH) += snd-soc-acpi-amd-match.o +obj-$(CONFIG_SND_SOC_AMD_SOF_SDW_MACH) += snd-acp-sdw-sof-mach.o
sound/soc/amd/acp/acp-sdw-sof-mach.c new file +742 -0
742 lines not on this page · raw message
sound/soc/amd/acp/soc_amd_sdw_common.h new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH RESEND 31/31] ASoC: amd/sdw_utils: add sof based soundwire generic machine driver
Quoted 3 lines · Vijendar Mukunda
Add sof based Soundwire generic driver for amd platforms. Currently support added for ACP6.3 based platforms.
...
Quoted 12 lines
sound/soc/amd/acp/acp-sdw-sof-mach.c new file +12
-0+static const struct platform_device_id mc_id_table[] = { + {"amd_sof_sdw" , }, + {} +}; +MODULE_DEVICE_TABLE (platform, mc_id_table); + +static struct platform_driver sof_sdw_driver = { + .driver = { + .name ="amd_sof_sdw" , + .pm = &snd_soc_pm_ops, + }, + .probe = mc_probe,
sound/soc/amd/acp/acp-sdw-sof-mach.c line 741
Quoted 10 lines
sound/soc/amd/acp/acp-sdw-sof-mach.c new file +10
-0+ .remove_new = mc_remove, + .id_table = mc_id_table, +}; + +module_platform_driver (sof_sdw_driver); + +MODULE_DESCRIPTION ("ASoC AMD SoundWire Generic Machine driver" ); +MODULE_AUTHOR ("Vijendar Mukunda <[email protected]" ); +MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:amd_sof_sdw" );
That's a total duplicate... standard form letter:
You should not need MODULE_ALIAS() in normal cases. If you need it, usually it means your device ID table is wrong (e.g. misses either entries or MODULE_DEVICE_TABLE()). MODULE_ALIAS() is not a substitute for incomplete ID table.
Best regards,
Krzysztof
Mukunda,Vijendar
maintainerRe: [PATCH RESEND 31/31] ASoC: amd/sdw_utils: add sof based soundwire generic machine driver
Quoted 30 lines · Krzysztof Kozlowski
Quoted 3 lines · Vijendar Mukunda
Add sof based Soundwire generic driver for amd platforms. Currently support added for ACP6.3 based platforms.
...
Quoted 12 lines
sound/soc/amd/acp/acp-sdw-sof-mach.c new file +12
-0+static const struct platform_device_id mc_id_table[] = { + {"amd_sof_sdw" , }, + {} +}; +MODULE_DEVICE_TABLE (platform, mc_id_table); + +static struct platform_driver sof_sdw_driver = { + .driver = { + .name ="amd_sof_sdw" , + .pm = &snd_soc_pm_ops, + }, + .probe = mc_probe,sound/soc/amd/acp/acp-sdw-sof-mach.c line 741
Quoted 10 lines
sound/soc/amd/acp/acp-sdw-sof-mach.c new file +10
-0+ .remove_new = mc_remove, + .id_table = mc_id_table, +}; + +module_platform_driver (sof_sdw_driver); + +MODULE_DESCRIPTION ("ASoC AMD SoundWire Generic Machine driver" ); +MODULE_AUTHOR ("Vijendar Mukunda <[email protected]" ); +MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:amd_sof_sdw" );That's a total duplicate... standard form letter:
Quoted 4 lines
You should not need
MODULE_ALIAS()in normal cases. If you need it, usually it means your device ID table is wrong (e.g. misses either entries orMODULE_DEVICE_TABLE()).MODULE_ALIAS()is not a substitute for incomplete ID table.
Agreed. Will remove MODULE_ALIAS().
Quoted 5 lines
Best regards,
Krzysztof
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mukunda,Vijendar
maintainerQuoted 28 lines · Charles Keepax
Quoted 15 lines · Vijendar Mukunda
This patch series majorly consists of below changes.
- Rename structures, macros and codec helper names used in Intel SoundWire generic driver to make it generic.
- Move Intel SoundWire driver common structures, macros and codec helper functions to common placeholder so that it can be used by other platform machine driver.
- Refactor few SoundWire common codec helper functions.
- AMD SOF based generic SoundWire machine driver for ACP 6.3 variant.This work started a couple of months ago to avoid duplication of code that wasn't really Intel-specific in the "
sof_sdw" machine driver. The code went through multiple iterations, was tested for multiple weeks and a couple of build issues reported by the Intel kbuild bots were corrected.Quoted 8 lines
This is the initial version of SoundWire machine driver for AMD platforms. Additional code refactoring will be done in the next step on the AMD side.
Would be good to also include the linux-sound mailing list on the cover letter, if not the individuals given they are basically the same on each patch.
Quoted 7 lines
Also assuming your mail timed out again, you should be able to do a separate git send-email for the later patches using the --in-reply-to option to give the Message-ID of the cover letter and they should append to the same chain.
Thanks,
Charles
Thanks, Charles, for your suggestion. I have shared the rest of the Patch series.
-
Vijendar
Mark Brown
maintainerQuoted 10 lines · Vijendar Mukunda
This patch series majorly consists of below changes.
- Rename structures, macros and codec helper names used in Intel SoundWire generic driver to make it generic.
- Move Intel SoundWire driver common structures, macros and codec helper functions to common placeholder so that it can be used by other platform machine driver.
- Refactor few SoundWire common codec helper functions.
- AMD SOF based generic SoundWire machine driver for ACP 6.3 variant.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[01/31] ASoC: intel: rename codec_info and dai_info structures names
commit: 6588fcc8833d8338b994edd97a4446bae95ff12c
[02/31] ASoC: intel: rename soundwire common header macros
commit: 408a454ee8886912cc8a64fcd012e0a1eb30fd0b
[03/31] ASoC: intel: rename soundwire machine driver soc ops
commit: 96990cfeff61d0a1053dded6d1a4dceafb2f1562
[04/31] ASoC: intel: rename soundwire codec helper functions
commit: bd5838c8999838059a25a963730bba1face1e53b
[05/31] ASoC: intel: rename maxim codec macros
commit: a2b5ec0ca5fcd6f609733b37c52e23ddb7328ffd
[06/31] ASoC: intel: rename ignore_pch_dmic variable name
commit: b1f7cbf0d5746ba270bc090f6f85a4b176410854
[07/31] ASoC: intel/sdw-utils: move soundwire machine driver soc ops
commit: d39388e6555cb805beb985a7ece1c771c611037c
[08/31] ASoC: intel: move soundwire machine driver common structures
commit: 73619137c633a89a90f8c8c5fa59171aaff6e913
[09/31] ASoC: intel/sdw_utils: move soundwire machine driver helper functions
commit: 941d6933eb31b13d09a7293bc92d9d494513a372
[10/31] ASoC: intel/sdw_utils: move dmic codec helper function
commit: 4776d0c9088634677749e42ae8b36b4da46226db
[11/31] ASoC: intel/sdw_utils: move rtk dmic helper functions
commit: a9831fd1c0e6353366bbde6e1dd7b15a2dd6d825
[12/31] ASoC: intel/sdw_utils: move rt712 sdca helper functions
commit: 09c60bc9da91f188e2aedb0bac94d3e129fa20f9
[13/31] ASoC: intel/sdw_utils: move rt722 sdca helper functions
commit: 89b3456e9afa4c61879f6d744f6d2c6fadc2b2fc
[14/31] ASoC: intel: split soundwire machine driver private data
commit: 4f54856b4ea460e9048c11e3f698c38fb072529d
[15/31] ASoC: intel/sdw_utils: move rt5682 codec helper function
commit: 139e17740200d8e92677942bfee6c8cfe4da3009
[16/31] ASoC: intel/sdw_utils: move rtk jack common helper functions
commit: da5b1831673208e235cadc9107207adb092c2eb9
[17/31] ASoC: intel/sdw_utils: move rt700 and rt711 codec helper functions
commit: 8e84fd22dc425fd0b005a20156eeb67f019ae39f
[18/31] ASoC: intel/sdw_utils: move rtk amp codec helper functions
commit: ccc96ae2814a7faad591af68bd0115e4d2b256b4
[19/31] ASoC: intel/sdw_utils: move cirrus soundwire codec helper functions
commit: 5fa46627d5118bf58b80df45489f49e1e316473a
[20/31] ASoC: intel/sdw_utils: move maxim codec helper functions
commit: 051b7cb3fde16fd8788078d697d84069b0e50e03
[21/31] ASoC: intel/sdw_utils: move dai id common macros
commit: 8f87e292a34813e4551e1513c62b7222900481cb
[22/31] ASoC: intel/sdw_utils: move soundwire dai type macros
commit: 6e7af1fdf7da7f0b79475f573d3c1f49a826bd68
[23/31] ASoC: intel/sdw_utils: move soundwire codec_info_list structure
commit: e377c94773171e8a97e716e57ec67d49b02ded0b
[24/31] ASoC: intel/sdw_utils: move machine driver dai link helper functions
commit: 778dcb08832a5e526e447971f7ca72cb6dd2307b
[25/31] ASoC: sdw_utils: refactor sof_sdw_card_late_probe function
commit: 5bd414c7b80e39ef11bd86db76e726962c1bfc92
[26/31] ASoC: intel/sdw_utils: refactor init_dai_link() and init_simple_dai_link()
commit: 59f8b622d52e30c5be7f14212c26ca37e810ece9
[27/31] ASoC: soc-acpi: add pci revision id field in mach params structure
commit: 0b8f009ae92fa94ab3c0ca881fce02c336056a73
[28/31] ASoC: amd: acp: add soundwire machines for acp6.3 based platform
commit: 57677ccde7522170c50eb44258d54c6584356f47
[29/31] ASoC: SOF: amd: add alternate machines for acp6.3 based platform
commit: 15049b6a6c19d799095e5dbe9a4772862b11ee23
[30/31] ASoC: SOF: amd: update mach params subsystem_rev variable
commit: b7cdb4a89cc864ead6470a57947815c49870b09a
[31/31] ASoC: amd/sdw_utils: add sof based soundwire generic machine driver
commit: cb8ea62e6402067ba092d4c1d66a9440513a572bAll being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark