From: "Troy Mitchell" <troy.mitchell@linux.spacemit.com>
To: "Bui Duc Phuc" <phucduc.bui@gmail.com>,
"Yixun Lan" <dlan@kernel.org>, "Takashi Iwai" <tiwai@suse.com>,
"Mark Brown" <broonie@kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>,
"Liam Girdwood" <lgirdwood@gmail.com>
Cc: "Troy Mitchell" <troy.mitchell@linux.spacemit.com>,
"Goko Mell" <goku.sonxin626@gmail.com>,
"Jinmei Wei" <weijinmei@linux.spacemit.com>,
"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
<linux-riscv@lists.infradead.org>, <spacemit@lists.linux.dev>,
<linux-sound@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] ASoC: spacemit: init *dp to NULL before error paths
Date: Sun, 02 Aug 2026 23:38:33 -0700 [thread overview]
Message-ID: <DKF3ONLMSCC7.23CTHB22RU044@linux.spacemit.com> (raw)
In-Reply-To: <CAABR9nG=s78=5_tGSieN7hdCQOMNzJKdzJo5cx2bMfgAvJM+aw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1287 bytes --]
> However, unlike the Rockchip driver, spacemit_i2s_dai already has most
> of the playback
> and capture capabilities initialized statically. As a result,
> spacemit_i2s_init_dai() ends up
> assigning the same values again, for example channels_min, channels_max,
> rates,
> and formats, which seems redundant.
>
> If you think that makes sense, I can either remove those redundant
> assignments,
> or make it follow the Rockchip approach by keeping the static
> spacemit_i2s_dai
> minimal and initializing those fields only in spacemit_i2s_init_dai().
Nice catch. Please follow the Rockchip approach: keep the static
spacemit_i2s_dai minimal and initialize the playback and capture fields
conditionally in spacemit_i2s_init_dai().
Simply removing the assignments from spacemit_i2s_init_dai() would leave
channels_min nonzero for both directions in the static template.
snd_soc_dai_stream_valid() treats a direction with a nonzero channels_min
as supported, so the driver would continue advertising capture even for
a device with only a "tx" DMA. The binding permits such a configuration.
Please preserve rate_min and rate_max when moving the capability fields,
and send this change as a separate patch.
- Troy
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 248 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: "Troy Mitchell" <troy.mitchell@linux.spacemit.com>
To: "Bui Duc Phuc" <phucduc.bui@gmail.com>,
"Yixun Lan" <dlan@kernel.org>, "Takashi Iwai" <tiwai@suse.com>,
"Mark Brown" <broonie@kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>,
"Liam Girdwood" <lgirdwood@gmail.com>
Cc: "Troy Mitchell" <troy.mitchell@linux.spacemit.com>,
"Goko Mell" <goku.sonxin626@gmail.com>,
"Jinmei Wei" <weijinmei@linux.spacemit.com>,
"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
<linux-riscv@lists.infradead.org>, <spacemit@lists.linux.dev>,
<linux-sound@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] ASoC: spacemit: init *dp to NULL before error paths
Date: Sun, 02 Aug 2026 23:38:33 -0700 [thread overview]
Message-ID: <DKF3ONLMSCC7.23CTHB22RU044@linux.spacemit.com> (raw)
In-Reply-To: <CAABR9nG=s78=5_tGSieN7hdCQOMNzJKdzJo5cx2bMfgAvJM+aw@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1287 bytes --]
> However, unlike the Rockchip driver, spacemit_i2s_dai already has most
> of the playback
> and capture capabilities initialized statically. As a result,
> spacemit_i2s_init_dai() ends up
> assigning the same values again, for example channels_min, channels_max,
> rates,
> and formats, which seems redundant.
>
> If you think that makes sense, I can either remove those redundant
> assignments,
> or make it follow the Rockchip approach by keeping the static
> spacemit_i2s_dai
> minimal and initializing those fields only in spacemit_i2s_init_dai().
Nice catch. Please follow the Rockchip approach: keep the static
spacemit_i2s_dai minimal and initialize the playback and capture fields
conditionally in spacemit_i2s_init_dai().
Simply removing the assignments from spacemit_i2s_init_dai() would leave
channels_min nonzero for both directions in the static template.
snd_soc_dai_stream_valid() treats a direction with a nonzero channels_min
as supported, so the driver would continue advertising capture even for
a device with only a "tx" DMA. The binding permits such a configuration.
Please preserve rate_min and rate_max when moving the capability fields,
and send this change as a separate patch.
- Troy
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 248 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-08-03 6:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 10:15 [PATCH 1/2] ASoC: spacemit: Drop redundant error messages phucduc.bui
2026-07-31 10:15 ` phucduc.bui
2026-07-31 10:15 ` [PATCH 2/2] ASoC: spacemit: init *dp to NULL before error paths phucduc.bui
2026-07-31 10:15 ` phucduc.bui
2026-08-03 2:29 ` Troy Mitchell
2026-08-03 2:29 ` Troy Mitchell
2026-08-03 4:05 ` Bui Duc Phuc
2026-08-03 4:05 ` Bui Duc Phuc
2026-08-03 4:07 ` Bui Duc Phuc
2026-08-03 4:07 ` Bui Duc Phuc
2026-08-03 6:38 ` Troy Mitchell [this message]
2026-08-03 6:38 ` Troy Mitchell
2026-08-04 3:41 ` Bui Duc Phuc
2026-08-04 3:41 ` Bui Duc Phuc
2026-08-03 6:37 ` Troy Mitchell
2026-08-03 6:37 ` Troy Mitchell
2026-08-04 3:38 ` Bui Duc Phuc
2026-08-04 3:38 ` Bui Duc Phuc
2026-08-03 2:30 ` [PATCH 1/2] ASoC: spacemit: Drop redundant error messages Troy Mitchell
2026-08-03 2:30 ` Troy Mitchell
2026-08-03 18:37 ` (subset) " Mark Brown
2026-08-03 18:37 ` 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=DKF3ONLMSCC7.23CTHB22RU044@linux.spacemit.com \
--to=troy.mitchell@linux.spacemit.com \
--cc=broonie@kernel.org \
--cc=dlan@kernel.org \
--cc=goku.sonxin626@gmail.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=phucduc.bui@gmail.com \
--cc=spacemit@lists.linux.dev \
--cc=tiwai@suse.com \
--cc=weijinmei@linux.spacemit.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.