Unverified Commit c3c5ac4b authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Intel: updates for 6.10 - part7

Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

This patchset should be the last batch for this kernel cycle!

Brent Lu continued his cleanups to refactor and use fewer machine
drivers on Chrmebooks.

Bard Liao updated the sof-sdw machine driver to deal with UCM support
of the RT712 configuration. Note that this sof-sdw driver will be
refactored in the next kernel cycle to allow AMD and others to reuse
common SoundWire parts that are not Intel-specific. Initial changes
are described here: https://github.com/thesofproject/linux/pull/4967
parents c8bdf9e7 4c11132a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -681,7 +681,6 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH
	select SND_SOC_CS35L56_SDW
	select SND_SOC_DMIC
	select SND_SOC_INTEL_HDA_DSP_COMMON
	select SND_SOC_INTEL_SOF_MAXIM_COMMON
	imply SND_SOC_SDW_MOCKUP
	help
	  Add support for Intel SoundWire-based platforms connected to
+2 −3
Original line number Diff line number Diff line
@@ -275,9 +275,8 @@ sof_card_dai_links_create(struct device *dev, struct snd_soc_card *card,
		max_98360a_dai_link(ctx->amp_link);
		break;
	case CODEC_MAX98373:
		ctx->amp_link->codecs = max_98373_components;
		ctx->amp_link->num_codecs = ARRAY_SIZE(max_98373_components);
		ctx->amp_link->init = max_98373_spk_codec_init;
		max_98373_dai_link(dev, ctx->amp_link);

		if (ctx->da7219.is_jsl_board) {
			ctx->amp_link->ops = &max98373_ops; /* use local ops */
		} else {
+17 −10
Original line number Diff line number Diff line
@@ -39,14 +39,16 @@ static unsigned int get_num_codecs(const char *hid)
	return dev_num;
}

/*
 * Maxim MAX98373
 */
#define MAX_98373_PIN_NAME 16

const struct snd_soc_dapm_route max_98373_dapm_routes[] = {
static const struct snd_soc_dapm_route max_98373_dapm_routes[] = {
	/* speaker */
	{ "Left Spk", NULL, "Left BE_OUT" },
	{ "Right Spk", NULL, "Right BE_OUT" },
};
EXPORT_SYMBOL_NS(max_98373_dapm_routes, SND_SOC_INTEL_SOF_MAXIM_COMMON);

static struct snd_soc_codec_conf max_98373_codec_conf[] = {
	{
@@ -59,7 +61,7 @@ static struct snd_soc_codec_conf max_98373_codec_conf[] = {
	},
};

struct snd_soc_dai_link_component max_98373_components[] = {
static struct snd_soc_dai_link_component max_98373_components[] = {
	{  /* For Right */
		.name = MAX_98373_DEV0_NAME,
		.dai_name = MAX_98373_CODEC_DAI,
@@ -69,7 +71,6 @@ struct snd_soc_dai_link_component max_98373_components[] = {
		.dai_name = MAX_98373_CODEC_DAI,
	},
};
EXPORT_SYMBOL_NS(max_98373_components, SND_SOC_INTEL_SOF_MAXIM_COMMON);

static int max_98373_hw_params(struct snd_pcm_substream *substream,
			       struct snd_pcm_hw_params *params)
@@ -96,7 +97,7 @@ static int max_98373_hw_params(struct snd_pcm_substream *substream,
	return 0;
}

int max_98373_trigger(struct snd_pcm_substream *substream, int cmd)
static int max_98373_trigger(struct snd_pcm_substream *substream, int cmd)
{
	struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
	struct snd_soc_dai *codec_dai;
@@ -139,15 +140,13 @@ int max_98373_trigger(struct snd_pcm_substream *substream, int cmd)

	return ret;
}
EXPORT_SYMBOL_NS(max_98373_trigger, SND_SOC_INTEL_SOF_MAXIM_COMMON);

struct snd_soc_ops max_98373_ops = {
static const struct snd_soc_ops max_98373_ops = {
	.hw_params = max_98373_hw_params,
	.trigger = max_98373_trigger,
};
EXPORT_SYMBOL_NS(max_98373_ops, SND_SOC_INTEL_SOF_MAXIM_COMMON);

int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd)
static int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd)
{
	struct snd_soc_card *card = rtd->card;
	unsigned int num_codecs = get_num_codecs(MAX_98373_ACPI_HID);
@@ -186,7 +185,15 @@ int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd)

	return ret;
}
EXPORT_SYMBOL_NS(max_98373_spk_codec_init, SND_SOC_INTEL_SOF_MAXIM_COMMON);

void max_98373_dai_link(struct device *dev, struct snd_soc_dai_link *link)
{
	link->codecs = max_98373_components;
	link->num_codecs = ARRAY_SIZE(max_98373_components);
	link->init = max_98373_spk_codec_init;
	link->ops = &max_98373_ops;
}
EXPORT_SYMBOL_NS(max_98373_dai_link, SND_SOC_INTEL_SOF_MAXIM_COMMON);

void max_98373_set_codec_conf(struct snd_soc_card *card)
{
+1 −6
Original line number Diff line number Diff line
@@ -20,13 +20,8 @@
#define MAX_98373_DEV0_NAME	"i2c-" MAX_98373_ACPI_HID ":00"
#define MAX_98373_DEV1_NAME	"i2c-" MAX_98373_ACPI_HID ":01"

extern struct snd_soc_dai_link_component max_98373_components[2];
extern struct snd_soc_ops max_98373_ops;
extern const struct snd_soc_dapm_route max_98373_dapm_routes[];

int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd);
void max_98373_dai_link(struct device *dev, struct snd_soc_dai_link *link);
void max_98373_set_codec_conf(struct snd_soc_card *card);
int max_98373_trigger(struct snd_pcm_substream *substream, int cmd);

/*
 * Maxim MAX98390
+1 −4
Original line number Diff line number Diff line
@@ -213,10 +213,7 @@ sof_card_dai_links_create(struct device *dev, struct snd_soc_card *card,
		max_98360a_dai_link(ctx->amp_link);
		break;
	case CODEC_MAX98373:
		ctx->amp_link->codecs = max_98373_components;
		ctx->amp_link->num_codecs = ARRAY_SIZE(max_98373_components);
		ctx->amp_link->init = max_98373_spk_codec_init;
		ctx->amp_link->ops = &max_98373_ops;
		max_98373_dai_link(dev, ctx->amp_link);
		break;
	case CODEC_NAU8318:
		nau8318_set_dai_link(ctx->amp_link);
Loading