Commit eeba0c7d authored by Jaroslav Kysela's avatar Jaroslav Kysela

[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: default avatarDanny Tholen <obiwan@mailmij.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent fc1cee5f
...@@ -425,10 +425,10 @@ static snd_pcm_hardware_t snd_pmac_playback = ...@@ -425,10 +425,10 @@ static snd_pcm_hardware_t snd_pmac_playback =
.rate_max = 44100, .rate_max = 44100,
.channels_min = 2, .channels_min = 2,
.channels_max = 2, .channels_max = 2,
.buffer_bytes_max = 32768, .buffer_bytes_max = 131072,
.period_bytes_min = 256, .period_bytes_min = 256,
.period_bytes_max = 16384, .period_bytes_max = 16384,
.periods_min = 1, .periods_min = 3,
.periods_max = PMAC_MAX_FRAGS, .periods_max = PMAC_MAX_FRAGS,
}; };
...@@ -444,10 +444,10 @@ static snd_pcm_hardware_t snd_pmac_capture = ...@@ -444,10 +444,10 @@ static snd_pcm_hardware_t snd_pmac_capture =
.rate_max = 44100, .rate_max = 44100,
.channels_min = 2, .channels_min = 2,
.channels_max = 2, .channels_max = 2,
.buffer_bytes_max = 32768, .buffer_bytes_max = 131072,
.period_bytes_min = 256, .period_bytes_min = 256,
.period_bytes_max = 16384, .period_bytes_max = 16384,
.periods_min = 1, .periods_min = 3,
.periods_max = PMAC_MAX_FRAGS, .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 ...@@ -550,6 +550,8 @@ static int snd_pmac_pcm_open(pmac_t *chip, pmac_stream_t *rec, snd_pcm_substream
if (chip->can_duplex) if (chip->can_duplex)
snd_pcm_set_sync(subs); snd_pcm_set_sync(subs);
/* constraints to fix choppy sound */
snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment