瀏覽代碼

[ALSA] cmipci: allow 96 kHz playback on non-multichannel rear

Move the code that enables 96 kHz out of the if() that checks for
availability of both DMA channels so that it is enabled even when
another stream is playing on the front channels.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Clemens Ladisch 18 年之前
父節點
當前提交
22a22f5aac
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      sound/pci/cmipci.c

+ 6 - 6
sound/pci/cmipci.c

@@ -1623,14 +1623,14 @@ static int snd_cmipci_playback2_open(struct snd_pcm_substream *substream)
 			else if (cm->max_channels == 8)
 			else if (cm->max_channels == 8)
 				snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, &hw_constraints_channels_8);
 				snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, &hw_constraints_channels_8);
 		}
 		}
-		if (cm->chip_version == 68) {
-			runtime->hw.rates |= SNDRV_PCM_RATE_88200 |
-					     SNDRV_PCM_RATE_96000;
-			runtime->hw.rate_max = 96000;
-		}
-		snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 0, 0x10000);
 	}
 	}
 	mutex_unlock(&cm->open_mutex);
 	mutex_unlock(&cm->open_mutex);
+	if (cm->chip_version == 68) {
+		runtime->hw.rates |= SNDRV_PCM_RATE_88200 |
+				     SNDRV_PCM_RATE_96000;
+		runtime->hw.rate_max = 96000;
+	}
+	snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 0, 0x10000);
 	return 0;
 	return 0;
 }
 }