From: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@perex.cz>
Subject: [PATCH 1/3] ALSA: emu10k1: don't limit multi-channel playback to two periods
Date: Tue, 23 May 2023 22:07:07 +0200 [thread overview]
Message-ID: <20230523200709.236023-2-oswald.buddenhagen@gmx.de> (raw)
In-Reply-To: <20230523200709.236023-1-oswald.buddenhagen@gmx.de>
For unclear reasons, the extra voice was set up with half the buffer
size instead of the period size. Commit 27ae958cf6 ("emu10k1 driver -
add multichannel device hw:x,3 [2-8/8]") mentions half-loop interrupts,
so maybe this was an artifact of an earlier iteration of the patch.
While at it, also fix periods_min of the regular playback - one period
makes just no sense.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
---
sound/pci/emu10k1/emupcm.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c
index 0572dfb80943..2764e7867b33 100644
--- a/sound/pci/emu10k1/emupcm.c
+++ b/sound/pci/emu10k1/emupcm.c
@@ -429,15 +429,16 @@ static int snd_emu10k1_efx_playback_prepare(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_emu10k1_pcm *epcm = runtime->private_data;
unsigned int start_addr;
- unsigned int channel_size;
+ unsigned int extra_size, channel_size;
int i;
start_addr = epcm->start_addr >> 1; // 16-bit voices
+ extra_size = runtime->period_size;
channel_size = runtime->buffer_size;
snd_emu10k1_pcm_init_extra_voice(emu, epcm->extra, true,
- start_addr, start_addr + (channel_size / 2));
+ start_addr, start_addr + extra_size);
epcm->ccca_start_addr = start_addr;
for (i = 0; i < NUM_EFX_PLAYBACK; i++) {
@@ -465,7 +466,7 @@ static const struct snd_pcm_hardware snd_emu10k1_efx_playback =
.buffer_bytes_max = (128*1024),
.period_bytes_max = (128*1024),
.periods_min = 2,
- .periods_max = 2,
+ .periods_max = 1024,
.fifo_size = 0,
};
@@ -925,7 +926,7 @@ static const struct snd_pcm_hardware snd_emu10k1_playback =
.channels_max = 2,
.buffer_bytes_max = (128*1024),
.period_bytes_max = (128*1024),
- .periods_min = 1,
+ .periods_min = 2,
.periods_max = 1024,
.fifo_size = 0,
};
--
2.40.0.152.g15d061e6df
next prev parent reply other threads:[~2023-05-23 20:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 20:07 [PATCH 0/3] ALSA: emu10k1: multi-channel playback related improvements Oswald Buddenhagen
2023-05-23 20:07 ` Oswald Buddenhagen [this message]
2023-05-23 20:07 ` [PATCH 2/3] ALSA: emu10k1: add synchronized start of multi-channel playback Oswald Buddenhagen
2023-05-23 20:07 ` [PATCH 3/3] ALSA: emu10k1: make channel count of multi-channel playback flexible Oswald Buddenhagen
2023-05-24 10:11 ` [PATCH 0/3] ALSA: emu10k1: multi-channel playback related improvements 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=20230523200709.236023-2-oswald.buddenhagen@gmx.de \
--to=oswald.buddenhagen@gmx.de \
--cc=alsa-devel@alsa-project.org \
--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