Re: b4 review crash
Mark Brown <[email protected]>
| Newsgroups | org.kernel.linux.tools |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Aug 13, 2026 at 02:04:48PM -0400, Konstantin Ryabitsev wrote:
> On Thu, Aug 13, 2026 at 01:35:44PM -0400, Konstantin Ryabitsev wrote:
> > I'll add the fix.
> The fix is in now -- it will pop up a warning message with an override option.
> Please try it out.
Gets further but still splats:
Preparing fake-am for v2: ASoC: tas2783-sdw: add firmware download status check
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ /home/broonie/git/b4/src/b4/review_tui/_tracking_app.py:1864 in <lambda> │
│ │
│ 1861 │ │ │ │ base_hint=base_hint, │
│ 1862 │ │ │ │ subject=series.get('subject', ''), │
│ 1863 │ │ │ ), │
│ ❱ 1864 │ │ │ callback=lambda base_sha: self._on_base_selected( │
│ 1865 │ │ │ │ base_sha, lser, series, ambytes │
│ 1866 │ │ │ ), │
│ 1867 │ │ ) │
│ │
│ ╭───────────────────────────────────────────────── locals ─────────────────────────────────────────────────╮ │
│ │ ambytes = b'From git@z Thu Jan 1 00:00:00 1970\nSubject: [PATCH v2] ASoC: tas2783-sdw: add f'+4873 │ │
│ │ base_sha = 'ba5401135aa508f0cb5414f269edba1fe90460da' │ │
│ │ lser = - Series: [v2] ASoC: tas2783-sdw: add firmware download status check │ │
│ │ author: Baojun Xu <[email protected]> │ │
│ │ revision: 2 │ │
│ │ expected: 1 │ │
│ │ complete: True │ │
│ │ has_cover: False │ │
│ │ base_commit: None │ │
│ │ change_id: None │ │
│ │ partial_reroll: False │ │
│ │ patches: │ │
│ │ │ [0/1] MISSING │ │
│ │ │ [1/1] ASoC: tas2783-sdw: add firmware download status check │ │
│ │ self = TrackingApp(title='b4 review', classes={'-dark-mode'}, pseudo_classes={'dark', 'focus'}) │ │
│ │ series = { │ │
│ │ │ 'track_id': 1304, │ │
│ │ │ 'change_id': '20260813-asoc-tas2783-sdw-add-firmware-download-status-check-3faf17a2a9c2', │ │
│ │ │ 'revision': 2, │ │
│ │ │ 'subject': 'ASoC: tas2783-sdw: add firmware download status check', │ │
│ │ │ 'sender_name': 'Baojun Xu', │ │
│ │ │ 'sender_email': '[email protected]', │ │
│ │ │ 'sent_at': '2026-08-13T10:14:50+08:00', │ │
│ │ │ 'added_at': '2026-08-13T11:59:57.727998+00:00', │ │
│ │ │ 'status': 'new', │ │
│ │ │ 'num_patches': 1, │ │
│ │ │ ... +11 │ │
│ │ } │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/broonie/git/b4/src/b4/review_tui/_tracking_app.py:1880 in _on_base_selected │
│ │
│ 1877 │ │ if base_sha is None: │
│ 1878 │ │ │ self.notify('Checkout cancelled', severity='information') │
│ 1879 │ │ │ return │
│ ❱ 1880 │ │ self._do_checkout(lser, series, base_commit=base_sha, ambytes=ambytes) │
│ 1881 │ │
│ 1882 │ def _discover_newer_versions( │
│ 1883 │ │ self, change_id: str, current_rev: int, review_branch: str │
│ │
│ ╭───────────────────────────────────────────────── locals ─────────────────────────────────────────────────╮ │
│ │ ambytes = b'From git@z Thu Jan 1 00:00:00 1970\nSubject: [PATCH v2] ASoC: tas2783-sdw: add f'+4873 │ │
│ │ base_sha = 'ba5401135aa508f0cb5414f269edba1fe90460da' │ │
│ │ lser = - Series: [v2] ASoC: tas2783-sdw: add firmware download status check │ │
│ │ author: Baojun Xu <[email protected]> │ │
│ │ revision: 2 │ │
│ │ expected: 1 │ │
│ │ complete: True │ │
│ │ has_cover: False │ │
│ │ base_commit: None │ │
│ │ change_id: None │ │
│ │ partial_reroll: False │ │
│ │ patches: │ │
│ │ │ [0/1] MISSING │ │
│ │ │ [1/1] ASoC: tas2783-sdw: add firmware download status check │ │
│ │ self = TrackingApp(title='b4 review', classes={'-dark-mode'}, pseudo_classes={'dark', 'focus'}) │ │
│ │ series = { │ │
│ │ │ 'track_id': 1304, │ │
│ │ │ 'change_id': '20260813-asoc-tas2783-sdw-add-firmware-download-status-check-3faf17a2a9c2', │ │
│ │ │ 'revision': 2, │ │
│ │ │ 'subject': 'ASoC: tas2783-sdw: add firmware download status check', │ │
│ │ │ 'sender_name': 'Baojun Xu', │ │
│ │ │ 'sender_email': '[email protected]', │ │
│ │ │ 'sent_at': '2026-08-13T10:14:50+08:00', │ │
│ │ │ 'added_at': '2026-08-13T11:59:57.727998+00:00', │ │
│ │ │ 'status': 'new', │ │
│ │ │ 'num_patches': 1, │ │
│ │ │ ... +11 │ │
│ │ } │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/broonie/git/b4/src/b4/review_tui/_tracking_app.py:2001 in _do_checkout │
│ │
│ 1998 │ │ │ if lser.complete: │
│ 1999 │ │ │ │ _checked, mismatches = lser.check_applies_clean(gitdir=topdir) │
│ 2000 │ │ │ │ if mismatches: │
│ ❱ 2001 │ │ │ │ │ rstart, rend = lser.make_fake_am_range(gitdir=topdir) │
│ 2002 │ │ │ │ │ if rstart and rend: │
│ 2003 │ │ │ │ │ │ logger.info( │
│ 2004 │ │ │ │ │ │ │ 'Prepared fake commit range for 3-way merge (%.12s..%.12s)', │
│ │
│ ╭───────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ _checked = 1 │ │
│ │ ambytes = b'From git@z Thu Jan 1 00:00:00 1970\nSubject: [PATCH v2] ASoC: tas2783-sdw: add f'+4873 │ │
│ │ base_commit = 'ba5401135aa508f0cb5414f269edba1fe90460da' │ │
│ │ branch_name = 'b4/review/20260813-asoc-tas2783-sdw-add-firmware-download-status-check-3faf17a2a'+3 │ │
│ │ change_id = '20260813-asoc-tas2783-sdw-add-firmware-download-status-check-3faf17a2a9c2' │ │
│ │ checkout_success = False │ │
│ │ config = { │ │
│ │ │ 'midmask': 'https://lore.kernel.org/all/%s', │ │
│ │ │ 'searchmask': 'https://lore.kernel.org/all/?x=m&q=%s', │ │
│ │ │ 'linkmask': 'https://patch.msgid.link/%s', │ │
│ │ │ 'listid-preference': ['*.feeds.kernel.org', '*.linux.dev', '*.kernel.org', '*'], │ │
│ │ │ 'save-maildirs': 'no', │ │
│ │ │ 'attestation-policy': 'softfail', │ │
│ │ │ 'attestation-staleness-days': '30', │ │
│ │ │ 'attestation-check-dkim': 'yes', │ │
│ │ │ 'attestation-dns-resolvers': None, │ │
│ │ │ 'attestation-gnupghome': None, │ │
│ │ │ ... +22 │ │
│ │ } │ │
│ │ first_body = 'Currently, the firmware download is unnecessarily triggered on every\nsystem resu'+4527 │ │
│ │ linkmask = 'https://patch.msgid.link/%s' │ │
│ │ linkurl = 'https://patch.msgid.link/[email protected]' │ │
│ │ lmsg = msgid: [email protected] │ │
│ │ full_subject: [PATCH v2] ASoC: tas2783-sdw: add firmware download status check │ │
│ │ subject: ASoC: tas2783-sdw: add firmware download status check │ │
│ │ reply: False │ │
│ │ resend: False │ │
│ │ patch: True │ │
│ │ rfc: False │ │
│ │ revision: 2 │ │
│ │ revision_inferred: False │ │
│ │ counter: 1 │ │
│ │ expected: 1 │ │
│ │ counters_inferred: True │ │
│ │ prefixes: PATCH, v2 │ │
│ │ fromname: Baojun Xu │ │
│ │ fromemail: [email protected] │ │
│ │ date: 2026-08-13 10:14:50+08:00 │ │
│ │ in_reply_to: None │ │
│ │ --- begin body --- │ │
│ │ |Currently, the firmware download is unnecessarily triggered on every │ │
│ │ |system resume from suspend, causing significant wake-up latency. However, │ │
│ │ |this step is redundant if the AMP remains powered on. Furthermore, certain │ │
│ │ |memory pages (addresses > 0xc60000) are skipped even after an AMP reset. │ │
│ │ | │ │
│ │ |Signed-off-by: Baojun Xu <[email protected]> │ │
│ │ |--- │ │
│ │ |v2: │ │
│ │ | - Update register address from 0x07 to 7 and keep the line within the │ │
│ │ | 80-character limit. │ │
│ │ | - Remove stray/unnecessary changes. │ │
│ │ | - Change variable type to unsigned int to comply with API requirements. │ │
│ │ | - Replace usleep_range() with fsleep(). │ │
│ │ | - Set idle_bias_on to 0 to enable low-power mode. │ │
│ │ | - Reactivate the AMP after resume. │ │
│ │ |--- │ │
│ │ | sound/soc/codecs/tas2783-sdw.c | 55 ++++++++++++++++++++-------------- │ │
│ │ | 1 file changed, 33 insertions(+), 22 deletions(-) │ │
│ │ | │ │
│ │ |diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c │ │
│ │ |index c217da5fccdf..8fc679d460d9 100644 │ │
│ │ |--- a/sound/soc/codecs/tas2783-sdw.c │ │
│ │ |+++ b/sound/soc/codecs/tas2783-sdw.c │ │
│ │ |@@ -97,6 +97,7 @@ struct tas2783_prv { │ │
│ │ | u8 rca_binaryname[64]; │ │
│ │ | u8 dev_name[32]; │ │
│ │ | bool hw_init; │ │
│ │ |+ bool first_hw_init; │ │
│ │ | /* wq for firmware download */ │ │
│ │ | wait_queue_head_t fw_wait; │ │
│ │ | bool fw_dl_task_done; │ │
│ │ |@@ -783,14 +784,16 @@ static void tas2783_fw_ready(const struct firmware *fmw, void │ │
│ │ *context) │ │
│ │ | file->version, file->length, │ │
│ │ | file->dest_addr, file->fw_data); │ │
│ │ | │ │
│ │ |- ret = sdw_nwrite_no_pm(tas_dev->sdw_peripheral, │ │
│ │ |- file->dest_addr, │ │
│ │ |- file->length, │ │
│ │ |- file->fw_data); │ │
│ │ |- if (ret < 0) { │ │
│ │ |- dev_err(tas_dev->dev, │ │
│ │ |- "FW download failed: %d", ret); │ │
│ │ |- break; │ │
│ │ |+ if (!tas_dev->first_hw_init || file->dest_addr < 0xc60000) { │ │
│ │ |+ ret = sdw_nwrite_no_pm(tas_dev->sdw_peripheral, │ │
│ │ |+ file->dest_addr, │ │
│ │ |+ file->length, │ │
│ │ |+ file->fw_data); │ │
│ │ |+ if (ret < 0) { │ │
│ │ |+ dev_err(tas_dev->dev, │ │
│ │ |+ "FW download failed: %d", ret); │ │
│ │ |+ break; │ │
│ │ |+ } │ │
│ │ | } │ │
│ │ | cur_file++; │ │
│ │ | } │ │
│ │ |@@ -801,6 +804,8 @@ static void tas2783_fw_ready(const struct firmware *fmw, void │ │
│ │ *context) │ │
│ │ | ret = -EINVAL; │ │
│ │ | } else { │ │
│ │ | tas2783_update_calibdata(tas_dev); │ │
│ │ |+ regmap_write(tas_dev->regmap, TASDEV_REG_SDW(0, 0, 7), 0x22); │ │
│ │ |+ tas_dev->first_hw_init = true; │ │
│ │ | } │ │
│ │ | │ │
│ │ | out: │ │
│ │ |@@ -940,7 +945,7 @@ static s32 tas_sdw_hw_params(struct snd_pcm_substream *substream, │ │
│ │ | TAS2783_SDCA_POW_STATE_ON); │ │
│ │ | if (!ret) │ │
│ │ | break; │ │
│ │ |- usleep_range(2000, 2200); │ │
│ │ |+ fsleep(2200); │ │
│ │ | } while (retry--); │ │
│ │ | } │ │
│ │ | │ │
│ │ |@@ -1038,7 +1043,7 @@ static const struct snd_soc_component_driver │ │
│ │ soc_codec_driver_tasdevice = { │ │
│ │ | .num_dapm_widgets = ARRAY_SIZE(tas_dapm_widgets), │ │
│ │ | .dapm_routes = tas_audio_map, │ │
│ │ | .num_dapm_routes = ARRAY_SIZE(tas_audio_map), │ │
│ │ |- .idle_bias_on = 1, │ │
│ │ |+ .idle_bias_on = 0, │ │
│ │ | .endianness = 1, │ │
│ │ | }; │ │
│ │ | │ │
│ │ |@@ -1171,25 +1176,29 @@ static s32 tas_fw_load(struct tas2783_prv *tas_dev, struct │ │
│ │ sdw_slave *slave) │ │
│ │ | static s32 tas_io_init(struct device *dev, struct sdw_slave *slave) │ │
│ │ | { │ │
│ │ | struct tas2783_prv *tas_dev = dev_get_drvdata(dev); │ │
│ │ |+ unsigned int val; │ │
│ │ | s32 ret; │ │
│ │ | │ │
│ │ | if (tas_dev->hw_init) │ │
│ │ | return 0; │ │
│ │ | │ │
│ │ |- tas_dev->fw_dl_success = false; │ │
│ │ |+ regmap_read(tas_dev->regmap, TASDEV_REG_SDW(0, 0, 7), &val); │ │
│ │ |+ /* Check if the AMP is in reset status. */ │ │
│ │ |+ if (val == 0x20) { │ │
│ │ |+ tas_dev->fw_dl_success = false; │ │
│ │ | │ │
│ │ |- ret = regmap_write(tas_dev->regmap, TAS2783_SW_RESET, 0x1); │ │
│ │ |- if (ret) { │ │
│ │ |- dev_err(dev, "sw reset failed, err=%d", ret); │ │
│ │ |- return ret; │ │
│ │ |- } │ │
│ │ |- usleep_range(2000, 2200); │ │
│ │ |+ ret = regmap_write(tas_dev->regmap, TAS2783_SW_RESET, 0x1); │ │
│ │ |+ if (ret) { │ │
│ │ |+ dev_err(dev, "sw reset failed, err=%d", ret); │ │
│ │ |+ return ret; │ │
│ │ |+ } │ │
│ │ |+ fsleep(2200); │ │
│ │ | │ │
│ │ |- tas_dev->fw_use_fallback = false; │ │
│ │ |- ret = tas_fw_load(tas_dev, slave); │ │
│ │ |- if (!ret && tas_dev->fw_use_fallback) │ │
│ │ |+ tas_dev->fw_use_fallback = false; │ │
│ │ | ret = tas_fw_load(tas_dev, slave); │ │
│ │ |- │ │
│ │ |+ if (!ret && tas_dev->fw_use_fallback) │ │
│ │ |+ ret = tas_fw_load(tas_dev, slave); │ │
│ │ |+ } │ │
│ │ | if (!ret) { │ │
│ │ | if (tas_dev->sa_func_data) │ │
│ │ | ret = sdca_regmap_write_init(dev, tas_dev->regmap, │ │
│ │ |@@ -1197,7 +1206,8 @@ static s32 tas_io_init(struct device *dev, struct sdw_slave *slave) │ │
│ │ | else │ │
│ │ | ret = regmap_multi_reg_write(tas_dev->regmap, tas2783_init_seq, │ │
│ │ | ARRAY_SIZE(tas2783_init_seq)); │ │
│ │ |- │ │
│ │ |+ /* Re-active AMP after resume. */ │ │
│ │ |+ regmap_write(tas_dev->regmap, TASDEV_REG_SDW(0, 0, 2), 0); │ │
│ │ | if (ret) │ │
│ │ | dev_err(tas_dev->dev, │ │
│ │ | "init writes failed, err=%d", ret); │ │
│ │ |@@ -1357,6 +1367,7 @@ static s32 tas_sdw_probe(struct sdw_slave *peripheral, │ │
│ │ | tas_dev->dev = dev; │ │
│ │ | tas_dev->sdw_peripheral = peripheral; │ │
│ │ | tas_dev->hw_init = false; │ │
│ │ |+ tas_dev->first_hw_init = false; │ │
│ │ | mutex_init(&tas_dev->calib_lock); │ │
│ │ | mutex_init(&tas_dev->pde_lock); │ │
│ │ | │ │
│ │ |-- │ │
│ │ |2.25.1 │ │
│ │ | │ │
│ │ | │ │
│ │ | │ │
│ │ | │ │
│ │ --- end body --- │ │
│ │ has_diff: True │ │
│ │ has_diffstat: True │ │
│ │ --- begin my trailers --- │ │
│ │ --- begin followup trailers --- │ │
│ │ --- end trailers --- │ │
│ │ --- begin attestors --- │ │
│ │ | mode: DKIM │ │
│ │ level: domain │ │
│ │ identity: ti.com │ │
│ │ signtime: 2026-08-13 10:14:50+08:00 │ │
│ │ keysrc: DNS │ │
│ │ keyalgo: None │ │
│ │ passing: True │ │
│ │ have_key: False │ │
│ │ errors: │ │
│ │ --- end attestors --- │ │
│ │ lser = - Series: [v2] ASoC: tas2783-sdw: add firmware download status check │ │
│ │ author: Baojun Xu <[email protected]> │ │
│ │ revision: 2 │ │
│ │ expected: 1 │ │
│ │ complete: True │ │
│ │ has_cover: False │ │
│ │ base_commit: None │ │
│ │ change_id: None │ │
│ │ partial_reroll: False │ │
│ │ patches: │ │
│ │ │ [0/1] MISSING │ │
│ │ │ [1/1] ASoC: tas2783-sdw: add firmware download status check │ │
│ │ mismatches = [('sound/soc/codecs/tas2783-sdw.c', 'c217da5fccdf')] │ │
│ │ self = TrackingApp(title='b4 review', classes={'-dark-mode'}, pseudo_classes={'dark', 'focus'}) │ │
│ │ series = { │ │
│ │ │ 'track_id': 1304, │ │
│ │ │ 'change_id': '20260813-asoc-tas2783-sdw-add-firmware-download-status-check-3faf17a2a9c2', │ │
│ │ │ 'revision': 2, │ │
│ │ │ 'subject': 'ASoC: tas2783-sdw: add firmware download status check', │ │
│ │ │ 'sender_name': 'Baojun Xu', │ │
│ │ │ 'sender_email': '[email protected]', │ │
│ │ │ 'sent_at': '2026-08-13T10:14:50+08:00', │ │
│ │ │ 'added_at': '2026-08-13T11:59:57.727998+00:00', │ │
│ │ │ 'status': 'new', │ │
│ │ │ 'num_patches': 1, │ │
│ │ │ ... +11 │ │
│ │ } │ │
│ │ top_msgid = '[email protected]' │ │
│ │ topdir = '/home/broonie/git/apply' │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/broonie/git/b4/src/b4/__init__.py:1516 in make_fake_am_range │
│ │
│ 1513 │ │ │ │ │ │ ) │
│ 1514 │ │ │ │ │ │ return None, None │
│ 1515 │ │ │ │ │
│ ❱ 1516 │ │ │ │ msgs.append(lmsg.get_am_message(add_trailers=False)) │
│ 1517 │ │ │ │
│ 1518 │ │ │ ecode, out = git_run_command(dfn, ['write-tree']) │
│ 1519 │ │ │ if ecode > 0: │
│ │
│ ╭───────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ at_base = 'heads/asoc-7.3-1-gd5061a86b9dd' │ │
│ │ bound_hash = 'c217da5fccdf61b215d0ed5384c81ab80c643482' │ │
│ │ cachedata = None │ │
│ │ dfn = '/tmp/tmp8f1tmf8f' │ │
│ │ ecode = 0 │ │
│ │ end_commit = None │ │
│ │ fmod = '100644' │ │
│ │ gitargs = [ │ │
│ │ │ 'update-index', │ │
│ │ │ '--add', │ │
│ │ │ '--cacheinfo', │ │
│ │ │ '100644,c217da5fccdf61b215d0ed5384c81ab80c643482,sound/soc/codecs/tas2783-sdw.c' │ │
│ │ ] │ │
│ │ gitdir = '/home/broonie/git/apply' │ │
│ │ lmsg = msgid: [email protected] │ │
│ │ full_subject: [PATCH v2] ASoC: tas2783-sdw: add firmware download status check │ │
│ │ subject: ASoC: tas2783-sdw: add firmware download status check │ │
│ │ reply: False │ │
│ │ resend: False │ │
│ │ patch: True │ │
│ │ rfc: False │ │
│ │ revision: 2 │ │
│ │ revision_inferred: False │ │
│ │ counter: 1 │ │
│ │ expected: 1 │ │
│ │ counters_inferred: True │ │
│ │ prefixes: PATCH, v2 │ │
│ │ fromname: Baojun Xu │ │
│ │ fromemail: [email protected] │ │
│ │ date: 2026-08-13 10:14:50+08:00 │ │
│ │ in_reply_to: None │ │
│ │ --- begin body --- │ │
│ │ |Currently, the firmware download is unnecessarily triggered on every │ │
│ │ |system resume from suspend, causing significant wake-up latency. However, │ │
│ │ |this step is redundant if the AMP remains powered on. Furthermore, certain │ │
│ │ |memory pages (addresses > 0xc60000) are skipped even after an AMP reset. │ │
│ │ | │ │
│ │ |Signed-off-by: Baojun Xu <[email protected]> │ │
│ │ |--- │ │
│ │ |v2: │ │
│ │ | - Update register address from 0x07 to 7 and keep the line within the │ │
│ │ | 80-character limit. │ │
│ │ | - Remove stray/unnecessary changes. │ │
│ │ | - Change variable type to unsigned int to comply with API requirements. │ │
│ │ | - Replace usleep_range() with fsleep(). │ │
│ │ | - Set idle_bias_on to 0 to enable low-power mode. │ │
│ │ | - Reactivate the AMP after resume. │ │
│ │ |--- │ │
│ │ | sound/soc/codecs/tas2783-sdw.c | 55 ++++++++++++++++++++-------------- │ │
│ │ | 1 file changed, 33 insertions(+), 22 deletions(-) │ │
│ │ | │ │
│ │ |diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c │ │
│ │ |index c217da5fccdf..8fc679d460d9 100644 │ │
│ │ |--- a/sound/soc/codecs/tas2783-sdw.c │ │
│ │ |+++ b/sound/soc/codecs/tas2783-sdw.c │ │
│ │ |@@ -97,6 +97,7 @@ struct tas2783_prv { │ │
│ │ | u8 rca_binaryname[64]; │ │
│ │ | u8 dev_name[32]; │ │
│ │ | bool hw_init; │ │
│ │ |+ bool first_hw_init; │ │
│ │ | /* wq for firmware download */ │ │
│ │ | wait_queue_head_t fw_wait; │ │
│ │ | bool fw_dl_task_done; │ │
│ │ |@@ -783,14 +784,16 @@ static void tas2783_fw_ready(const struct firmware *fmw, void *context) │ │
│ │ | file->version, file->length, │ │
│ │ | file->dest_addr, file->fw_data); │ │
│ │ | │ │
│ │ |- ret = sdw_nwrite_no_pm(tas_dev->sdw_peripheral, │ │
│ │ |- file->dest_addr, │ │
│ │ |- file->length, │ │
│ │ |- file->fw_data); │ │
│ │ |- if (ret < 0) { │ │
│ │ |- dev_err(tas_dev->dev, │ │
│ │ |- "FW download failed: %d", ret); │ │
│ │ |- break; │ │
│ │ |+ if (!tas_dev->first_hw_init || file->dest_addr < 0xc60000) { │ │
│ │ |+ ret = sdw_nwrite_no_pm(tas_dev->sdw_peripheral, │ │
│ │ |+ file->dest_addr, │ │
│ │ |+ file->length, │ │
│ │ |+ file->fw_data); │ │
│ │ |+ if (ret < 0) { │ │
│ │ |+ dev_err(tas_dev->dev, │ │
│ │ |+ "FW download failed: %d", ret); │ │
│ │ |+ break; │ │
│ │ |+ } │ │
│ │ | } │ │
│ │ | cur_file++; │ │
│ │ | } │ │
│ │ |@@ -801,6 +804,8 @@ static void tas2783_fw_ready(const struct firmware *fmw, void *context) │ │
│ │ | ret = -EINVAL; │ │
│ │ | } else { │ │
│ │ | tas2783_update_calibdata(tas_dev); │ │
│ │ |+ regmap_write(tas_dev->regmap, TASDEV_REG_SDW(0, 0, 7), 0x22); │ │
│ │ |+ tas_dev->first_hw_init = true; │ │
│ │ | } │ │
│ │ | │ │
│ │ | out: │ │
│ │ |@@ -940,7 +945,7 @@ static s32 tas_sdw_hw_params(struct snd_pcm_substream *substream, │ │
│ │ | TAS2783_SDCA_POW_STATE_ON); │ │
│ │ | if (!ret) │ │
│ │ | break; │ │
│ │ |- usleep_range(2000, 2200); │ │
│ │ |+ fsleep(2200); │ │
│ │ | } while (retry--); │ │
│ │ | } │ │
│ │ | │ │
│ │ |@@ -1038,7 +1043,7 @@ static const struct snd_soc_component_driver soc_codec_driver_tasdevice │ │
│ │ = { │ │
│ │ | .num_dapm_widgets = ARRAY_SIZE(tas_dapm_widgets), │ │
│ │ | .dapm_routes = tas_audio_map, │ │
│ │ | .num_dapm_routes = ARRAY_SIZE(tas_audio_map), │ │
│ │ |- .idle_bias_on = 1, │ │
│ │ |+ .idle_bias_on = 0, │ │
│ │ | .endianness = 1, │ │
│ │ | }; │ │
│ │ | │ │
│ │ |@@ -1171,25 +1176,29 @@ static s32 tas_fw_load(struct tas2783_prv *tas_dev, struct sdw_slave │ │
│ │ *slave) │ │
│ │ | static s32 tas_io_init(struct device *dev, struct sdw_slave *slave) │ │
│ │ | { │ │
│ │ | struct tas2783_prv *tas_dev = dev_get_drvdata(dev); │ │
│ │ |+ unsigned int val; │ │
│ │ | s32 ret; │ │
│ │ | │ │
│ │ | if (tas_dev->hw_init) │ │
│ │ | return 0; │ │
│ │ | │ │
│ │ |- tas_dev->fw_dl_success = false; │ │
│ │ |+ regmap_read(tas_dev->regmap, TASDEV_REG_SDW(0, 0, 7), &val); │ │
│ │ |+ /* Check if the AMP is in reset status. */ │ │
│ │ |+ if (val == 0x20) { │ │
│ │ |+ tas_dev->fw_dl_success = false; │ │
│ │ | │ │
│ │ |- ret = regmap_write(tas_dev->regmap, TAS2783_SW_RESET, 0x1); │ │
│ │ |- if (ret) { │ │
│ │ |- dev_err(dev, "sw reset failed, err=%d", ret); │ │
│ │ |- return ret; │ │
│ │ |- } │ │
│ │ |- usleep_range(2000, 2200); │ │
│ │ |+ ret = regmap_write(tas_dev->regmap, TAS2783_SW_RESET, 0x1); │ │
│ │ |+ if (ret) { │ │
│ │ |+ dev_err(dev, "sw reset failed, err=%d", ret); │ │
│ │ |+ return ret; │ │
│ │ |+ } │ │
│ │ |+ fsleep(2200); │ │
│ │ | │ │
│ │ |- tas_dev->fw_use_fallback = false; │ │
│ │ |- ret = tas_fw_load(tas_dev, slave); │ │
│ │ |- if (!ret && tas_dev->fw_use_fallback) │ │
│ │ |+ tas_dev->fw_use_fallback = false; │ │
│ │ | ret = tas_fw_load(tas_dev, slave); │ │
│ │ |- │ │
│ │ |+ if (!ret && tas_dev->fw_use_fallback) │ │
│ │ |+ ret = tas_fw_load(tas_dev, slave); │ │
│ │ |+ } │ │
│ │ | if (!ret) { │ │
│ │ | if (tas_dev->sa_func_data) │ │
│ │ | ret = sdca_regmap_write_init(dev, tas_dev->regmap, │ │
│ │ |@@ -1197,7 +1206,8 @@ static s32 tas_io_init(struct device *dev, struct sdw_slave *slave) │ │
│ │ | else │ │
│ │ | ret = regmap_multi_reg_write(tas_dev->regmap, tas2783_init_seq, │ │
│ │ | ARRAY_SIZE(tas2783_init_seq)); │ │
│ │ |- │ │
│ │ |+ /* Re-active AMP after resume. */ │ │
│ │ |+ regmap_write(tas_dev->regmap, TASDEV_REG_SDW(0, 0, 2), 0); │ │
│ │ | if (ret) │ │
│ │ | dev_err(tas_dev->dev, │ │
│ │ | "init writes failed, err=%d", ret); │ │
│ │ |@@ -1357,6 +1367,7 @@ static s32 tas_sdw_probe(struct sdw_slave *peripheral, │ │
│ │ | tas_dev->dev = dev; │ │
│ │ | tas_dev->sdw_peripheral = peripheral; │ │
│ │ | tas_dev->hw_init = false; │ │
│ │ |+ tas_dev->first_hw_init = false; │ │
│ │ | mutex_init(&tas_dev->calib_lock); │ │
│ │ | mutex_init(&tas_dev->pde_lock); │ │
│ │ | │ │
│ │ |-- │ │
│ │ |2.25.1 │ │
│ │ | │ │
│ │ | │ │
│ │ | │ │
│ │ | │ │
│ │ --- end body --- │ │
│ │ has_diff: True │ │
│ │ has_diffstat: True │ │
│ │ --- begin my trailers --- │ │
│ │ --- begin followup trailers --- │ │
│ │ --- end trailers --- │ │
│ │ --- begin attestors --- │ │
│ │ | mode: DKIM │ │
│ │ level: domain │ │
│ │ identity: ti.com │ │
│ │ signtime: 2026-08-13 10:14:50+08:00 │ │
│ │ keysrc: DNS │ │
│ │ keyalgo: None │ │
│ │ passing: True │ │
│ │ have_key: False │ │
│ │ errors: │ │
│ │ --- end attestors --- │ │
│ │ msgid = '[email protected]' │ │
│ │ msgs = [] │ │
│ │ nfn = 'sound/soc/codecs/tas2783-sdw.c' │ │
│ │ ofi = 'c217da5fccdf' │ │
│ │ ofn = 'sound/soc/codecs/tas2783-sdw.c' │ │
│ │ out = '' │ │
│ │ seenfiles = {'sound/soc/codecs/tas2783-sdw.c'} │ │
│ │ self = - Series: [v2] ASoC: tas2783-sdw: add firmware download status check │ │
│ │ author: Baojun Xu <[email protected]> │ │
│ │ revision: 2 │ │
│ │ expected: 1 │ │
│ │ complete: True │ │
│ │ has_cover: False │ │
│ │ base_commit: None │ │
│ │ change_id: None │ │
│ │ partial_reroll: False │ │
│ │ patches: │ │
│ │ │ [0/1] MISSING │ │
│ │ │ [1/1] ASoC: tas2783-sdw: add firmware download status check │ │
│ │ start_commit = None │ │
│ │ topdir = '/home/broonie/git/apply' │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/broonie/git/b4/src/b4/__init__.py:3323 in get_am_message │
│ │
│ 3320 │ │ │ │ │ # find the offending char │
│ 3321 │ │ │ │ │ for at, c in enumerate(line.rstrip('\r')): │
│ 3322 │ │ │ │ │ │ if unicodedata.category(c) == 'Cf': │
│ ❱ 3323 │ │ │ │ │ │ │ raise BadCharsError( │
│ 3324 │ │ │ │ │ │ │ │ self.full_subject, line.rstrip('\r'), at, c │
│ 3325 │ │ │ │ │ │ │ ) │
│ 3326 │
│ │
│ ╭───────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ add_trailers = False │ │
│ │ addmysob = False │ │
│ │ allowbadchars = False │ │
│ │ at = 22 │ │
│ │ c = '\u200c' │ │
│ │ copyccs = False │ │
│ │ extras = None │ │
│ │ line = ' 80-character limit.\u200c' │ │
│ │ self = msgid: [email protected] │ │
│ │ full_subject: [PATCH v2] ASoC: tas2783-sdw: add firmware download status check │ │
│ │ subject: ASoC: tas2783-sdw: add firmware download status check │ │
│ │ reply: False │ │
│ │ resend: False │ │
│ │ patch: True │ │
│ │ rfc: False │ │
│ │ revision: 2 │ │
│ │ revision_inferred: False │ │
│ │ counter: 1 │ │
│ │ expected: 1 │ │
│ │ counters_inferred: True │ │
│ │ prefixes: PATCH, v2 │ │
│ │ fromname: Baojun Xu │ │
│ │ fromemail: [email protected] │ │
│ │ date: 2026-08-13 10:14:50+08:00 │ │
│ │ in_reply_to: None │ │
│ │ --- begin body --- │ │
│ │ |Currently, the firmware download is unnecessarily triggered on every │ │
│ │ |system resume from suspend, causing significant wake-up latency. However, │ │
│ │ |this step is redundant if the AMP remains powered on. Furthermore, certain │ │
│ │ |memory pages (addresses > 0xc60000) are skipped even after an AMP reset. │ │
│ │ | │ │
│ │ |Signed-off-by: Baojun Xu <[email protected]> │ │
│ │ |--- │ │
│ │ |v2: │ │
│ │ | - Update register address from 0x07 to 7 and keep the line within the │ │
│ │ | 80-character limit. │ │
│ │ | - Remove stray/unnecessary changes. │ │
│ │ | - Change variable type to unsigned int to comply with API requirements. │ │
│ │ | - Replace usleep_range() with fsleep(). │ │
│ │ | - Set idle_bias_on to 0 to enable low-power mode. │ │
│ │ | - Reactivate the AMP after resume. │ │
│ │ |--- │ │
│ │ | sound/soc/codecs/tas2783-sdw.c | 55 ++++++++++++++++++++-------------- │ │
│ │ | 1 file changed, 33 insertions(+), 22 deletions(-) │ │
│ │ | │ │
│ │ |diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c │ │
│ │ |index c217da5fccdf..8fc679d460d9 100644 │ │
│ │ |--- a/sound/soc/codecs/tas2783-sdw.c │ │
│ │ |+++ b/sound/soc/codecs/tas2783-sdw.c │ │
│ │ |@@ -97,6 +97,7 @@ struct tas2783_prv { │ │
│ │ | u8 rca_binaryname[64]; │ │
│ │ | u8 dev_name[32]; │ │
│ │ | bool hw_init; │ │
│ │ |+ bool first_hw_init; │ │
│ │ | /* wq for firmware download */ │ │
│ │ | wait_queue_head_t fw_wait; │ │
│ │ | bool fw_dl_task_done; │ │
│ │ |@@ -783,14 +784,16 @@ static void tas2783_fw_ready(const struct firmware *fmw, void *context) │ │
│ │ | file->version, file->length, │ │
│ │ | file->dest_addr, file->fw_data); │ │
│ │ | │ │
│ │ |- ret = sdw_nwrite_no_pm(tas_dev->sdw_peripheral, │ │
│ │ |- file->dest_addr, │ │
│ │ |- file->length, │ │
│ │ |- file->fw_data); │ │
│ │ |- if (ret < 0) { │ │
│ │ |- dev_err(tas_dev->dev, │ │
│ │ |- "FW download failed: %d", ret); │ │
│ │ |- break; │ │
│ │ |+ if (!tas_dev->first_hw_init || file->dest_addr < 0xc60000) { │ │
│ │ |+ ret = sdw_nwrite_no_pm(tas_dev->sdw_peripheral, │ │
│ │ |+ file->dest_addr, │ │
│ │ |+ file->length, │ │
│ │ |+ file->fw_data); │ │
│ │ |+ if (ret < 0) { │ │
│ │ |+ dev_err(tas_dev->dev, │ │
│ │ |+ "FW download failed: %d", ret); │ │
│ │ |+ break; │ │
│ │ |+ } │ │
│ │ | } │ │
│ │ | cur_file++; │ │
│ │ | } │ │
│ │ |@@ -801,6 +804,8 @@ static void tas2783_fw_ready(const struct firmware *fmw, void *context) │ │
│ │ | ret = -EINVAL; │ │
│ │ | } else { │ │
│ │ | tas2783_update_calibdata(tas_dev); │ │
│ │ |+ regmap_write(tas_dev->regmap, TASDEV_REG_SDW(0, 0, 7), 0x22); │ │
│ │ |+ tas_dev->first_hw_init = true; │ │
│ │ | } │ │
│ │ | │ │
│ │ | out: │ │
│ │ |@@ -940,7 +945,7 @@ static s32 tas_sdw_hw_params(struct snd_pcm_substream *substream, │ │
│ │ | TAS2783_SDCA_POW_STATE_ON); │ │
│ │ | if (!ret) │ │
│ │ | break; │ │
│ │ |- usleep_range(2000, 2200); │ │
│ │ |+ fsleep(2200); │ │
│ │ | } while (retry--); │ │
│ │ | } │ │
│ │ | │ │
│ │ |@@ -1038,7 +1043,7 @@ static const struct snd_soc_component_driver soc_codec_driver_tasdevice │ │
│ │ = { │ │
│ │ | .num_dapm_widgets = ARRAY_SIZE(tas_dapm_widgets), │ │
│ │ | .dapm_routes = tas_audio_map, │ │
│ │ | .num_dapm_routes = ARRAY_SIZE(tas_audio_map), │ │
│ │ |- .idle_bias_on = 1, │ │
│ │ |+ .idle_bias_on = 0, │ │
│ │ | .endianness = 1, │ │
│ │ | }; │ │
│ │ | │ │
│ │ |@@ -1171,25 +1176,29 @@ static s32 tas_fw_load(struct tas2783_prv *tas_dev, struct sdw_slave │ │
│ │ *slave) │ │
│ │ | static s32 tas_io_init(struct device *dev, struct sdw_slave *slave) │ │
│ │ | { │ │
│ │ | struct tas2783_prv *tas_dev = dev_get_drvdata(dev); │ │
│ │ |+ unsigned int val; │ │
│ │ | s32 ret; │ │
│ │ | │ │
│ │ | if (tas_dev->hw_init) │ │
│ │ | return 0; │ │
│ │ | │ │
│ │ |- tas_dev->fw_dl_success = false; │ │
│ │ |+ regmap_read(tas_dev->regmap, TASDEV_REG_SDW(0, 0, 7), &val); │ │
│ │ |+ /* Check if the AMP is in reset status. */ │ │
│ │ |+ if (val == 0x20) { │ │
│ │ |+ tas_dev->fw_dl_success = false; │ │
│ │ | │ │
│ │ |- ret = regmap_write(tas_dev->regmap, TAS2783_SW_RESET, 0x1); │ │
│ │ |- if (ret) { │ │
│ │ |- dev_err(dev, "sw reset failed, err=%d", ret); │ │
│ │ |- return ret; │ │
│ │ |- } │ │
│ │ |- usleep_range(2000, 2200); │ │
│ │ |+ ret = regmap_write(tas_dev->regmap, TAS2783_SW_RESET, 0x1); │ │
│ │ |+ if (ret) { │ │
│ │ |+ dev_err(dev, "sw reset failed, err=%d", ret); │ │
│ │ |+ return ret; │ │
│ │ |+ } │ │
│ │ |+ fsleep(2200); │ │
│ │ | │ │
│ │ |- tas_dev->fw_use_fallback = false; │ │
│ │ |- ret = tas_fw_load(tas_dev, slave); │ │
│ │ |- if (!ret && tas_dev->fw_use_fallback) │ │
│ │ |+ tas_dev->fw_use_fallback = false; │ │
│ │ | ret = tas_fw_load(tas_dev, slave); │ │
│ │ |- │ │
│ │ |+ if (!ret && tas_dev->fw_use_fallback) │ │
│ │ |+ ret = tas_fw_load(tas_dev, slave); │ │
│ │ |+ } │ │
│ │ | if (!ret) { │ │
│ │ | if (tas_dev->sa_func_data) │ │
│ │ | ret = sdca_regmap_write_init(dev, tas_dev->regmap, │ │
│ │ |@@ -1197,7 +1206,8 @@ static s32 tas_io_init(struct device *dev, struct sdw_slave *slave) │ │
│ │ | else │ │
│ │ | ret = regmap_multi_reg_write(tas_dev->regmap, tas2783_init_seq, │ │
│ │ | ARRAY_SIZE(tas2783_init_seq)); │ │
│ │ |- │ │
│ │ |+ /* Re-active AMP after resume. */ │ │
│ │ |+ regmap_write(tas_dev->regmap, TASDEV_REG_SDW(0, 0, 2), 0); │ │
│ │ | if (ret) │ │
│ │ | dev_err(tas_dev->dev, │ │
│ │ | "init writes failed, err=%d", ret); │ │
│ │ |@@ -1357,6 +1367,7 @@ static s32 tas_sdw_probe(struct sdw_slave *peripheral, │ │
│ │ | tas_dev->dev = dev; │ │
│ │ | tas_dev->sdw_peripheral = peripheral; │ │
│ │ | tas_dev->hw_init = false; │ │
│ │ |+ tas_dev->first_hw_init = false; │ │
│ │ | mutex_init(&tas_dev->calib_lock); │ │
│ │ | mutex_init(&tas_dev->pde_lock); │ │
│ │ | │ │
│ │ |-- │ │
│ │ |2.25.1 │ │
│ │ | │ │
│ │ | │ │
│ │ | │ │
│ │ | │ │
│ │ --- end body --- │ │
│ │ has_diff: True │ │
│ │ has_diffstat: True │ │
│ │ --- begin my trailers --- │ │
│ │ --- begin followup trailers --- │ │
│ │ --- end trailers --- │ │
│ │ --- begin attestors --- │ │
│ │ | mode: DKIM │ │
│ │ level: domain │ │
│ │ identity: ti.com │ │
│ │ signtime: 2026-08-13 10:14:50+08:00 │ │
│ │ keysrc: DNS │ │
│ │ keyalgo: None │ │
│ │ passing: True │ │
│ │ have_key: False │ │
│ │ errors: │ │
│ │ --- end attestors --- │ │
│ │ ucats = {'Pd', 'Nd', 'Ll', 'Cf', 'Zs', 'Po'} │ │
│ │ unicodedata = <module 'unicodedata' (built-in)> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
BadCharsError: Suspicious unicode control character in "[PATCH v2] ASoC: tas2783-sdw: add firmware download status
check": ZERO WIDTH NON-JOINER (0x200c)
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmp+GGMACgkQJNaLcl1U h9BVjQgAgEBoScz8IpyQ66OO3mmu6fn/KHghZRHekaSCWTmiFiVAG9fbb3qR8TMh VaRWJUmy7H+Y/jy+sDPV59bg9nV+cCUWOIAY0FsUBMA7waX8m0f0TDHf6sfH/5Eg oeZjAMRBj7/AvzVzLEpJ4diAjDYqdMZilADQF8dMc6QvL+T+GX5Hmm30Gj35Be0j K+FP/NKK3LvJPM9+lulBuY7AFYOmc7p7R9BrQVKXGMB6yCsETcs7sDrMOjG/QIe+ jK+qUoP/MFp26wjLO2bmc2tlLx3USruQU41IAmBl82nQCzuJwscUSf94dSqmvvFA LZZVbJDjiOf/Y/n+fq7Nx9U+6zP42w== =5jxu -----END PGP SIGNATURE-----