Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758904AbbEEMyk (ORCPT ); Tue, 5 May 2015 08:54:40 -0400 Received: from ltw.loris.tv ([188.40.101.23]:57646 "EHLO ltw.loris.tv" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422952AbbEEMxe (ORCPT ); Tue, 5 May 2015 08:53:34 -0400 X-Greylist: delayed 431 seconds by postgrey-1.27 at vger.kernel.org; Tue, 05 May 2015 08:53:34 EDT X-Spam-Flag: NO X-Spam-Score: -2.9 Message-ID: <5548BB98.3080502@drcomp.erfurt.thur.de> Date: Tue, 05 May 2015 14:46:16 +0200 From: Adrian Knoth User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: Ben Hutchings , linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Takashi Iwai Subject: Re: [PATCH 3.2 042/221] ALSA: hdspm - Constrain periods to 2 on older cards References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2466 Lines: 80 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 > > 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 > Signed-off-by: Takashi Iwai > Signed-off-by: Ben Hutchings > --- > 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: --- old/hdspm.c 2015-05-05 14:37:06.265978237 +0200 +++ new/hdspm.c 2015-05-05 14:42:43.670742548 +0200 @@ -5966,6 +5966,9 @@ static int snd_hdspm_playback_open(struc 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); break; } @@ -6040,6 +6043,9 @@ 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); break; } Cheers 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/