All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@perex.cz>,
	Russell King <rmk@arm.linux.org.uk>
Subject: [PATCH] ALSA: aaci: report FIFO size in frames
Date: Mon,  1 Apr 2024 12:13:39 +0200	[thread overview]
Message-ID: <20240401101339.506625-1-oswald.buddenhagen@gmx.de> (raw)

We already have frames, so don't convert them to bytes - the mid-layer
would convert them to frames again anyway.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
---

Is this actually right? What about stereo?
cf. 5d350cba486de34eff99d0394d8fb436af54522e

Cc: Russell King <rmk@arm.linux.org.uk>
---
 sound/arm/aaci.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index c3340b8ff3da..3655e88f3fca 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -350,6 +350,7 @@ static const struct snd_pcm_hardware aaci_hw_info = {
 				  SNDRV_PCM_INFO_MMAP_VALID |
 				  SNDRV_PCM_INFO_INTERLEAVED |
 				  SNDRV_PCM_INFO_BLOCK_TRANSFER |
+				  SNDRV_PCM_INFO_FIFO_IN_FRAMES |
 				  SNDRV_PCM_INFO_RESUME,

 	/*
@@ -430,12 +431,7 @@ static int aaci_pcm_open(struct snd_pcm_substream *substream)
 			snd_ac97_pcm_double_rate_rules(runtime);
 	}

-	/*
-	 * 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;

 	mutex_lock(&aaci->irq_lock);
 	if (!aaci->users++) {
--
2.42.0.419.g70bf8a5751


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

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 10:13 Oswald Buddenhagen [this message]
2024-04-01 10:31 ` [PATCH] ALSA: aaci: report FIFO size in frames Russell King (Oracle)
2024-04-01 10:37   ` Russell King (Oracle)
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=20240401101339.506625-1-oswald.buddenhagen@gmx.de \
    --to=oswald.buddenhagen@gmx.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=perex@perex.cz \
    --cc=rmk@arm.linux.org.uk \
    --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 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.