ALSA: asihpi - Support single-rate no-SRC cards
Cards without settable local samplerate and without SRC still must have a valid samplerate. This fixed rate is determined by reading the current rate for the card. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
committed by
Takashi Iwai
parent
677cd904ab
commit
7bf76c33e9
@@ -381,13 +381,13 @@ static void snd_card_asihpi_pcm_samplerates(struct snd_card_asihpi *asihpi,
|
|||||||
"No local sampleclock, err %d\n", err);
|
"No local sampleclock, err %d\n", err);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (idx = 0; idx < 100; idx++) {
|
for (idx = -1; idx < 100; idx++) {
|
||||||
if (hpi_sample_clock_query_local_rate(
|
if (idx == -1) {
|
||||||
h_control, idx, &sample_rate)) {
|
if (hpi_sample_clock_get_sample_rate(h_control,
|
||||||
if (!idx)
|
&sample_rate))
|
||||||
snd_printk(KERN_ERR
|
continue;
|
||||||
"Local rate query failed\n");
|
} else if (hpi_sample_clock_query_local_rate(h_control,
|
||||||
|
idx, &sample_rate)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -440,8 +440,6 @@ static void snd_card_asihpi_pcm_samplerates(struct snd_card_asihpi *asihpi,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* printk(KERN_INFO "Supported rates %X %d %d\n",
|
|
||||||
rates, rate_min, rate_max); */
|
|
||||||
pcmhw->rates = rates;
|
pcmhw->rates = rates;
|
||||||
pcmhw->rate_min = rate_min;
|
pcmhw->rate_min = rate_min;
|
||||||
pcmhw->rate_max = rate_max;
|
pcmhw->rate_max = rate_max;
|
||||||
|
Reference in New Issue
Block a user