Lines Matching refs:rate
45 static int set_clock(struct snd_tscm *tscm, unsigned int rate, in set_clock() argument
57 if (rate > 0) { in set_clock()
60 if ((rate % 44100) == 0) { in set_clock()
63 if (rate / 44100 == 2) in set_clock()
65 } else if ((rate % 48000) == 0) { in set_clock()
68 if (rate / 48000 == 2) in set_clock()
98 int snd_tscm_stream_get_rate(struct snd_tscm *tscm, unsigned int *rate) in snd_tscm_stream_get_rate() argument
111 *rate = 44100; in snd_tscm_stream_get_rate()
113 *rate = 48000; in snd_tscm_stream_get_rate()
119 *rate *= 2; in snd_tscm_stream_get_rate()
178 static int set_stream_formats(struct snd_tscm *tscm, unsigned int rate) in set_stream_formats() argument
195 return set_clock(tscm, rate, INT_MAX); in set_stream_formats()
272 static int keep_resources(struct snd_tscm *tscm, unsigned int rate) in keep_resources() argument
278 err = amdtp_tscm_set_parameters(&tscm->tx_stream, rate); in keep_resources()
288 err = amdtp_tscm_set_parameters(&tscm->rx_stream, rate); in keep_resources()
386 int snd_tscm_stream_start_duplex(struct snd_tscm *tscm, unsigned int rate) in snd_tscm_stream_start_duplex() argument
397 if (curr_rate != rate || in snd_tscm_stream_start_duplex()
409 err = keep_resources(tscm, rate); in snd_tscm_stream_start_duplex()
413 err = set_stream_formats(tscm, rate); in snd_tscm_stream_start_duplex()