Home
last modified time | relevance | path

Searched refs:rate (Results 1 – 25 of 472) sorted by relevance

12345678910>>...19

/sound/firewire/fireface/
Dff-protocol-latter.c18 static int parse_clock_bits(u32 data, unsigned int *rate, in parse_clock_bits() argument
22 unsigned int rate; in parse_clock_bits() member
49 *rate = rate_entry->rate; in parse_clock_bits()
69 static int latter_get_clock(struct snd_ff *ff, unsigned int *rate, in latter_get_clock() argument
82 return parse_clock_bits(data, rate, src); in latter_get_clock()
100 static int latter_allocate_resources(struct snd_ff *ff, unsigned int rate) in latter_allocate_resources() argument
110 if (rate % 48000 == 0) in latter_allocate_resources()
112 else if (rate % 44100 == 0) in latter_allocate_resources()
114 else if (rate % 32000 == 0) in latter_allocate_resources()
119 if (rate >= 64000 && rate < 128000) in latter_allocate_resources()
[all …]
Dff-protocol-former.c17 static int parse_clock_bits(u32 data, unsigned int *rate, in parse_clock_bits() argument
21 unsigned int rate; in parse_clock_bits() member
49 *rate = rate_entry->rate; in parse_clock_bits()
73 static int former_get_clock(struct snd_ff *ff, unsigned int *rate, in former_get_clock() argument
86 return parse_clock_bits(data, rate, src); in former_get_clock()
127 unsigned int rate; in dump_clock_config() local
151 err = parse_clock_bits(data, &rate, &src); in dump_clock_config()
158 snd_iprintf(buffer, "Clock configuration: %d %s\n", rate, label); in dump_clock_config()
184 unsigned int rate; in dump_sync_status() member
232 unsigned int rate; in dump_sync_status() local
[all …]
Dff-pcm.c75 unsigned int rate, channels; in limit_channels_and_rates() local
97 rate = amdtp_rate_table[i]; in limit_channels_and_rates()
98 hw->rates |= snd_pcm_rate_to_rate_bit(rate); in limit_channels_and_rates()
99 hw->rate_min = min(hw->rate_min, rate); in limit_channels_and_rates()
100 hw->rate_max = max(hw->rate_max, rate); in limit_channels_and_rates()
142 unsigned int rate; in pcm_open() local
154 err = ff->spec->protocol->get_clock(ff, &rate, &src); in pcm_open()
160 if (amdtp_rate_table[i] == rate) in pcm_open()
172 substream->runtime->hw.rate_min = rate; in pcm_open()
173 substream->runtime->hw.rate_max = rate; in pcm_open()
[all …]
/sound/core/
Dpcm_timer.c21 unsigned long rate, mult, fsize, l, post; in snd_pcm_timer_resolution_change() local
25 rate = runtime->rate; in snd_pcm_timer_resolution_change()
26 if (snd_BUG_ON(!rate)) in snd_pcm_timer_resolution_change()
28 l = gcd(mult, rate); in snd_pcm_timer_resolution_change()
30 rate /= l; in snd_pcm_timer_resolution_change()
34 l = gcd(rate, fsize); in snd_pcm_timer_resolution_change()
35 rate /= l; in snd_pcm_timer_resolution_change()
42 if (rate == 0) { in snd_pcm_timer_resolution_change()
45 runtime->rate, runtime->period_size); in snd_pcm_timer_resolution_change()
49 runtime->timer_resolution = (mult * fsize / rate) * post; in snd_pcm_timer_resolution_change()
/sound/soc/mediatek/mt6797/
Dmt6797-dai-adda.c39 unsigned int rate) in adda_dl_rate_transform() argument
41 switch (rate) { in adda_dl_rate_transform()
66 __func__, rate); in adda_dl_rate_transform()
72 unsigned int rate) in adda_ul_rate_transform() argument
74 switch (rate) { in adda_ul_rate_transform()
89 __func__, rate); in adda_ul_rate_transform()
235 unsigned int rate = params_rate(params); in mtk_dai_adda_hw_params() local
238 __func__, dai->id, substream->stream, rate); in mtk_dai_adda_hw_params()
249 dl_src2_con0 = adda_dl_rate_transform(afe, rate) << 28; in mtk_dai_adda_hw_params()
252 switch (rate) { in mtk_dai_adda_hw_params()
[all …]
/sound/pci/echoaudio/
Dlayla20_dsp.c159 static int set_sample_rate(struct echoaudio *chip, u32 rate) in set_sample_rate() argument
161 if (snd_BUG_ON(rate < 8000 || rate > 50000)) in set_sample_rate()
169 chip->comm_page->sample_rate = cpu_to_le32(rate); in set_sample_rate()
170 chip->sample_rate = rate; in set_sample_rate()
177 dev_dbg(chip->card->dev, "set_sample_rate(%d)\n", rate); in set_sample_rate()
178 chip->sample_rate = rate; in set_sample_rate()
179 chip->comm_page->sample_rate = cpu_to_le32(rate); in set_sample_rate()
189 u32 rate; in set_input_clock() local
191 rate = 0; in set_input_clock()
194 rate = chip->sample_rate; in set_input_clock()
[all …]
Dechoaudio_3g.c145 static u32 set_spdif_bits(struct echoaudio *chip, u32 control_reg, u32 rate) in set_spdif_bits() argument
149 switch (rate) { in set_spdif_bits()
258 static int set_sample_rate(struct echoaudio *chip, u32 rate) in set_sample_rate() argument
267 chip->comm_page->sample_rate = cpu_to_le32(rate); in set_sample_rate()
268 chip->sample_rate = rate; in set_sample_rate()
273 if (snd_BUG_ON(rate >= 50000 && in set_sample_rate()
281 switch (rate) { in set_sample_rate()
299 if (rate > 50000) in set_sample_rate()
305 control_reg = set_spdif_bits(chip, control_reg, rate); in set_sample_rate()
307 base_rate = rate; in set_sample_rate()
[all …]
Dlayla24_dsp.c157 static int set_sample_rate(struct echoaudio *chip, u32 rate) in set_sample_rate() argument
161 if (snd_BUG_ON(rate >= 50000 && in set_sample_rate()
170 chip->comm_page->sample_rate = cpu_to_le32(rate); in set_sample_rate()
171 chip->sample_rate = rate; in set_sample_rate()
181 switch (rate) { in set_sample_rate()
217 if (rate > 50000) { in set_sample_rate()
218 base_rate = rate >> 1; in set_sample_rate()
221 base_rate = rate; in set_sample_rate()
239 chip->comm_page->sample_rate = cpu_to_le32(rate); /* ignored by the DSP ? */ in set_sample_rate()
240 chip->sample_rate = rate; in set_sample_rate()
[all …]
/sound/usb/
Dformat.c197 unsigned int rate = combine_triple(&fmt[idx]); in parse_audio_format_rates_v1() local
198 if (!rate) in parse_audio_format_rates_v1()
203 if (rate == 48000 && nr_rates == 1 && in parse_audio_format_rates_v1()
209 rate = 96000; in parse_audio_format_rates_v1()
211 if (rate == 16000 && in parse_audio_format_rates_v1()
214 rate = 8000; in parse_audio_format_rates_v1()
216 fp->rate_table[fp->nr_rates] = rate; in parse_audio_format_rates_v1()
217 if (!fp->rate_min || rate < fp->rate_min) in parse_audio_format_rates_v1()
218 fp->rate_min = rate; in parse_audio_format_rates_v1()
219 if (!fp->rate_max || rate > fp->rate_max) in parse_audio_format_rates_v1()
[all …]
Dclock.c502 struct audioformat *fmt, int rate) in set_sample_rate_v1() argument
517 data[0] = rate; in set_sample_rate_v1()
518 data[1] = rate >> 8; in set_sample_rate_v1()
519 data[2] = rate >> 16; in set_sample_rate_v1()
526 iface, fmt->altsetting, rate, ep); in set_sample_rate_v1()
556 if (crate != rate) { in set_sample_rate_v1()
557 dev_warn(&dev->dev, "current rate %d is different from the runtime rate %d\n", crate, rate); in set_sample_rate_v1()
587 struct audioformat *fmt, int rate) in set_sample_rate_v2v3() argument
614 if (prev_rate == rate) in set_sample_rate_v2v3()
632 data = cpu_to_le32(rate); in set_sample_rate_v2v3()
[all …]
/sound/firewire/dice/
Ddice-stream.c32 int snd_dice_stream_get_rate_mode(struct snd_dice *dice, unsigned int rate, in snd_dice_stream_get_rate_mode() argument
50 if (snd_dice_rates[i] != rate) in snd_dice_stream_get_rate_mode()
64 static int ensure_phase_lock(struct snd_dice *dice, unsigned int rate) in ensure_phase_lock() argument
80 if (snd_dice_rates[i] == rate) in ensure_phase_lock()
169 struct fw_iso_resources *resources, unsigned int rate, in keep_resources() argument
184 double_pcm_frames = rate > 96000; in keep_resources()
186 rate /= 2; in keep_resources()
190 err = amdtp_am824_set_parameters(stream, rate, pcm_chs, midi_ports, in keep_resources()
210 static int keep_dual_resources(struct snd_dice *dice, unsigned int rate, in keep_dual_resources() argument
218 err = snd_dice_stream_get_rate_mode(dice, rate, &mode); in keep_dual_resources()
[all …]
Ddice-pcm.c27 unsigned int i, rate; in dice_rate_constraint() local
35 rate = snd_dice_rates[i]; in dice_rate_constraint()
36 if (snd_dice_stream_get_rate_mode(dice, rate, &mode) < 0) in dice_rate_constraint()
42 rates.min = min(rates.min, rate); in dice_rate_constraint()
43 rates.max = max(rates.max, rate); in dice_rate_constraint()
65 unsigned int i, rate; in dice_channels_constraint() local
73 rate = snd_dice_rates[i]; in dice_channels_constraint()
74 if (snd_dice_stream_get_rate_mode(dice, rate, &mode) < 0) in dice_channels_constraint()
77 if (!snd_interval_test(r, rate)) in dice_channels_constraint()
106 unsigned int rate, channels; in limit_channels_and_rates() local
[all …]
/sound/firewire/fireworks/
Dfireworks_stream.c65 unsigned int rate) in start_stream() argument
159 unsigned int rate, unsigned int mode) in keep_resources() argument
176 err = amdtp_am824_set_parameters(stream, rate, pcm_channels, in keep_resources()
184 int snd_efw_stream_reserve_duplex(struct snd_efw *efw, unsigned int rate) in snd_efw_stream_reserve_duplex() argument
199 if (rate == 0) in snd_efw_stream_reserve_duplex()
200 rate = curr_rate; in snd_efw_stream_reserve_duplex()
201 if (rate != curr_rate) { in snd_efw_stream_reserve_duplex()
211 if (efw->substreams_counter == 0 || rate != curr_rate) { in snd_efw_stream_reserve_duplex()
214 err = snd_efw_command_set_sampling_rate(efw, rate); in snd_efw_stream_reserve_duplex()
218 err = snd_efw_get_multiplier_mode(rate, &mode); in snd_efw_stream_reserve_duplex()
[all …]
/sound/firewire/tascam/
Dtascam-stream.c44 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()
[all …]
/sound/soc/intel/skylake/
Dskl-ssp-clk.c29 unsigned long rate; member
165 unsigned long rate) in skl_get_rate_cfg() argument
169 for (i = 0; (i < SKL_MAX_CLK_RATES) && rcfg[i].rate; i++) { in skl_get_rate_cfg()
170 if (rcfg[i].rate == rate) in skl_get_rate_cfg()
192 clkdev->rate); in skl_clk_change_status()
214 static int skl_clk_set_rate(struct clk_hw *hw, unsigned long rate, in skl_clk_set_rate() argument
221 if (!rate) in skl_clk_set_rate()
225 rate); in skl_clk_set_rate()
234 clkdev->rate = rate; in skl_clk_set_rate()
244 if (clkdev->rate) in skl_clk_recalc_rate()
[all …]
/sound/pci/ac97/
Dac97_pcm.c159 static int set_spdif_rate(struct snd_ac97 *ac97, unsigned short rate) in set_spdif_rate() argument
169 switch (rate) { in set_spdif_rate()
179 if (ac97->id == AC97_ID_CM9739 && rate != 48000) { in set_spdif_rate()
183 switch (rate) { in set_spdif_rate()
204 switch (rate) { in set_spdif_rate()
211 switch (rate) { in set_spdif_rate()
243 int snd_ac97_set_rate(struct snd_ac97 *ac97, int reg, unsigned int rate) in snd_ac97_set_rate() argument
248 dbl = rate > 48000; in snd_ac97_set_rate()
260 if (rate != 48000) in snd_ac97_set_rate()
266 if (rate != 48000 && rate != 96000) in snd_ac97_set_rate()
[all …]
/sound/soc/codecs/
Drl6231.c70 int rl6231_calc_dmic_clk(int rate) in rl6231_calc_dmic_clk() argument
75 if (rate < 1000000 * div[0]) { in rl6231_calc_dmic_clk()
76 pr_warn("Base clock rate %d is too low\n", rate); in rl6231_calc_dmic_clk()
84 if (3072000 * div[i] >= rate) in rl6231_calc_dmic_clk()
88 pr_warn("Base clock rate %d is too high\n", rate); in rl6231_calc_dmic_clk()
222 int rl6231_get_clk_info(int sclk, int rate) in rl6231_get_clk_info() argument
227 if (sclk <= 0 || rate <= 0) in rl6231_get_clk_info()
230 rate = rate << 8; in rl6231_get_clk_info()
232 if (sclk == rate * pd[i]) in rl6231_get_clk_info()
/sound/firewire/digi00x/
Ddigi00x-stream.c30 int snd_dg00x_stream_get_local_rate(struct snd_dg00x *dg00x, unsigned int *rate) in snd_dg00x_stream_get_local_rate() argument
44 *rate = snd_dg00x_stream_rates[data]; in snd_dg00x_stream_get_local_rate()
51 int snd_dg00x_stream_set_local_rate(struct snd_dg00x *dg00x, unsigned int rate) in snd_dg00x_stream_set_local_rate() argument
57 if (rate == snd_dg00x_stream_rates[i]) in snd_dg00x_stream_set_local_rate()
103 unsigned int *rate) in snd_dg00x_stream_get_external_rate() argument
117 *rate = snd_dg00x_stream_rates[data]; in snd_dg00x_stream_get_external_rate()
189 unsigned int rate) in keep_resources() argument
197 if (snd_dg00x_stream_rates[i] == rate) in keep_resources()
208 err = amdtp_dot_set_parameters(stream, rate, in keep_resources()
288 int snd_dg00x_stream_reserve_duplex(struct snd_dg00x *dg00x, unsigned int rate) in snd_dg00x_stream_reserve_duplex() argument
[all …]
/sound/firewire/motu/
Dmotu-pcm.c23 unsigned int i, pcm_channels, rate, mode; in motu_rate_constraint() local
26 rate = snd_motu_clock_rates[i]; in motu_rate_constraint()
34 rates.min = min(rates.min, rate); in motu_rate_constraint()
35 rates.max = max(rates.max, rate); in motu_rate_constraint()
53 unsigned int i, pcm_channels, rate, mode; in motu_channels_constraint() local
56 rate = snd_motu_clock_rates[i]; in motu_channels_constraint()
59 if (!snd_interval_test(r, rate)) in motu_channels_constraint()
76 unsigned int i, pcm_channels, rate, mode; in limit_channels_and_rates() local
82 rate = snd_motu_clock_rates[i]; in limit_channels_and_rates()
90 hw->rates |= snd_pcm_rate_to_rate_bit(rate); in limit_channels_and_rates()
[all …]
/sound/pci/pcxhr/
Dpcxhr_mix22.c339 unsigned int rate, in hr222_sub_set_clock() argument
344 unsigned realfreq = rate; in hr222_sub_set_clock()
348 err = hr222_pll_freq_register(rate, &pllreg, &realfreq); in hr222_sub_set_clock()
380 speed = rate < 55000 ? 0 : 1; in hr222_sub_set_clock()
398 rate, realfreq, pllreg); in hr222_sub_set_clock()
406 int rate, calc_rate = 0; in hr222_get_external_clock() local
457 rate = 192000; in hr222_get_external_clock()
459 rate = 176400; in hr222_get_external_clock()
461 rate = 128000; in hr222_get_external_clock()
463 rate = 96000; in hr222_get_external_clock()
[all …]
/sound/pci/ice1712/
Djuli.c140 static int get_gpio_val(int rate) in get_gpio_val() argument
144 if (juli_rates[i] == rate) in get_gpio_val()
171 int rate; in juli_spdif_in_open() local
176 rate = snd_ak4114_external_rate(spec->ak4114); in juli_spdif_in_open()
177 if (rate >= runtime->hw.rate_min && rate <= runtime->hw.rate_max) { in juli_spdif_in_open()
178 runtime->hw.rate_min = rate; in juli_spdif_in_open()
179 runtime->hw.rate_max = rate; in juli_spdif_in_open()
208 static void juli_akm_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate) in juli_akm_set_rate_val() argument
215 if (rate == 0) /* no hint - S/PDIF input is master or the new spdif in juli_akm_set_rate_val()
220 if (rate > 96000) { in juli_akm_set_rate_val()
[all …]
/sound/soc/mediatek/mt8183/
Dmt8183-dai-adda.c51 unsigned int rate) in adda_dl_rate_transform() argument
53 switch (rate) { in adda_dl_rate_transform()
78 __func__, rate); in adda_dl_rate_transform()
84 unsigned int rate) in adda_ul_rate_transform() argument
86 switch (rate) { in adda_ul_rate_transform()
101 __func__, rate); in adda_ul_rate_transform()
357 unsigned int rate = params_rate(params); in mtk_dai_adda_hw_params() local
360 __func__, dai->id, substream->stream, rate); in mtk_dai_adda_hw_params()
371 dl_src2_con0 = adda_dl_rate_transform(afe, rate) << 28; in mtk_dai_adda_hw_params()
374 switch (rate) { in mtk_dai_adda_hw_params()
[all …]
/sound/core/oss/
Drate.c193 if (plugin->src_format.rate < plugin->dst_format.rate) { in rate_src_frames()
226 if (plugin->src_format.rate < plugin->dst_format.rate) { in rate_dst_frames()
321 if (snd_BUG_ON(src_format->rate == dst_format->rate)) in snd_pcm_plugin_build_rate()
332 if (src_format->rate < dst_format->rate) { in snd_pcm_plugin_build_rate()
333 data->pitch = ((src_format->rate << SHIFT) + (dst_format->rate >> 1)) / dst_format->rate; in snd_pcm_plugin_build_rate()
336 data->pitch = ((dst_format->rate << SHIFT) + (src_format->rate >> 1)) / src_format->rate; in snd_pcm_plugin_build_rate()
/sound/firewire/oxfw/
Doxfw-stream.c41 static int set_rate(struct snd_oxfw *oxfw, unsigned int rate) in set_rate() argument
45 err = avc_general_set_sig_fmt(oxfw->unit, rate, in set_rate()
51 err = avc_general_set_sig_fmt(oxfw->unit, rate, in set_rate()
58 unsigned int rate, unsigned int pcm_channels) in set_stream_format() argument
80 if ((formation.rate == rate) && (formation.pcm == pcm_channels)) in set_stream_format()
88 return set_rate(oxfw, rate); in set_stream_format()
226 if (fmt.rate == formation.rate && fmt.pcm == formation.pcm && in keep_resources()
237 err = amdtp_am824_set_parameters(stream, formation.rate, formation.pcm, in keep_resources()
247 unsigned int rate, unsigned int pcm_channels) in snd_oxfw_stream_reserve_duplex() argument
272 if (rate == 0) { in snd_oxfw_stream_reserve_duplex()
[all …]
/sound/soc/sh/rcar/
Dadg.c187 if (runtime->rate != in_rate) { in rsnd_adg_get_timesel_ratio()
190 } else if (runtime->rate != out_rate) { in rsnd_adg_get_timesel_ratio()
289 int rsnd_adg_clk_query(struct rsnd_priv *priv, unsigned int rate) in rsnd_adg_clk_query() argument
305 if (rate == adg->clk_rate[i]) in rsnd_adg_clk_query()
311 if (rate == adg->rbga_rate_for_441khz) in rsnd_adg_clk_query()
314 if (rate == adg->rbgb_rate_for_48khz) in rsnd_adg_clk_query()
327 int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *ssi_mod, unsigned int rate) in rsnd_adg_ssi_clk_try_start() argument
336 data = rsnd_adg_clk_query(priv, rate); in rsnd_adg_ssi_clk_try_start()
346 if (0 == (rate % 8000)) in rsnd_adg_ssi_clk_try_start()
410 u32 rate, div; in rsnd_adg_get_clkout() local
[all …]

12345678910>>...19