From: Vitaly Chikunov <vt@altlinux.org> To: ALT Linux kernel packages development <devel-kernel@lists.altlinux.org> Subject: Re: [d-kernel] [PATCH 1/1] dw-hdmi: add flag SNDRV_PCM_INFO_BATCH for audio via hdmi on Baikal-M Date: Thu, 4 Sep 2025 02:50:57 +0300 Message-ID: <cg6rahxezrqxoxxxebtskvi7m6@altlinux.org> (raw) In-Reply-To: <20250903144151.741148-2-gnusarevda@basealt.ru> Daniil, On Wed, Sep 03, 2025 at 06:41:51PM +0400, Daniil Gnusarev wrote: > There is an unstable sound output via HDMI with the dw-hdmi-ahb-audiо > driver when working on Baikal-M. Additional setting of > the SNDRV_PCM_INFO_BATCH flag solves this problem. Let's use it. > > Signed-off-by: Daniil Gnusarev <gnusarevda@basealt.ru> > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 2 ++ > drivers/gpu/drm/bridge/synopsys/dw-hdmi-audio.h | 1 + > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 ++- > 3 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c > index 89af1b6a2ef2b..af0295d3bdfcb 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c > @@ -356,6 +356,8 @@ static int dw_hdmi_open(struct snd_pcm_substream *substream) > int ret; > > runtime->hw = dw_hdmi_hw; > + if (dw->data.batch_mode) > + runtime->hw.info |= SNDRV_PCM_INFO_BATCH; > > eld = dw->data.get_eld(dw->data.hdmi); > if (eld) { > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-audio.h b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-audio.h > index 3250588d39ff0..aa9f470fcd03a 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-audio.h > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-audio.h > @@ -11,6 +11,7 @@ struct dw_hdmi_audio_data { > struct dw_hdmi *hdmi; > u8 *(*get_eld)(struct dw_hdmi *hdmi); > unsigned regshift; > + bool batch_mode; > }; > > struct dw_hdmi_i2s_audio_data { > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > index 2805b58619a76..7dc010524c0cc 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -3527,7 +3527,8 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev, > audio.regshift = 2; > dev_info(dev, "setting audio.regshift=%d for BE-M1000 SoC\n", > audio.regshift); > - } > + audio.batch_mode = true; > + } else audio.batch_mode = false; Пожалуйста, на будущее, форматируйте код по стандартам ядра. Кроме того, ниже в ветках кода "} else if (iores && config3 & HDMI_CONFIG3_GPAUD) {" и "} else if (config0 & HDMI_CONFIG0_I2S) {" вы не инициализируете audio.batch_mode, - не создает ли это проблем с непроинициализированной памятью? Thanks, > hdmi->enable_audio = dw_hdmi_ahb_audio_enable; > hdmi->disable_audio = dw_hdmi_ahb_audio_disable; > > -- > 2.42.2 > > _______________________________________________ > devel-kernel mailing list > devel-kernel@lists.altlinux.org > https://lists.altlinux.org/mailman/listinfo/devel-kernel
next prev parent reply other threads:[~2025-09-03 23:50 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-09-03 14:41 [PATCH 0/1] Ядро 6.12/sisyphus с поддержкой СнК Байкал-М Daniil Gnusarev 2025-09-03 14:41 ` [d-kernel] [PATCH 1/1] dw-hdmi: add flag SNDRV_PCM_INFO_BATCH for audio via hdmi on Baikal-M Daniil Gnusarev 2025-09-03 23:50 ` Vitaly Chikunov [this message] 2025-09-03 23:53 ` Vitaly Chikunov 2025-09-03 23:39 ` [d-kernel] [PATCH 0/1] п╞п╢я─п╬ 6.12/sisyphus я│ п©п╬п╢п╢п╣я─п╤п╨п╬п╧ п║п╫п п▒п╟п╧п╨п╟п╩-п° Vitaly Chikunov
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=cg6rahxezrqxoxxxebtskvi7m6@altlinux.org \ --to=vt@altlinux.org \ --cc=devel-kernel@lists.altlinux.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
ALT Linux kernel packages development This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \ devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com public-inbox-index devel-kernel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git