aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@suse.cz>2005-01-03 13:15:54 +0100
committerJaroslav Kysela <perex@suse.cz>2005-01-03 13:15:54 +0100
commiteeba0c7db3baf8c7765a4177dbc6e26cc036589e (patch)
tree06dcc051cda062ba85ceebf6b8055371252287f6 /sound
parentfc1cee5f86736d349041f4c92b56b3e391767ad1 (diff)
downloadhistory-eeba0c7db3baf8c7765a4177dbc6e26cc036589e.tar.gz
[ALSA] buffersize and constraints on pmac
PPC PMAC driver Buffersize is a bit small compared to the OSS driver (dmasound.h says 128kb is limit for Amiga, for pmac 256kb is used) At least on Snapper, some samplerates cause choppy sound when periods<3 or buffersize is not a multiple of periodsize. Signed-off-by: Danny Tholen <obiwan@mailmij.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/ppc/pmac.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index 07f9ad60493504..7c1262743a1cc0 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -425,10 +425,10 @@ static snd_pcm_hardware_t snd_pmac_playback =
.rate_max = 44100,
.channels_min = 2,
.channels_max = 2,
- .buffer_bytes_max = 32768,
+ .buffer_bytes_max = 131072,
.period_bytes_min = 256,
.period_bytes_max = 16384,
- .periods_min = 1,
+ .periods_min = 3,
.periods_max = PMAC_MAX_FRAGS,
};
@@ -444,10 +444,10 @@ static snd_pcm_hardware_t snd_pmac_capture =
.rate_max = 44100,
.channels_min = 2,
.channels_max = 2,
- .buffer_bytes_max = 32768,
+ .buffer_bytes_max = 131072,
.period_bytes_min = 256,
.period_bytes_max = 16384,
- .periods_min = 1,
+ .periods_min = 3,
.periods_max = PMAC_MAX_FRAGS,
};
@@ -550,6 +550,8 @@ static int snd_pmac_pcm_open(pmac_t *chip, pmac_stream_t *rec, snd_pcm_substream
if (chip->can_duplex)
snd_pcm_set_sync(subs);
+ /* constraints to fix choppy sound */
+ snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
return 0;
}