Return-Path: Received: from ltw.loris.tv ([188.40.101.23]:40651 "EHLO ltw.loris.tv" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754572AbbFPJzB (ORCPT ); Tue, 16 Jun 2015 05:55:01 -0400 Message-ID: <557FF02B.1080209@drcomp.erfurt.thur.de> Date: Tue, 16 Jun 2015 11:45:15 +0200 From: Adrian Knoth MIME-Version: 1.0 To: lizf@kernel.org, stable@vger.kernel.org CC: linux-kernel@vger.kernel.org, Takashi Iwai , Zefan Li Subject: Re: [PATCH 3.4 035/172] ALSA: hdspm - Constrain periods to 2 on older cards References: <1434443587-4599-1-git-send-email-lizf@kernel.org> <1434443826-4929-35-git-send-email-lizf@kernel.org> In-Reply-To: <1434443826-4929-35-git-send-email-lizf@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On 06/16/15 10:34, lizf@kernel.org wrote: > From: Adrian Knoth > 3.4.108-rc1 review patch. If anyone has any objections, please let me > know. I do. > commit f0153c3d948c1764f6c920a0675d86fc1d75813e upstream. > > diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c > index bc030a2..0627ffe 100644 > --- a/sound/pci/rme9652/hdspm.c > +++ b/sound/pci/rme9652/hdspm.c > @@ -6042,6 +6042,12 @@ static int snd_hdspm_capture_open(struct snd_pcm_substream *substream) > 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: diff -u -r old/hdspm.c new/hdspm.c --- old/hdspm.c 2015-06-16 11:41:37.070389307 +0200 +++ new/hdspm.c 2015-06-16 11:44:02.101257093 +0200 @@ -6114,6 +6114,9 @@ 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; } @@ -6188,6 +6191,9 @@ 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; }