/sound/pci/lola/ |
D | lola_clock.c | 30 unsigned int freq; in lola_sample_rate_convert() local 34 case 0: freq = 48000; break; in lola_sample_rate_convert() 35 case 1: freq = 44100; break; in lola_sample_rate_convert() 36 case 2: freq = 32000; break; in lola_sample_rate_convert() 44 case (1 << 2): freq *= 2; break; in lola_sample_rate_convert() 45 case (2 << 2): freq *= 4; break; in lola_sample_rate_convert() 46 case (5 << 2): freq /= 2; break; in lola_sample_rate_convert() 47 case (6 << 2): freq /= 4; break; in lola_sample_rate_convert() 54 case (1 << 5): freq = (freq * 999) / 1000; break; in lola_sample_rate_convert() 55 case (2 << 5): freq = (freq * 1001) / 1000; break; in lola_sample_rate_convert() [all …]
|
D | lola_proc.c | 83 unsigned int freq = items[j] & 0xff; in print_clock_widget() local 88 freq = lola_sample_rate_convert(freq); in print_clock_widget() 91 freq = lola_sample_rate_convert(freq); in print_clock_widget() 96 i + j, type, name, freq); in print_clock_widget()
|
/sound/drivers/vx/ |
D | vx_uer.c | 107 int val, freq; in vx_read_uer_status() local 110 freq = 0; in vx_read_uer_status() 123 freq = 32000; in vx_read_uer_status() 126 freq = 44100; in vx_read_uer_status() 129 freq = 48000; in vx_read_uer_status() 140 return freq; in vx_read_uer_status() 161 static int vx_calc_clock_from_freq(struct vx_core *chip, int freq) in vx_calc_clock_from_freq() argument 165 if (snd_BUG_ON(freq <= 0)) in vx_calc_clock_from_freq() 168 hexfreq = (28224000 * 10) / freq; in vx_calc_clock_from_freq() 206 void vx_set_internal_clock(struct vx_core *chip, unsigned int freq) in vx_set_internal_clock() argument [all …]
|
/sound/soc/codecs/ |
D | max98090.c | 1787 int freq; member 1796 { .freq = 2, .comp = { 7, 8, 3, 3, 3, 3 } }, 1797 { .freq = 1, .comp = { 7, 8, 2, 2, 2, 2 } }, 1798 { .freq = 0, .comp = { 7, 8, 3, 3, 3, 3 } }, 1799 { .freq = 0, .comp = { 7, 8, 6, 6, 6, 6 } }, 1800 { .freq = 0, .comp = { 7, 8, 3, 3, 3, 3 } }, 1801 { .freq = 0, .comp = { 7, 8, 3, 3, 3, 3 } }, 1807 { .freq = 2, .comp = { 7, 8, 3, 3, 3, 3 } }, 1808 { .freq = 1, .comp = { 7, 8, 2, 2, 2, 2 } }, 1809 { .freq = 0, .comp = { 7, 8, 3, 3, 3, 3 } }, [all …]
|
D | max9867.c | 277 int clk_id, unsigned int freq, int dir) in max9867_set_dai_sysclk() argument 284 if (freq >= 10000000 && freq <= 20000000) { in max9867_set_dai_sysclk() 286 max9867->pclk = freq; in max9867_set_dai_sysclk() 287 } else if (freq >= 20000000 && freq <= 40000000) { in max9867_set_dai_sysclk() 289 max9867->pclk = freq/2; in max9867_set_dai_sysclk() 290 } else if (freq >= 40000000 && freq <= 60000000) { in max9867_set_dai_sysclk() 292 max9867->pclk = freq/4; in max9867_set_dai_sysclk() 294 pr_err("bad clock frequency %d", freq); in max9867_set_dai_sysclk() 298 max9867->sysclk = freq; in max9867_set_dai_sysclk()
|
D | tlv320aic26.c | 155 int clk_id, unsigned int freq, int dir) in aic26_set_sysclk() argument 162 codec_dai, clk_id, freq, dir); in aic26_set_sysclk() 165 if ((freq < 2000000) || (freq > 50000000)) in aic26_set_sysclk() 168 aic26->mclk = freq; in aic26_set_sysclk() 266 int val, amp, freq, len; in aic26_keyclick_show() local 270 freq = (125 << ((val >> 8) & 0x7)) >> 1; in aic26_keyclick_show() 273 return sprintf(buf, "amp=%x freq=%iHz len=%iclks\n", amp, freq, len); in aic26_keyclick_show()
|
D | max9850.c | 170 int clk_id, unsigned int freq, int dir) in max9850_set_dai_sysclk() argument 176 if (freq <= 13000000) in max9850_set_dai_sysclk() 178 else if (freq <= 26000000) in max9850_set_dai_sysclk() 180 else if (freq <= 40000000) in max9850_set_dai_sysclk() 185 max9850->sysclk = freq; in max9850_set_dai_sysclk()
|
D | mc13783.c | 255 int clk_id, unsigned int freq, int dir, in mc13783_set_sysclk() argument 266 if (mc13783_sysclk[clk] == freq) in mc13783_set_sysclk() 284 int clk_id, unsigned int freq, int dir) in mc13783_set_sysclk_dac() argument 286 return mc13783_set_sysclk(dai, clk_id, freq, dir, MC13783_AUDIO_DAC); in mc13783_set_sysclk_dac() 290 int clk_id, unsigned int freq, int dir) in mc13783_set_sysclk_codec() argument 292 return mc13783_set_sysclk(dai, clk_id, freq, dir, MC13783_AUDIO_CODEC); in mc13783_set_sysclk_codec() 296 int clk_id, unsigned int freq, int dir) in mc13783_set_sysclk_sync() argument 300 ret = mc13783_set_sysclk(dai, clk_id, freq, dir, MC13783_AUDIO_DAC); in mc13783_set_sysclk_sync() 304 return mc13783_set_sysclk(dai, clk_id, freq, dir, MC13783_AUDIO_CODEC); in mc13783_set_sysclk_sync()
|
D | adau1977.c | 794 int clk_id, int source, unsigned int freq, int dir) in adau1977_set_sysclk() argument 818 if (freq != 0 && source == ADAU1977_SYSCLK_SRC_MCLK) { in adau1977_set_sysclk() 819 if (freq < 4000000 || freq > 36864000) in adau1977_set_sysclk() 822 if (adau1977_check_sysclk(freq, 32000)) in adau1977_set_sysclk() 824 if (adau1977_check_sysclk(freq, 44100)) in adau1977_set_sysclk() 826 if (adau1977_check_sysclk(freq, 48000)) in adau1977_set_sysclk() 842 adau1977->sysclk = freq; in adau1977_set_sysclk()
|
D | wm8524.c | 96 int clk_id, unsigned int freq, int dir) in wm8524_set_dai_sysclk() argument 103 wm8524->sysclk = freq; in wm8524_set_dai_sysclk() 107 val = freq / lrclk_ratios[i].ratio; in wm8524_set_dai_sysclk()
|
D | tas2552.c | 402 unsigned int freq, int dir) in tas2552_set_dai_sysclk() argument 411 if (freq < 512000 || freq > 24576000) { in tas2552_set_dai_sysclk() 414 freq); in tas2552_set_dai_sysclk() 416 freq = 0; in tas2552_set_dai_sysclk() 425 tas2552->pll_clkin = freq; in tas2552_set_dai_sysclk() 435 tas2552->pdm_clk = freq; in tas2552_set_dai_sysclk()
|
D | es8316.c | 360 int clk_id, unsigned int freq, int dir) in es8316_set_dai_sysclk() argument 367 es8316->sysclk = freq; in es8316_set_dai_sysclk() 369 if (freq == 0) in es8316_set_dai_sysclk() 378 if (freq % ratio == 0) in es8316_set_dai_sysclk() 379 es8316->allowed_rates[count++] = freq / ratio; in es8316_set_dai_sysclk()
|
D | uda134x.c | 249 int clk_id, unsigned int freq, int dir) in uda134x_set_dai_sysclk() argument 255 clk_id, freq, dir); in uda134x_set_dai_sysclk() 261 if ((freq >= (256 * 8000)) && (freq <= (512 * 48000))) { in uda134x_set_dai_sysclk() 262 uda134x->sysclk = freq; in uda134x_set_dai_sysclk()
|
D | wm8804.c | 452 int clk_id, unsigned int freq, int dir) in wm8804_set_sysclk() argument 460 if ((freq >= 10000000 && freq <= 14400000) in wm8804_set_sysclk() 461 || (freq >= 16280000 && freq <= 27000000)) in wm8804_set_sysclk() 465 "recommended range: %uHz\n", freq); in wm8804_set_sysclk()
|
D | adau17x1.c | 354 int clk_id, unsigned int freq, int dir) in adau17x1_set_dai_sysclk() argument 388 adau->sysclk = freq; in adau17x1_set_dai_sysclk() 444 unsigned int freq; in adau17x1_hw_params() local 454 freq = adau->pll_freq; in adau17x1_hw_params() 457 freq = adau->sysclk; in adau17x1_hw_params() 461 if (freq % params_rate(params) != 0) in adau17x1_hw_params() 464 switch (freq / params_rate(params)) { in adau17x1_hw_params()
|
/sound/soc/omap/ |
D | omap-dmic.c | 291 unsigned int freq) in omap_dmic_select_fclk() argument 297 switch (freq) { in omap_dmic_select_fclk() 304 dev_err(dmic->dev, "invalid input frequency: %dHz\n", freq); in omap_dmic_select_fclk() 310 dmic->fclk_freq = freq; in omap_dmic_select_fclk() 358 dmic->fclk_freq = freq; in omap_dmic_select_fclk() 367 unsigned int freq) in omap_dmic_select_outclk() argument 377 switch (freq) { in omap_dmic_select_outclk() 382 dmic->out_freq = freq; in omap_dmic_select_outclk() 385 dev_err(dmic->dev, "invalid out frequency: %dHz\n", freq); in omap_dmic_select_outclk() 394 unsigned int freq, int dir) in omap_dmic_set_dai_sysclk() argument [all …]
|
D | omap-abe-twl6040.c | 54 int clk_id, freq; in omap_abe_hw_params() local 59 freq = priv->mclk_freq; in omap_abe_hw_params() 61 freq = 32768; in omap_abe_hw_params() 66 ret = snd_soc_dai_set_sysclk(codec_dai, clk_id, freq, in omap_abe_hw_params()
|
/sound/soc/kirkwood/ |
D | armada-370-db.c | 27 unsigned int freq; in a370db_hw_params() local 32 freq = 11289600; in a370db_hw_params() 35 freq = 12288000; in a370db_hw_params() 38 freq = 24576000; in a370db_hw_params() 42 return snd_soc_dai_set_sysclk(codec_dai, 0, freq, SND_SOC_CLOCK_IN); in a370db_hw_params()
|
/sound/pci/ |
D | es1968.c | 851 static void snd_es1968_bob_inc(struct es1968 *chip, int freq) in snd_es1968_bob_inc() argument 855 chip->bob_freq = freq; in snd_es1968_bob_inc() 857 } else if (chip->bob_freq < freq) { in snd_es1968_bob_inc() 859 chip->bob_freq = freq; in snd_es1968_bob_inc() 891 int freq = runtime->rate * 4; in snd_es1968_calc_bob_rate() local 893 freq <<= 1; in snd_es1968_calc_bob_rate() 895 freq <<= 1; in snd_es1968_calc_bob_rate() 896 freq /= es->frag_size; in snd_es1968_calc_bob_rate() 897 if (freq < ESM_BOB_FREQ) in snd_es1968_calc_bob_rate() 898 freq = ESM_BOB_FREQ; in snd_es1968_calc_bob_rate() [all …]
|
/sound/soc/fsl/ |
D | fsl_esai.c | 221 unsigned int freq, int dir) in fsl_esai_set_dai_sysclk() argument 232 if (freq == esai_priv->hck_rate[tx] && dir == esai_priv->hck_dir[tx]) in fsl_esai_set_dai_sysclk() 266 ratio = clk_rate / freq; in fsl_esai_set_dai_sysclk() 267 if (ratio * freq > clk_rate) in fsl_esai_set_dai_sysclk() 268 ret = ratio * freq - clk_rate; in fsl_esai_set_dai_sysclk() 269 else if (ratio * freq < clk_rate) in fsl_esai_set_dai_sysclk() 270 ret = clk_rate - ratio * freq; in fsl_esai_set_dai_sysclk() 301 esai_priv->hck_rate[tx] = freq; in fsl_esai_set_dai_sysclk() 313 static int fsl_esai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq) in fsl_esai_set_bclk() argument 317 u32 sub, ratio = hck_rate / freq; in fsl_esai_set_bclk() [all …]
|
D | fsl_sai.c | 144 int clk_id, unsigned int freq, int fsl_dir) in fsl_sai_set_dai_sysclk_tr() argument 174 int clk_id, unsigned int freq, int dir) in fsl_sai_set_dai_sysclk() argument 181 ret = fsl_sai_set_dai_sysclk_tr(cpu_dai, clk_id, freq, in fsl_sai_set_dai_sysclk() 188 ret = fsl_sai_set_dai_sysclk_tr(cpu_dai, clk_id, freq, in fsl_sai_set_dai_sysclk() 320 static int fsl_sai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq) in fsl_sai_set_bclk() argument 324 u32 savediv = 0, ratio, savesub = freq; in fsl_sai_set_bclk() 337 ratio = clk_rate / freq; in fsl_sai_set_bclk() 339 ret = clk_rate - ratio * freq; in fsl_sai_set_bclk() 350 ratio, freq, clk_rate); in fsl_sai_set_bclk() 369 tx ? 'T' : 'R', freq); in fsl_sai_set_bclk()
|
D | fsl_ssi.c | 716 unsigned int freq; in fsl_ssi_set_bclk() local 721 freq = ssi_private->bitclk_freq; in fsl_ssi_set_bclk() 723 freq = params_channels(hw_params) * 32 * params_rate(hw_params); in fsl_ssi_set_bclk() 733 if (freq * 5 > clk_get_rate(ssi_private->clk)) { in fsl_ssi_set_bclk() 747 tmprate = freq * factor * (i + 1); in fsl_ssi_set_bclk() 757 if (freq == afreq) in fsl_ssi_set_bclk() 759 else if (freq / afreq == 1) in fsl_ssi_set_bclk() 760 sub = freq - afreq; in fsl_ssi_set_bclk() 761 else if (afreq / freq == 1) in fsl_ssi_set_bclk() 762 sub = afreq - freq; in fsl_ssi_set_bclk() [all …]
|
/sound/core/seq/ |
D | seq_timer.c | 355 unsigned long freq; in initialize_timer() local 361 freq = tmr->preferred_resolution; in initialize_timer() 362 if (!freq) in initialize_timer() 363 freq = DEFAULT_FREQUENCY; in initialize_timer() 364 else if (freq < MIN_FREQUENCY) in initialize_timer() 365 freq = MIN_FREQUENCY; in initialize_timer() 366 else if (freq > MAX_FREQUENCY) in initialize_timer() 367 freq = MAX_FREQUENCY; in initialize_timer() 375 tmr->ticks = (unsigned int)(1000000000uL / (r * freq)); in initialize_timer()
|
/sound/isa/gus/ |
D | gus_volume.c | 192 unsigned short snd_gf1_compute_freq(unsigned int freq, 199 while (freq >= 4194304L) { 201 freq >>= 1; 203 fc = (freq << 10) / rate;
|
/sound/oss/ |
D | opl3.c | 83 static void freq_to_fnum(int freq, int *block, int *fnum); 460 int block, fnum, freq, voice_mode, pan; in opl3_start_note() local 647 freq = devc->voc[voice].orig_freq = note_to_freq(note) / 1000; in opl3_start_note() 654 …freq = compute_finetune(devc->voc[voice].orig_freq, devc->voc[voice].bender, devc->voc[voice].bend… in opl3_start_note() 655 devc->voc[voice].current_freq = freq; in opl3_start_note() 657 freq_to_fnum(freq, &block, &fnum); in opl3_start_note() 677 static void freq_to_fnum (int freq, int *block, int *fnum) in freq_to_fnum() argument 688 f = freq; in freq_to_fnum() 714 *fnum = freq * (1 << (20 - octave)) / 49716; in freq_to_fnum() 934 int block, fnum, freq; in bend_pitch() local [all …]
|