Skip to content

Commit

Permalink
ALSA: hdspm - Constrain periods to 2 on older cards
Browse files Browse the repository at this point in the history
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@drcomp.erfurt.thur.de>
Cc: <stable@vger.kernel.org> # 2.6.39+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Adrian Knoth authored and Takashi Iwai committed Feb 13, 2015
1 parent 7976eb4 commit f0153c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sound/pci/rme9652/hdspm.c
Original file line number Diff line number Diff line change
Expand Up @@ -6082,6 +6082,9 @@ static int snd_hdspm_playback_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);
break;
}

Expand Down Expand Up @@ -6156,6 +6159,9 @@ 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);
break;
}

Expand Down

0 comments on commit f0153c3

Please sign in to comment.