Re: [PATCH 3.2 042/221] ALSA: hdspm - Constrain periods to 2 on older cards
From: Ben Hutchings
Date: Tue May 05 2015 - 08:57:45 EST
On Tue, 2015-05-05 at 14:46 +0200, Adrian Knoth wrote:
> On 05/05/15 03:16, Ben Hutchings wrote:
>
> > 3.2.69-rc1 review patch. If anyone has any objections, please let me know.
>
> I do! :)
>
> >
> > From: Adrian Knoth <adi@xxxxxxxxxxxxxxxxxxxxx>
> >
> > commit f0153c3d948c1764f6c920a0675d86fc1d75813e upstream.
> >
> > RME RayDAT and AIO use a fixed buffer size of 16384 samples. With period
> > sizes of 32-4096, this translates to 4-512 periods.
> >
> > The older RME cards have a variable buffer size but require exactly two
> > periods.
> >
> > This patch enforces nperiods=2 on those cards.
> >
> > Signed-off-by: Adrian Knoth <adi@xxxxxxxxxxxxxxxxxxxxx>
> > Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
> > Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
> > ---
> > sound/pci/rme9652/hdspm.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > --- a/sound/pci/rme9652/hdspm.c
> > +++ b/sound/pci/rme9652/hdspm.c
> > @@ -6040,6 +6040,12 @@ static int snd_hdspm_capture_open(struct
> > snd_pcm_hw_constraint_minmax(runtime,
> > SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
> > 64, 8192);
> > + snd_pcm_hw_constraint_minmax(runtime,
> > + SNDRV_PCM_HW_PARAM_PERIODS,
> > + 2, 2);
> > + snd_pcm_hw_constraint_minmax(runtime,
> > + SNDRV_PCM_HW_PARAM_PERIODS,
> > + 2, 2);
> > break;
> > }
>
> This is not correct, those lines need to go to two different functions
> (snd_hdspm_playback_open and snd_hdspm_capture_open)
>
> Here is how the patch should look like:
Thanks, I've now fixed it.
[...]
> PS: This exact same problem happened to GregKH for one of his stable
> branches. Not sure what's the root cause and if it's worth
> investigating.
It's a bug in patch: https://bugs.debian.org/717782
Ben.
--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
Attachment:
signature.asc
Description: This is a digitally signed message part