Re: [PATCH RFC 3/3] drm/i2c: tda998x: add support for bclk_ratio

2019-02-26 Thread Sven Van Asbroeck
tly which adds bclk-ratio support to simple-card. Tested-by: Sven Van Asbroeck ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[RFC PATCH 2/2] ASoC: core: standardize snd_soc_dai_set_bclk_ratio() behaviour

2019-02-26 Thread Sven Van Asbroeck
snd_soc_dai_set_bclk_ratio() should behave like other snd_soc_dai_XXX functions, and return -ENOTSUPP if the callback in driver->ops is NULL. Signed-off-by: Sven Van Asbroeck --- sound/soc/soc-core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/soc-cor

[RFC PATCH 1/2] ASoC: simple-card: add support for bclk_ratio

2019-02-26 Thread Sven Van Asbroeck
is converted to the bclk to sample ratio before being passed into set_bclk_ratio(). Signed-off-by: Sven Van Asbroeck --- sound/soc/generic/simple-card.c | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc

Re: [PATCH RFC 1/3] drm/i2c: tda998x: implement different I2S flavours

2019-02-26 Thread Sven Van Asbroeck
998x. Left justified does not appear to work, but I believe this is because of missing support for left-justified master mode in fsl_ssi ? So on an imx6q ssi, using i2s philips format only: Tested-by: Sven Van Asbroeck ___ dri-devel mailing list dri-devel@li

Re: [RFC PATCH 1/2] ASoC: simple-card: add support for bclk_ratio

2019-02-27 Thread Sven Van Asbroeck
On Tue, Feb 26, 2019 at 10:45 AM Russell King - ARM Linux admin wrote: > > > I can't see how you'd extend a single I2S setup to support multi- > channel audio without either adding more I2S data lines or adding > additional WS signals (so making it e.g., a binary number). > That's a very good

Re: [RFC PATCH 1/2] ASoC: simple-card: add support for bclk_ratio

2019-02-27 Thread Sven Van Asbroeck
On Tue, Feb 26, 2019 at 4:11 AM Russell King - ARM Linux admin wrote: > > This code actually requires a lot more thought - while it may solve > Sven's issue, it isn't generic. Wholeheartedly agree. My patches are marked RFC in the hope that they will be picked apart by folks much more in touch

Re: [RFC PATCH 1/2] ASoC: simple-card: add support for bclk_ratio

2019-02-27 Thread Sven Van Asbroeck
On Tue, Feb 26, 2019 at 4:11 AM Russell King - ARM Linux admin wrote: > > Given that it is normal to talk about I2S being clocked at "64fs", > "32fs" etc, wouldn't it just be much neater to specify _this_ value > in DT, rather than half that value? > Would we be able to reach consensus on

[PATCH 1/2] drm/i2c: tda998x: adjust CTS_N audio pre-divider calculation

2019-02-22 Thread Sven Van Asbroeck
io formats still work. Such as S16_LE or S20_LE. - I have no access to a datasheet which accurately describes the CTS_N register. So I cannot check if my assumption is correct. Tested with an imx6 ssi. Cc: Peter Rosin Signed-off-by: Sven Van Asbroeck --- drivers/gpu/drm/i2c/tda998x

[PATCH 2/2] sound: hdmi-codec: propagate physical_width

2019-02-22 Thread Sven Van Asbroeck
Infrastructure patch which allows the tda998x patch to build. This patch will be submitted for review if/when the tda998x patch gets accepted. Signed-off-by: Sven Van Asbroeck --- include/sound/hdmi-codec.h| 1 + sound/soc/codecs/hdmi-codec.c | 1 + 2 files changed, 2 insertions(+) diff

Re: [PATCH 1/2] drm/i2c: tda998x: adjust CTS_N audio pre-divider calculation

