All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jyri Sarha <jsarha@ti.com>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	peter.ujfalusi@ti.com, tomi.valkeinen@ti.com,
	dri-devel@lists.freedesktop.org, liam.r.girdwood@linux.intel.com,
	tony@atomide.com, broonie@kernel.org, bcousson@baylibre.com,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH 2/3] drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding
Date: Fri, 5 Aug 2016 12:02:39 +0300	[thread overview]
Message-ID: <3a3dcfa4-cec8-53f8-eddb-9a0e04c10ac9@ti.com> (raw)
In-Reply-To: <20160804140712.GO5783@n2100.arm.linux.org.uk>

On 08/04/16 17:07, Russell King - ARM Linux wrote:
> On Tue, Aug 02, 2016 at 03:05:08PM +0300, Jyri Sarha wrote:
>> +	memcpy(audio.status, params->iec.status,
>> +	       min(sizeof(audio.status), sizeof(params->iec.status)));
> 
> As mentioned in the other patch, the audio status does not directly
> correspond with the AES bytes, so this ends up causing the driver to
> write the wrong bytes to the wrong registers.
> 

As I said earlier, I'd rather have it as plain AES/IEC958 channel status
bits buffer.

>> +	ret = tda998x_configure_audio(priv,
>> +				      &audio,
>> +				      priv->encoder.crtc->hwmode.clock);
> 
> What happens if audio changes at the same time that the video mode
> changes?  What protection is there against two threads concurrently
> executing tda998x_configure_audio() ?
> 

Oh, yes. I definitely need some locking here. The same lock could
protect the atomicity of tda998x_audio_params update and usage.

>> +	priv->audio_pdev = platform_device_register_data(
>> +		dev, HDMI_CODEC_DRV_NAME, PLATFORM_DEVID_AUTO,
>> +		&codec_data, sizeof(codec_data));
> 
> I'd much prefer that this was a child of the I2C device, which will
> show the relationship between this virtual platform device and the
> device which it's associated with.  That can be done via
> platform_device_register_full().
> 

That may be a problem. The ASoC card device tree binding current looks
for the ASoC DAI's parent's of-node if it can not find the node for the
DAI-device itself. Indicating ASoC DAI-link by referencing the parent
i2c device simply won't work, because there may be other ASoC codecs on
the same i2c bus. Adding a separate DT-node for a virtual audio device
should be possible, but it needs some thinking and may have its own
problems. I can not follow the reasoning behind this, is this really
necessary?

Best regards,
Jyri
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-08-05  9:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02 12:05 [PATCH 0/3] drm/i2c: tda998x ASoC hdmi-codec support + BeagleBoneBlack audio support Jyri Sarha
2016-08-02 12:05 ` [PATCH 1/3] drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata Jyri Sarha
     [not found]   ` <5adcd94104080abcd5b072a5d6a85b85c5ea0584.1470129989.git.jsarha-l0cyMroinI0@public.gmane.org>
2016-08-04 13:31     ` Russell King - ARM Linux
2016-08-05  9:02       ` Jyri Sarha
2016-08-06 16:57   ` Russell King - ARM Linux
2016-08-06 17:56   ` Russell King - ARM Linux
2016-08-02 12:05 ` [PATCH 2/3] drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding Jyri Sarha
     [not found]   ` <ce10548e1c28270d80ee99a525e117d0d25f5656.1470129989.git.jsarha-l0cyMroinI0@public.gmane.org>
2016-08-04 14:07     ` Russell King - ARM Linux
2016-08-05  9:02       ` Jyri Sarha [this message]
     [not found]         ` <3a3dcfa4-cec8-53f8-eddb-9a0e04c10ac9-l0cyMroinI0@public.gmane.org>
2016-08-05 16:48           ` Russell King - ARM Linux
     [not found]             ` <20160805164845.GP5783-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2016-08-05 16:59               ` Mark Brown
     [not found]                 ` <20160805165959.GA10383-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-08-05 17:04                   ` Russell King - ARM Linux
2016-08-05 17:59                     ` Mark Brown
2016-08-05 22:19                       ` Russell King - ARM Linux
     [not found]                         ` <20160805221944.GR5783-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2016-08-08 12:15                           ` Jyri Sarha
2016-08-02 12:05 ` [PATCH 3/3] ARM: dts: am335x-boneblack: Add HDMI audio support Jyri Sarha

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=3a3dcfa4-cec8-53f8-eddb-9a0e04c10ac9@ti.com \
    --to=jsarha@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bcousson@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=peter.ujfalusi@ti.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=tony@atomide.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.