From: Maxime Ripard <mripard@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Stefan Mavrodiev <stefan@olimex.com>,
Dan Williams <dan.j.williams@intel.com>,
Vinod Koul <vkoul@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
open list <linux-kernel@vger.kernel.org>,
"open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM"
<dmaengine@vger.kernel.org>,
"moderated list:ARM/Allwinner sunXi SoC support"
<linux-arm-kernel@lists.infradead.org>,
"open list:DRM DRIVERS FOR ALLWINNER A10"
<dri-devel@lists.freedesktop.org>,
linux-sunxi@googlegroups.com
Subject: Re: [PATCH v2 2/2] drm: sun4i: hdmi: Add support for sun4i HDMI encoder audio
Date: Wed, 22 Jan 2020 09:46:17 +0100 [thread overview]
Message-ID: <20200122084617.s2n4dqhwanmaxuch@gilmour.lan> (raw)
In-Reply-To: <20200121183247.GL4656@sirena.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]
On Tue, Jan 21, 2020 at 06:32:47PM +0000, Mark Brown wrote:
> On Tue, Jan 21, 2020 at 07:29:37PM +0100, Maxime Ripard wrote:
>
> > > Mark, our issue here is that we have a driver tied to a device that is
> > > an HDMI encoder. Obviously, we'll want to register into DRM, which is
> > > what we were doing so far, with the usual case where at remove /
> > > unbind time, in order to free the resources, we just retrieve our
> > > pointer to our private structure using the device's drvdata.
>
> > > Now, snd_soc_register_card also sets that pointer to the card we try
> > > to register, which is problematic. It seems that it's used to handle
> > > suspend / resume automatically, which in this case would be also not
> > > really fit for us (or rather, we would need to do more that just
> > > suspend the audio part).
>
> There's a drvdata field in the snd_soc_card for cases like this - would
> that work for you?
Ah, right, we could just retrieve the snd_soc_card in the unbind, and
the retrieve our structure that way. That's pretty simple :)
Stefan, I guess this is the easiest solution, we should just make sure
that there's a comment to explain why we retrieve snd_soc_card in the
unbind, since it's somewhat unusual.
Thanks!
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2020-01-22 8:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-20 12:33 [PATCH v2 0/2] Add support for sun4i HDMI audio Stefan Mavrodiev
2020-01-20 12:33 ` [PATCH v2 1/2] dmaengine: sun4i: Add support for cyclic requests with dedicated DMA Stefan Mavrodiev
2020-01-20 12:33 ` [PATCH v2 2/2] drm: sun4i: hdmi: Add support for sun4i HDMI encoder audio Stefan Mavrodiev
2020-01-20 22:46 ` kbuild test robot
2020-01-21 18:29 ` Maxime Ripard
2020-01-21 18:29 ` Maxime Ripard
2020-01-21 18:32 ` Mark Brown
2020-01-22 8:46 ` Maxime Ripard [this message]
2020-01-22 6:26 ` Stefan Mavrodiev
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=20200122084617.s2n4dqhwanmaxuch@gilmour.lan \
--to=mripard@kernel.org \
--cc=airlied@linux.ie \
--cc=broonie@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=daniel@ffwll.ch \
--cc=dmaengine@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=stefan@olimex.com \
--cc=vkoul@kernel.org \
--cc=wens@csie.org \
/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
all inboxes | Powered by JetHome®