2019-02-25 Thread Sven Van Asbroeck
On Fri, Feb 22, 2019 at 8:21 AM Russell King - ARM Linux admin wrote: > > On Thu, Feb 21, 2019 at 01:18:13PM -0500, Sven Van Asbroeck wrote: > > > [SNDRV_PCM_FORMAT_S24_LE] = { > > .width = 24, .phys = 32, .le = 1, .signd = 1, >

Re: [PATCH 1/2] drm/i2c: tda998x: adjust CTS_N audio pre-divider calculation

2019-02-25 Thread Sven Van Asbroeck
On Fri, Feb 22, 2019 at 4:36 PM Russell King - ARM Linux admin wrote: > There's actually two threads of conversation going, and I recently had > a reply from the maintainer of hdmi-codec suggesting a way forward - so > I've coded that up as the three RFC patches you should have just > received.

Re: [PATCH 1/2] drm/i2c: tda998x: adjust CTS_N audio pre-divider calculation

2019-02-25 Thread Sven Van Asbroeck
Russell, thank you so much for your patience, help and explanation, I really appreciate it ! On Fri, Feb 22, 2019 at 3:16 PM Russell King - ARM Linux admin wrote: > > A possible solution to that would be for hdmi-codec to default that to > zero unless it's been definitively provided by the ASoC

[PATCH v1 2/2] drm/i2c: tda998x: remove indirect reg_read/_write() calls

2019-05-27 Thread Sven Van Asbroeck
Remove indirect reg_read/_write() calls, and replace them with direct calls to regmap functions. For the sake of readability, keep the following indirect register access calls: - reg_set() - reg_clear() - reg_write16() Signed-off-by: Sven Van Asbroeck --- drivers/gpu/drm/i2c/tda998x_drv.c

[PATCH v1 1/2] drm/i2c: tda998x: access chip registers via a regmap

2019-05-27 Thread Sven Van Asbroeck
debugfs Cons: - this will probably require extensive testing Tested on a TDA19988 using a Freescale/NXP imx6q. Signed-off-by: Sven Van Asbroeck --- I originally hacked this together while debugging an incompatibility between the tda988x's audio input and the audio codec I was driving

Re: [PATCH 04/13] drm/i2c: tda998x: derive CTS_N value from aclk sample rate ratio

2019-06-13 Thread Sven Van Asbroeck
On Tue, Jun 11, 2019 at 7:02 AM Russell King wrote: > > The TDA998x derives the CTS value using the supplied I2S bit clock > (ACLK, in TDA998x parlence) rather than 128·fs. TDA998x uses two > constants named m and k in the CTS generator such that we have this > relationship between the I2S

Re: [PATCH 04/13] drm/i2c: tda998x: derive CTS_N value from aclk sample rate ratio

2019-06-13 Thread Sven Van Asbroeck
On Wed, Jun 12, 2019 at 12:28 PM Russell King - ARM Linux admin wrote: > > The platform data path has never supported the HDMI codec way of doing > things, so that really isn't a concern here. The platform data way > was sufficient to allow SPDIF streams to work with a static setup of > the

Re: [PATCH 01/13] drm/i2c: tda998x: introduce tda998x_audio_settings

2019-06-13 Thread Sven Van Asbroeck
On Tue, Jun 11, 2019 at 7:01 AM Russell King wrote: > > Introduce a structure to hold the register values to be programmed while > programming the TDA998x audio settings. This is currently a stub > structure, which will be populated in subsequent commits. > > When we initialise this from the

Re: [PATCH 04/13] drm/i2c: tda998x: derive CTS_N value from aclk sample rate ratio

2019-06-13 Thread Sven Van Asbroeck
On Wed, Jun 12, 2019 at 12:42 PM Russell King - ARM Linux admin wrote: > > I think you're confusing tda998x_derive_cts_n() and tda998x_get_adiv(). > tda998x_derive_cts_n() only returns 0 or -EINVAL. > True. Apologies for the confusion. ___ dri-devel

Re: [PATCH 03/13] drm/i2c: tda998x: improve programming of audio divisor

2019-06-13 Thread Sven Van Asbroeck
On Tue, Jun 11, 2019 at 7:02 AM Russell King wrote: > > Improve the selection of the audio clock divisor so that more modes > and sample rates work. > > Signed-off-by: Russell King > --- +static u8 tda998x_get_adiv(struct tda998x_priv *priv, unsigned int fs) +{ + unsigned long

Re: [PATCH 00/13] tda998x updates

2019-06-13 Thread Sven Van Asbroeck
On Tue, Jun 11, 2019 at 7:01 AM Russell King - ARM Linux admin wrote: > > This series represents development work collected over the last six > months to improve the TDA998x driver, particularly for the audio > side. These patches can be found in my "drm-tda998x-devel" branch > at

Re: [PATCH 12/13] drm/i2c: tda998x: add bridge timing information

2019-06-13 Thread Sven Van Asbroeck
On Tue, Jun 11, 2019 at 7:04 AM Russell King wrote: > > Add bridge timing information so that bridge users can figure out the > timing parameters that are necessary for TDA998x. > > Signed-off-by: Russell King > --- +static const struct drm_bridge_timings tda9989_timings = { +

Re: [PATCH 08/13] drm/i2c: tda998x: move audio routing configuration

2019-06-13 Thread Sven Van Asbroeck
On Tue, Jun 11, 2019 at 7:02 AM Russell King wrote: > > Move the mux and clocking selection out of tda998x_configure_audio() > into the parent functions, so we can validate this when parameters > are set outside of the audio mutex. > > Signed-off-by: Russell King > --- +/* Configure the TDA998x

Re: [PATCH 09/13] drm/i2c: tda998x: clean up tda998x_configure_audio()

2019-06-13 Thread Sven Van Asbroeck
On Tue, Jun 11, 2019 at 7:02 AM Russell King wrote: > > tda998x_configure_audio() is called via some paths where an error > return is meaningless, and as a result of moving the audio routing > code, this function no longer returns any errors, so let's make it > void. We can also make

[PATCH] drm/etnaviv: optionally set gpu linear window to cma area

2019-06-19 Thread Sven Van Asbroeck
lkml/2017/11/15/599 To: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: David Airlie Cc: Daniel Vetter Cc: etna...@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-ker...@vger.kernel.org Cc: Alexey Brodkin Cc: Gaël PORTAY Signed-off-by: Sven Van Asbroeck --- devicetree

Re: [PATCH v1 1/2] drm/i2c: tda998x: access chip registers via a regmap

2019-06-21 Thread Sven Van Asbroeck
On Fri, Jun 21, 2019 at 11:15 AM Russell King - ARM Linux admin wrote: > > Another con is the need to keep the functions that detail the register > properties up to date, which if they're wrong may result in unexpected > behaviour. > > I subscribe to the "keep it simple" approach, and regmap,

Re: [PATCH v2] drm/amdgpu: fix multiple memory leaks

2019-09-19 Thread Sven Van Asbroeck
On Wed, Sep 18, 2019 at 3:09 PM Navid Emamdoost wrote: > > i2s_pdata = kcalloc(3, sizeof(struct i2s_platform_data), GFP_KERNEL); > if (i2s_pdata == NULL) { > - kfree(adev->acp.acp_res); > - kfree(adev->acp.acp_cell); > - return -ENOMEM; >

Re: [PATCH v2] drm/amdgpu: fix multiple memory leaks

2019-09-20 Thread Sven Van Asbroeck
Hi Christian, On Thu, Sep 19, 2019 at 4:05 AM Koenig, Christian wrote: > > > +out4: > > + kfree(i2s_pdata); > > +out3: > > + kfree(adev->acp.acp_res); > > +out2: > > + kfree(adev->acp.acp_cell); > > +out1: > > + kfree(adev->acp.acp_genpd); > > kfree on a NULL pointer is harmless,

Re: [PATCH v2 01/13] drm/i2c: tda998x: introduce tda998x_audio_settings

2019-06-14 Thread Sven Van Asbroeck
Nit: checkpatch.pl appears unhappy with this patch: WARNING: line over 80 characters #222: FILE: drivers/gpu/drm/i2c/tda998x_drv.c:1011: + audio.params.config = priv->audio_port[i].config; WARNING: line over 80 characters #230: FILE: drivers/gpu/drm/i2c/tda998x_drv.c:1017: + audio.params.config

Re: [PATCH v2 00/13] tda998x updates

2019-06-14 Thread Sven Van Asbroeck
" branch > at git://git.armlinux.org.uk/~rmk/linux-arm.git For the whole patchset, after 'hacking' the bclk_ratio to correspond with my imx6q ssi's wire format: Tested-by: Sven Van Asbroeck ___ dri-devel mailing list dri-devel@lists.freedesktop.org http