From: Takashi Iwai <tiwai@suse.de>
To: Shengjiu Wang <shengjiu.wang@gmail.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
Takashi Iwai <tiwai@suse.de>,
Shengjiu Wang <shengjiu.wang@nxp.com>,
imx@lists.linux.dev, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, Laurent.pinchart@ideasonboard.com,
andrzej.hajda@intel.com, festevam@gmail.com, simona@ffwll.ch,
robh@kernel.org, rfoss@kernel.org, airlied@gmail.com,
tiwai@suse.com, jernej.skrabec@gmail.com, p.zabel@pengutronix.de,
luca.ceresoli@bootlin.com, devicetree@vger.kernel.org,
conor+dt@kernel.org, tzimmermann@suse.de, jonas@kwiboo.se,
victor.liu@nxp.com, s.hauer@pengutronix.de,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
linux-sound@vger.kernel.org, perex@perex.cz,
linux-arm-kernel@lists.infradead.org, neil.armstrong@linaro.org,
lumag@kernel.org, dianders@chromium.org, kernel@pengutronix.de,
cristian.ciocaltea@collabora.com, krzk+dt@kernel.org,
shawnguo@kernel.org, l.stach@pengutronix.de
Subject: Re: [PATCH v2 2/6] ALSA: Add definitions for the bits in IEC958 subframe
Date: Thu, 24 Jul 2025 12:55:14 +0200 [thread overview]
Message-ID: <874iv1luy5.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAA+D8AN2B_RZ9iZ3qE5zMBfs7BMAkruSRQupoXyrsr7Tt+Gfkg@mail.gmail.com>
On Thu, 24 Jul 2025 12:14:10 +0200,
Shengjiu Wang wrote:
>
> On Thu, Jul 24, 2025 at 3:40 PM Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> >
> > On 24.07.2025 09:37:09, Takashi Iwai wrote:
> > > On Thu, 24 Jul 2025 09:22:44 +0200,
> > > Shengjiu Wang wrote:
> > > >
> > > > The IEC958 subframe format SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE are used
> > > > in HDMI and DisplayPort to describe the audio stream, but hardware device
> > > > may need to reorder the IEC958 bits for internal transmission, so need
> > > > these standard bits definitions for IEC958 subframe format.
> > > >
> > > > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > > > ---
> > > > include/sound/asoundef.h | 9 +++++++++
> > > > 1 file changed, 9 insertions(+)
> > > >
> > > > diff --git a/include/sound/asoundef.h b/include/sound/asoundef.h
> > > > index 09b2c3dffb30..7efd61568636 100644
> > > > --- a/include/sound/asoundef.h
> > > > +++ b/include/sound/asoundef.h
> > > > @@ -12,6 +12,15 @@
> > > > * Digital audio interface *
> > > > * *
> > > > ****************************************************************************/
> > > > +/* IEC958 subframe format */
> > > > +#define IEC958_SUBFRAME_PREAMBLE_MASK (0xf)
> > > > +#define IEC958_SUBFRAME_AUXILIARY_MASK (0xf<<4)
> > > > +#define IEC958_SUBFRAME_SAMPLE_24_MASK (0xffffff<<4)
> > > > +#define IEC958_SUBFRAME_SAMPLE_20_MASK (0xfffff<<8)
> > > > +#define IEC958_SUBFRAME_VALIDITY (0x1<<28)
> > > > +#define IEC958_SUBFRAME_USER_DATA (0x1<<29)
> > > > +#define IEC958_SUBFRAME_CHANNEL_STATUS (0x1<<30)
> > > > +#define IEC958_SUBFRAME_PARITY (0x1<<31)
> > >
> > > I'd use "U" suffix as it can reach to the MSB.
> > > Also, you can put spaces around the operators to align with the
> > > standard format, too. I guess you followed to the other code there,
> > > but following to the standard coding style would be better.
> > >
> > > With those addressed, feel free to take my ack for this patch:
> >
> > Or make use of the BIT() and GEN_MASK() helpers.
>
> Is it acceptable to include the headers in this file?
It's no UAPI, so should be fine (although I'm no big fan of
GEN_MASK()).
Other definitions can be converted with the macros, but it should be a
different patch.
thanks,
Takashi
next prev parent reply other threads:[~2025-07-24 10:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 7:22 [PATCH v2 0/6] drm/bridge: imx: Add HDMI PAI driver on i.MX8MP Shengjiu Wang
2025-07-24 7:22 ` [PATCH v2 1/6] dt-bindings: display: imx: add HDMI PAI for i.MX8MP Shengjiu Wang
2025-07-24 8:52 ` Krzysztof Kozlowski
2025-07-24 10:10 ` Shengjiu Wang
2025-07-24 7:22 ` [PATCH v2 2/6] ALSA: Add definitions for the bits in IEC958 subframe Shengjiu Wang
2025-07-24 7:37 ` Takashi Iwai
2025-07-24 7:40 ` Marc Kleine-Budde
2025-07-24 10:14 ` Shengjiu Wang
2025-07-24 10:55 ` Takashi Iwai [this message]
2025-07-24 7:22 ` [PATCH v2 3/6] drm/bridge: dw-hdmi: Add API dw_hdmi_to_plat_data() to get plat_data Shengjiu Wang
2025-07-24 7:22 ` [PATCH v2 4/6] drm/bridge: dw-hdmi: Add API dw_hdmi_set_sample_iec958() for iec958 format Shengjiu Wang
2025-07-24 7:22 ` [PATCH v2 5/6] drm/bridge: imx: add driver for HDMI TX Parallel Audio Interface Shengjiu Wang
2025-07-25 11:06 ` kernel test robot
2025-07-24 7:22 ` [PATCH v2 6/6] arm64: dts: imx8mp: Add hdmi parallel audio interface node Shengjiu Wang
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=874iv1luy5.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=conor+dt@kernel.org \
--cc=cristian.ciocaltea@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=l.stach@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mkl@pengutronix.de \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=p.zabel@pengutronix.de \
--cc=perex@perex.cz \
--cc=rfoss@kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=shengjiu.wang@gmail.com \
--cc=shengjiu.wang@nxp.com \
--cc=simona@ffwll.ch \
--cc=tiwai@suse.com \
--cc=tzimmermann@suse.de \
--cc=victor.liu@nxp.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;
as well as URLs for NNTP newsgroup(s).