void haswell_set_bclk(struct azx *chip) { int cdclk_freq; unsigned int bclk_m, bclk_n; if (!get_cdclk) return; cdclk_freq = get_cdclk(); switch (cdclk_freq) { case 337500: bclk_m = 16; bclk_n = 225; break; case 450000: default: /* default CDCLK 450MHz */ bclk_m = 4; bclk_n = 75; break; case 540000: bclk_m = 4; bclk_n = 90; break; case 675000: bclk_m = 8; bclk_n = 225; break; } azx_writew(chip, EM4, bclk_m); azx_writew(chip, EM5, bclk_n); }
int haswell_get_cdclk(void) { if (!get_cdclk) return -EINVAL; return get_cdclk(); }