diff options
author | Jaroslav Kysela <perex@suse.cz> | 2005-01-03 13:15:54 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-01-03 13:15:54 +0100 |
commit | eeba0c7db3baf8c7765a4177dbc6e26cc036589e (patch) | |
tree | 06dcc051cda062ba85ceebf6b8055371252287f6 /sound | |
parent | fc1cee5f86736d349041f4c92b56b3e391767ad1 (diff) | |
download | history-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.c | 10 |
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; } |