alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [alsa-devel] [PATCH 3/3] ASoC: SOF: Intel: hda: use fallback for firmware name
Date: Mon, 11 Nov 2019 16:29:01 -0600	[thread overview]
Message-ID: <20191111222901.19892-4-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20191111222901.19892-1-pierre-louis.bossart@linux.intel.com>

We have platforms such as CFL with no known I2S codec being used, and
the ACPI tables are currently empty, so fall-back to using the
firmware filename used in nocodec mode

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/sof/intel/hda.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 7dc0018dc4c3..91bd88fddac7 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -415,9 +415,16 @@ static int hda_init_caps(struct snd_sof_dev *sdev)
 			pdata->tplg_filename =
 				hda_mach->sof_tplg_filename;
 
-			/* firmware: pick the first in machine list */
+			/*
+			 * firmware: pick the first in machine list,
+			 * or use nocodec firmware name if list is empty
+			 */
 			mach = pdata->desc->machines;
-			pdata->fw_filename = mach->sof_fw_filename;
+			if (mach->id[0])
+				pdata->fw_filename = mach->sof_fw_filename;
+			else
+				pdata->fw_filename =
+					pdata->desc->nocodec_fw_filename;
 
 			dev_info(bus->dev, "using HDA machine driver %s now\n",
 				 hda_mach->drv_name);
-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2019-11-11 22:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 22:28 [alsa-devel] [PATCH 0/3] ASoC: Intel/SOF: split CFL, CNL, CML firmware names Pierre-Louis Bossart
2019-11-11 22:28 ` [alsa-devel] [PATCH 1/3] ASoC: Intel: acpi-match: split CNL tables in three Pierre-Louis Bossart
2019-11-12 17:16   ` [alsa-devel] Applied "ASoC: Intel: acpi-match: split CNL tables in three" to the asoc tree Mark Brown
2019-11-11 22:29 ` [alsa-devel] [PATCH 2/3] ASoC: SOF: Intel: Fix CFL and CML FW nocodec binary names Pierre-Louis Bossart
2019-11-12 17:16   ` [alsa-devel] Applied "ASoC: SOF: Intel: Fix CFL and CML FW nocodec binary names." to the asoc tree Mark Brown
2019-11-18 17:48   ` Mark Brown
2019-11-11 22:29 ` Pierre-Louis Bossart [this message]
2019-11-12 17:16   ` [alsa-devel] Applied "ASoC: SOF: Intel: hda: use fallback for firmware name" " 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=20191111222901.19892-4-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=tiwai@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).