[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y4Cysgk5Gic5ae9B@sirena.org.uk>
Date: Fri, 25 Nov 2022 12:18:58 +0000
From: Mark Brown <broonie@...nel.org>
To: Jiaxin Yu <jiaxin.yu@...iatek.com>
Cc: andrzej.hajda@...el.com, neil.armstrong@...aro.org,
robert.foss@...aro.org, Laurent.pinchart@...asonboard.com,
kuninori.morimoto.gx@...esas.com,
angelogioacchino.delregno@...labora.com, nfraprado@...labora.com,
chunxu.li@...iatek.com, ajye_huang@...pal.corp-partner.google.com,
allen-kh.cheng@...iatek.com, dri-devel@...ts.freedesktop.org,
alsa-devel@...a-project.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
Project_Global_Chrome_Upstream_Group@...iatek.com
Subject: Re: [PATCH v2 1/3] ASoC: hdmi-codec: Add event handler for hdmi TX
On Fri, Nov 25, 2022 at 05:44:11PM +0800, Jiaxin Yu wrote:
> + /*
> + * PCM trigger callback.
> + * Mandatory
> + */
> + int (*trigger)(struct device *dev, int cmd);
> +
Making this mandatory would break all existing users, though...
> + switch (event) {
> + case SND_SOC_DAPM_PRE_PMU:
> + if (hcp->hcd.ops->trigger)
> + hcp->hcd.ops->trigger(component->dev->parent, SNDRV_PCM_TRIGGER_START);
...it's not actually mandatory so it's just the comment that's wrong.
I'm a little unclear why this is being implemented as a DAPM operation
rather than having the driver forward the PCM trigger op if it's needed?
Or alternatively if a DAPM callback is needed why not provide one
directly rather than hooking into the trigger function - that's going to
be called out of sequence with the rest of DAPM and be potentially
confusing given the very different environments that trigger and DAPM
operations run in. A quick glance at the it6505 driver suggests it'd be
happier with a DAPM callback.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists