Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>,
	Jaroslav Kysela <perex@perex.cz>
Subject: Re: [PATCH] ALSA: aaci: report FIFO size in frames
Date: Mon, 1 Apr 2024 11:37:27 +0100	[thread overview]
Message-ID: <ZgqOZ0B8h3l48aoh@shell.armlinux.org.uk> (raw)
In-Reply-To: <ZgqNFjOU4mpcyHH8@shell.armlinux.org.uk>

On Mon, Apr 01, 2024 at 11:31:50AM +0100, Russell King (Oracle) wrote:
> On Mon, Apr 01, 2024 at 12:13:39PM +0200, Oswald Buddenhagen wrote:
> > We already have frames, so don't convert them to bytes - the mid-layer
> > would convert them to frames again anyway.
> ...
> > -	/*
> > -	 * ALSA wants the byte-size of the FIFOs.  As we only support
> > -	 * 16-bit samples, this is twice the FIFO depth irrespective
> > -	 * of whether it's in compact mode or not.
> > -	 */
> > -	runtime->hw.fifo_size = aaci->fifo_depth * 2;
> > +	runtime->hw.fifo_size = aaci->fifo_depth;
> 
> When did ALSA change to wanting frames in "fifo_size" rather than bytes?

In fact, I think your patch is wrong. See snd_pcm_lib_ioctl_fifo_size().

runtime->hw.fifo_size is only measured in _frames_ if
SNDRV_PCM_INFO_FIFO_IN_FRAMES is set. AACI doesn't set this flag,
so runtime->hw.fifo_size is in bytes.

So now I have to ask what caused you to generate this patch. I don't
think you've actually run this driver, so presumably it's by flawed
code inspection... if so, and if you've made changes similar to this
to other drivers, that probably means that those changes are also
wrong.

Also, I have to wonder whether this patch is an April Fools joke.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2024-04-01 10:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 10:13 [PATCH] ALSA: aaci: report FIFO size in frames Oswald Buddenhagen
2024-04-01 10:31 ` Russell King (Oracle)
2024-04-01 10:37   ` Russell King (Oracle) [this message]
2024-04-01 10:53     ` Oswald Buddenhagen
2024-04-01 11:04       ` Russell King (Oracle)
2024-04-01 11:45         ` Oswald Buddenhagen
2024-04-01 13:34           ` Russell King (Oracle)
2024-04-01 14:17             ` Oswald Buddenhagen
2024-04-01 20:59               ` Russell King (Oracle)
2024-04-01 23:01                 ` Oswald Buddenhagen
2024-04-01 23:25                   ` Russell King (Oracle)
2024-04-02 10:46                     ` Oswald Buddenhagen

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=ZgqOZ0B8h3l48aoh@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=oswald.buddenhagen@gmx.de \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /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