Re: [PATCH] ALSA: aaci: report FIFO size in frames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux