Commit c5f88030 authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] Fix sample rates of Revo 7.1

ICE1712 driver,ICE1724 driver
Fixed the available sample rates of Revo 7.1 board.
AK codecs don't support the rate below 32k Hz.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent b9c0bda6
......@@ -336,6 +336,7 @@ struct _snd_ice1712 {
struct semaphore open_mutex;
snd_pcm_substream_t *pcm_reserved[4];
snd_pcm_hw_constraint_list_t *hw_rates; /* card-specific rate constraints */
unsigned int akm_codecs;
akm4xxx_t *akm;
......
......@@ -718,6 +718,13 @@ static snd_pcm_hardware_t snd_vt1724_2ch_stereo =
static int set_rate_constraints(ice1712_t *ice, snd_pcm_substream_t *substream)
{
snd_pcm_runtime_t *runtime = substream->runtime;
if (ice->hw_rates) {
/* hardware specific */
runtime->hw.rate_min = ice->hw_rates->list[0];
runtime->hw.rate_max = ice->hw_rates->list[ice->hw_rates->count - 1];
runtime->hw.rates = SNDRV_PCM_RATE_KNOT;
return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, ice->hw_rates);
}
if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) {
/* I2S */
/* VT1720 doesn't support more than 96kHz */
......
......@@ -128,6 +128,17 @@ static struct snd_ak4xxx_private akm_revo_surround_priv __devinitdata = {
.mask_flags = 0,
};
static unsigned int rates[] = {
32000, 44100, 48000, 64000, 88200, 96000,
176400, 192000,
};
static snd_pcm_hw_constraint_list_t revo_rates = {
.count = ARRAY_SIZE(rates),
.list = rates,
.mask = 0,
};
static int __devinit revo_init(ice1712_t *ice)
{
akm4xxx_t *ak;
......@@ -162,6 +173,8 @@ static int __devinit revo_init(ice1712_t *ice)
break;
}
ice->hw_rates = &revo_rates; /* AK codecs don't support lower than 32k */
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment