All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Christian Zigotzky <chzigotzky@xenosoft.de>
Cc: Takashi Iwai <tiwai@suse.de>,
	zzzccc427@gmail.com, perex@perex.cz, linux-sound@vger.kernel.org,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	"R.T.Dickinson" <rtd2@xtra.co.nz>,
	mad skateman <madskateman@gmail.com>,
	Damien Stewart <hypexed@yahoo.com.au>,
	Christian Zigotzky <info@xenosoft.de>
Subject: Re: Void PPC: PulseAudio issue with sound updates 7.4-rc1
Date: Tue, 03 Nov 2026 15:38:37 +0100	[thread overview]
Message-ID: <874idyx9n6.wl-tiwai@suse.de> (raw)
In-Reply-To: <BD226162-844C-449D-A486-8888184DEBF0@xenosoft.de>

On Tue, 03 Nov 2026 13:00:24 +0100,
Christian Zigotzky wrote:
> 
> On 03 November 2026 at 08:44 am, Takashi Iwai <tiwai@suse.de> wrote:
> 
> Have you tried changing the call of snd_pcm_hw_refine_with_lock() in
> snd_pcm_ioctl_hw_params_compat(), too?  Or check the call in
> snd_pcm_hw_refine_old_user(), too.
> 
> If it doesn't change even if you replace all callers of
> snd_pcm_hw_refine_with_lock() with snd_pcm_hw_refine(), something
> wrong in the test itself.
> 
> 
> Takashi
> 
> - - -
> 
> I have tried it and sound works again.

Then please figure out which replacement of
snd_pcm_hw_refine_with_lock() actually matters.
(You can keep snd_pcm_hw_refine_with_lock() definition there.)


thanks,

Takashi

> 
> My modifications:
> 
> diff -rupN a/sound/core/pcm_compat.c b/sound/core/pcm_compat.c
> --- a/sound/core/pcm_compat.c	2026-11-01 22:26:31.000000000 +0100
> +++ b/sound/core/pcm_compat.c	2026-11-03 10:01:54.228010513 +0100
> @@ -252,7 +252,7 @@ static int snd_pcm_ioctl_hw_params_compa
>  		return -EFAULT;
>  
>  	if (refine) {
> -		err = snd_pcm_hw_refine_with_lock(substream, data);
> +		err = snd_pcm_hw_refine(substream, data);
>  		if (err < 0)
>  			return err;
>  		err = fixup_unreferenced_params(substream, data);
> diff -rupN a/sound/core/pcm_native.c b/sound/core/pcm_native.c
> --- a/sound/core/pcm_native.c	2026-11-01 22:26:31.000000000 +0100
> +++ b/sound/core/pcm_native.c	2026-11-03 10:02:24.836343549 +0100
> @@ -932,29 +932,6 @@ static int snd_pcm_hw_params_user(struct
>   * this one should be used for ioctls and other external paths instead of
>   * direct call of snd_pcm_hw_refine()
>   */
> -static int snd_pcm_hw_refine_with_lock(struct snd_pcm_substream *substream,
> -				       struct snd_pcm_hw_params *params)
> -{
> -	struct snd_pcm_runtime *runtime;
> -	int err;
> -
> -	if (PCM_RUNTIME_CHECK(substream))
> -		return -ENXIO;
> -	runtime = substream->runtime;
> -	err = snd_pcm_buffer_access_lock(runtime);
> -	if (err < 0)
> -		return err;
> -	err = hw_params_state_check(substream);
> -	if (err)
> -		goto unlock;
> -
> -	err = snd_pcm_hw_refine(substream, params);
> -
> - unlock:
> -	snd_pcm_buffer_access_unlock(runtime);
> -	return err;
> -}
> -
>  static int snd_pcm_hw_refine_user(struct snd_pcm_substream *substream,
>  				  struct snd_pcm_hw_params __user * _params)
>  {
> @@ -965,7 +942,7 @@ static int snd_pcm_hw_refine_user(struct
>  	if (IS_ERR(params))
>  		return PTR_ERR(params);
>  
> -	err = snd_pcm_hw_refine_with_lock(substream, params);
> +	err = snd_pcm_hw_refine(substream, params);
>  	if (err < 0)
>  		return err;
>  
> @@ -4247,7 +4224,7 @@ static int snd_pcm_hw_refine_old_user(st
>  	if (IS_ERR(oparams))
>  		return PTR_ERR(oparams);
>  	snd_pcm_hw_convert_from_old_params(params, oparams);
> -	err = snd_pcm_hw_refine_with_lock(substream, params);
> +	err = snd_pcm_hw_refine(substream, params);
>  	if (err < 0)
>  		return err;

  reply	other threads:[~2026-11-03 14:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-01  9:15 Void PPC: PulseAudio issue with sound updates 7.4-rc1 Christian Zigotzky
2026-11-01 14:53 ` Christian Zigotzky
2026-11-01 15:26   ` Takashi Iwai
2026-11-03  7:34     ` Christian Zigotzky
2026-11-03  7:44       ` Takashi Iwai
2026-11-03 12:00         ` Christian Zigotzky
2026-11-03 14:38           ` Takashi Iwai [this message]
2026-11-04  0:40             ` [PATCH] ALSA: pcm: Allow HW_REFINE queries with mapped buffers Vincent Cloutier
2026-11-04  5:27               ` Christian Zigotzky
2026-11-04  7:30                 ` Takashi Iwai
2026-11-04  7:28               ` Takashi Iwai
2026-11-04 11:38               ` Christian Zigotzky

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=874idyx9n6.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=chzigotzky@xenosoft.de \
    --cc=hypexed@yahoo.com.au \
    --cc=info@xenosoft.de \
    --cc=linux-sound@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=madskateman@gmail.com \
    --cc=perex@perex.cz \
    --cc=rtd2@xtra.co.nz \
    --cc=zzzccc427@gmail.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.