Lines Matching refs:rate
44 static int set_clock(struct snd_tscm *tscm, unsigned int rate, in set_clock() argument
56 if (rate > 0) { in set_clock()
59 if ((rate % 44100) == 0) { in set_clock()
62 if (rate / 44100 == 2) in set_clock()
64 } else if ((rate % 48000) == 0) { in set_clock()
67 if (rate / 48000 == 2) in set_clock()
97 int snd_tscm_stream_get_rate(struct snd_tscm *tscm, unsigned int *rate) in snd_tscm_stream_get_rate() argument
110 *rate = 44100; in snd_tscm_stream_get_rate()
112 *rate = 48000; in snd_tscm_stream_get_rate()
118 *rate *= 2; in snd_tscm_stream_get_rate()
177 static int set_stream_formats(struct snd_tscm *tscm, unsigned int rate) in set_stream_formats() argument
281 static int keep_resources(struct snd_tscm *tscm, unsigned int rate, in keep_resources() argument
292 err = amdtp_tscm_set_parameters(stream, rate); in keep_resources()
386 int snd_tscm_stream_reserve_duplex(struct snd_tscm *tscm, unsigned int rate) in snd_tscm_stream_reserve_duplex() argument
395 if (tscm->substreams_counter == 0 || rate != curr_rate) { in snd_tscm_stream_reserve_duplex()
403 err = set_clock(tscm, rate, INT_MAX); in snd_tscm_stream_reserve_duplex()
407 err = keep_resources(tscm, rate, &tscm->tx_stream); in snd_tscm_stream_reserve_duplex()
411 err = keep_resources(tscm, rate, &tscm->rx_stream); in snd_tscm_stream_reserve_duplex()
421 int snd_tscm_stream_start_duplex(struct snd_tscm *tscm, unsigned int rate) in snd_tscm_stream_start_duplex() argument
448 err = set_stream_formats(tscm, rate); in snd_tscm_stream_start_duplex()