public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: alsa-devel@alsa-project.org, LKML <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>,
	"Niklāvs Koļesņikovs" <89q1r14hd@relay.firefox.com>,
	"Wim Taymans" <wtaymans@redhat.com>
Subject: Re: [PATCH] ALSA: usb-audio: Don't refcount multiple accesses on the single clock
Date: Mon, 05 Sep 2022 14:37:46 +0200	[thread overview]
Message-ID: <87r10qj8th.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAHmME9rbqT=dAGU_oybHYH87qkwNNFizHsSyptZU1vKQMo9dgw@mail.gmail.com>

On Mon, 05 Sep 2022 14:06:45 +0200,
Jason A. Donenfeld wrote:
> 
> On Mon, Sep 5, 2022 at 1:44 PM Takashi Iwai <tiwai@suse.de> wrote:
> >
> > On Mon, 05 Sep 2022 12:14:03 +0200,
> > Jason A. Donenfeld wrote:
> > >
> > > This reverts commit 03a8b0df757f1beb21ba1626e23ca7412e48b525.
> > > This reverts commit c11117b634f4f832c4420d3cf41c44227f140ce1.
> > >
> > > Pipewire and PulseAudio start devices with 44.1khz before changing them
> > > to 48khz (or something different). By locking the rate, daemons are
> > > unable to enumerate possible rates, and so they never change them to a
> > > more optimal rate. This revert patch should allow 48khz audio again.
> >
> > Well, in that case, the revert is no right solution, IMO.
> > If the patch caused a problem, it means that the application tries to
> > change the rate while it's being still running by another.  If it
> > worked, it worked just casually without noticing the bad behavior.
> 
> Not sure this is really what's happening. I think the issue is that
> alsa reports that the device only supports a limited set of rates.

This patch doesn't change the "report" mechanism.  Instead what this
patch does is to bail out as an error if you try to change the rate of
a coupled stream while another stream is already running.

> Pipewire then doesn't see 48khz, so it doesn't try to
> stop,reclock,start.
> 
> Maybe Wim or Niklavs can provide more info about this.

More information is appreciated :)


Takashi

  reply	other threads:[~2022-09-05 12:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05 10:14 [PATCH] ALSA: usb-audio: Don't refcount multiple accesses on the single clock Jason A. Donenfeld
2022-09-05 11:44 ` Takashi Iwai
2022-09-05 12:06   ` Jason A. Donenfeld
2022-09-05 12:37     ` Takashi Iwai [this message]
2022-09-05 12:16   ` Jason A. Donenfeld
2022-09-07  8:00     ` Takashi Iwai
2022-09-07  9:28       ` Jason A. Donenfeld
2022-09-07  9:41         ` Takashi Iwai

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=87r10qj8th.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=89q1r14hd@relay.firefox.com \
    --cc=Jason@zx2c4.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wtaymans@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox