From: Baojun Xu <baojun.xu@ti.com>
To: <tiwai@suse.de>
Cc: <robh+dt@kernel.org>, <andriy.shevchenko@linux.intel.com>,
<lgirdwood@gmail.com>, <perex@perex.cz>, <shenghao-ding@ti.com>,
<navada@ti.com>, <13916275206@139.com>, <v-hampiholi@ti.com>,
<v-po@ti.com>, <linux-sound@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <liam.r.girdwood@intel.com>,
<yung-chuan.liao@linux.intel.com>, <baojun.xu@ti.com>,
<broonie@kernel.org>, <antheas.dk@gmail.com>,
<stuart.a.hayhurst@gmail.com>
Subject: [PATCH v1] ALSA: hda/tas2781: Ignore SUBSYS_ID not found for tas2563 projects
Date: Mon, 30 Dec 2024 14:49:10 +0800 [thread overview]
Message-ID: <20241230064910.1583-1-baojun.xu@ti.com> (raw)
Driver will return error if no SUBSYS_ID found in BIOS(acpi).
It will cause error in tas2563 projects, which have no SUBSYS_ID.
Signed-off-by: Baojun Xu <baojun.xu@ti.com>
---
sound/pci/hda/tas2781_hda_i2c.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index 0af015806aba..0e42b87dadb8 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -142,6 +142,9 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
}
sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev));
if (IS_ERR(sub)) {
+ /* No subsys id in older tas2563 projects. */
+ if (!strncmp(hid, "INT8866", sizeof("INT8866")))
+ goto end_2563;
dev_err(p->dev, "Failed to get SUBSYS ID.\n");
ret = PTR_ERR(sub);
goto err;
@@ -164,6 +167,7 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
p->speaker_id = NULL;
}
+end_2563:
acpi_dev_free_resource_list(&resources);
strscpy(p->dev_name, hid, sizeof(p->dev_name));
put_device(physdev);
--
2.43.0
next reply other threads:[~2024-12-30 6:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-30 6:49 Baojun Xu [this message]
2024-12-30 10:40 ` [PATCH v1] ALSA: hda/tas2781: Ignore SUBSYS_ID not found for tas2563 projects Takashi Iwai
2025-01-13 8:37 ` Andy Shevchenko
2025-01-13 8:45 ` [EXTERNAL] " Xu, Baojun
-- strict thread matches above, loose matches on Subject: below --
2025-01-11 9:57 Baojun Xu
2025-01-12 8:26 ` Takashi Iwai
2025-01-13 5:33 ` Dan Carpenter
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=20241230064910.1583-1-baojun.xu@ti.com \
--to=baojun.xu@ti.com \
--cc=13916275206@139.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=antheas.dk@gmail.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=liam.r.girdwood@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=navada@ti.com \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=shenghao-ding@ti.com \
--cc=stuart.a.hayhurst@gmail.com \
--cc=tiwai@suse.de \
--cc=v-hampiholi@ti.com \
--cc=v-po@ti.com \
--cc=yung-chuan.liao@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox