All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: Libin Yang <libin.yang@intel.com>,
	Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
	kai.vehmanen@linux.intel.com, lgirdwood@gmail.com,
	pierre-louis.bossart@linux.intel.com,
	ranjani.sridharan@linux.intel.com, daniel.baluta@nxp.com,
	Bard Liao <bard.liao@intel.com>
Subject: [PATCH 1/3] ASoC: SOF: allow soundwire use desc->default_fw_filename
Date: Mon, 25 Jan 2021 09:04:58 +0200	[thread overview]
Message-ID: <20210125070500.807474-1-kai.vehmanen@linux.intel.com> (raw)

From: Libin Yang <libin.yang@intel.com>

The old code always uses sof_fw_filename in struct snd_soc_acpi_mach
as the firmware name. However, firmware name should depend on the platform
instead of the machine. For example, different machines may use the same
soundwire link topology, but they are using the different firmware. In this
case, it's hard to determine in struct snd_soc_acpi_mach which firmware it
should use.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/soc/sof/intel/hda.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 7e703ce22fcd..d99a552eea53 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -1169,7 +1169,10 @@ static int hda_sdw_machine_select(struct snd_sof_dev *sdev)
 			mach->mach_params.links = mach->links;
 			mach->mach_params.link_mask = mach->link_mask;
 			mach->mach_params.platform = dev_name(sdev->dev);
-			pdata->fw_filename = mach->sof_fw_filename;
+			if (mach->sof_fw_filename)
+				pdata->fw_filename = mach->sof_fw_filename;
+			else
+				pdata->fw_filename = pdata->desc->default_fw_filename;
 			pdata->tplg_filename = mach->sof_tplg_filename;
 		} else {
 			dev_info(sdev->dev,
-- 
2.29.2


             reply	other threads:[~2021-01-25  7:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25  7:04 Kai Vehmanen [this message]
2021-01-25  7:04 ` [PATCH 2/3] ASoC: Intel: tgl: remove sof_fw_filename set for tgl_3_in_1_default Kai Vehmanen
2021-01-26 16:43   ` Jaroslav Kysela
2021-01-25  7:05 ` [PATCH 3/3] ASoC: Intel: adl: remove sof_fw_filename setting in ADL snd_soc_acpi_mach Kai Vehmanen
2021-01-26 16:42 ` [PATCH 1/3] ASoC: SOF: allow soundwire use desc->default_fw_filename Jaroslav Kysela
2021-01-27 17:13 ` (subset) " Mark Brown
2021-01-27 17:45 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210125070500.807474-1-kai.vehmanen@linux.intel.com \
    --to=kai.vehmanen@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bard.liao@intel.com \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=libin.yang@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.