Lines Matching refs:max98095
354 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_mic1pre_set() local
357 max98095->mic1pre = sel; in max98095_mic1pre_set()
368 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_mic1pre_get() local
370 ucontrol->value.integer.value[0] = max98095->mic1pre; in max98095_mic1pre_get()
378 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_mic2pre_set() local
381 max98095->mic2pre = sel; in max98095_mic2pre_set()
392 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_mic2pre_get() local
394 ucontrol->value.integer.value[0] = max98095->mic2pre; in max98095_mic2pre_get()
599 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_mic_event() local
605 (1+max98095->mic1pre)<<M98095_MICPRE_SHIFT); in max98095_mic_event()
608 (1+max98095->mic2pre)<<M98095_MICPRE_SHIFT); in max98095_mic_event()
629 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_line_pga() local
635 state = &max98095->lin_state; in max98095_line_pga()
943 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_dai1_hw_params() local
949 cdata = &max98095->dai[0]; in max98095_dai1_hw_params()
975 if (max98095->sysclk == 0) { in max98095_dai1_hw_params()
981 do_div(ni, (unsigned long long int)max98095->sysclk); in max98095_dai1_hw_params()
1004 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_dai2_hw_params() local
1010 cdata = &max98095->dai[1]; in max98095_dai2_hw_params()
1036 if (max98095->sysclk == 0) { in max98095_dai2_hw_params()
1042 do_div(ni, (unsigned long long int)max98095->sysclk); in max98095_dai2_hw_params()
1065 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_dai3_hw_params() local
1071 cdata = &max98095->dai[2]; in max98095_dai3_hw_params()
1097 if (max98095->sysclk == 0) { in max98095_dai3_hw_params()
1103 do_div(ni, (unsigned long long int)max98095->sysclk); in max98095_dai3_hw_params()
1125 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_dai_set_sysclk() local
1128 if (freq == max98095->sysclk) in max98095_dai_set_sysclk()
1131 if (!IS_ERR(max98095->mclk)) { in max98095_dai_set_sysclk()
1132 freq = clk_round_rate(max98095->mclk, freq); in max98095_dai_set_sysclk()
1133 clk_set_rate(max98095->mclk, freq); in max98095_dai_set_sysclk()
1154 max98095->sysclk = freq; in max98095_dai_set_sysclk()
1162 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_dai1_set_fmt() local
1166 cdata = &max98095->dai[0]; in max98095_dai1_set_fmt()
1228 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_dai2_set_fmt() local
1232 cdata = &max98095->dai[1]; in max98095_dai2_set_fmt()
1295 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_dai3_set_fmt() local
1299 cdata = &max98095->dai[2]; in max98095_dai3_set_fmt()
1361 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_set_bias_level() local
1376 if (IS_ERR(max98095->mclk)) in max98095_set_bias_level()
1380 clk_disable_unprepare(max98095->mclk); in max98095_set_bias_level()
1382 ret = clk_prepare_enable(max98095->mclk); in max98095_set_bias_level()
1390 ret = regcache_sync(max98095->regmap); in max98095_set_bias_level()
1405 regcache_mark_dirty(max98095->regmap); in max98095_set_bias_level()
1489 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_put_eq_enum() local
1490 struct max98095_pdata *pdata = max98095->pdata; in max98095_put_eq_enum()
1501 if (!pdata || !max98095->eq_textcnt) in max98095_put_eq_enum()
1507 cdata = &max98095->dai[channel]; in max98095_put_eq_enum()
1515 if (strcmp(pdata->eq_cfg[i].name, max98095->eq_texts[sel]) == 0 && in max98095_put_eq_enum()
1534 mutex_lock(&max98095->lock); in max98095_put_eq_enum()
1542 mutex_unlock(&max98095->lock); in max98095_put_eq_enum()
1553 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_get_eq_enum() local
1557 cdata = &max98095->dai[channel]; in max98095_get_eq_enum()
1565 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_handle_eq_pdata() local
1566 struct max98095_pdata *pdata = max98095->pdata; in max98095_handle_eq_pdata()
1575 max98095->eq_enum, in max98095_handle_eq_pdata()
1579 max98095->eq_enum, in max98095_handle_eq_pdata()
1590 max98095->eq_textcnt = 0; in max98095_handle_eq_pdata()
1591 max98095->eq_texts = NULL; in max98095_handle_eq_pdata()
1593 for (j = 0; j < max98095->eq_textcnt; j++) { in max98095_handle_eq_pdata()
1594 if (strcmp(cfg[i].name, max98095->eq_texts[j]) == 0) in max98095_handle_eq_pdata()
1598 if (j != max98095->eq_textcnt) in max98095_handle_eq_pdata()
1602 t = krealloc(max98095->eq_texts, in max98095_handle_eq_pdata()
1603 sizeof(char *) * (max98095->eq_textcnt + 1), in max98095_handle_eq_pdata()
1609 t[max98095->eq_textcnt] = cfg[i].name; in max98095_handle_eq_pdata()
1610 max98095->eq_textcnt++; in max98095_handle_eq_pdata()
1611 max98095->eq_texts = t; in max98095_handle_eq_pdata()
1615 max98095->eq_enum.texts = max98095->eq_texts; in max98095_handle_eq_pdata()
1616 max98095->eq_enum.items = max98095->eq_textcnt; in max98095_handle_eq_pdata()
1640 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_put_bq_enum() local
1641 struct max98095_pdata *pdata = max98095->pdata; in max98095_put_bq_enum()
1652 if (!pdata || !max98095->bq_textcnt) in max98095_put_bq_enum()
1658 cdata = &max98095->dai[channel]; in max98095_put_bq_enum()
1666 if (strcmp(pdata->bq_cfg[i].name, max98095->bq_texts[sel]) == 0 && in max98095_put_bq_enum()
1685 mutex_lock(&max98095->lock); in max98095_put_bq_enum()
1690 mutex_unlock(&max98095->lock); in max98095_put_bq_enum()
1701 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_get_bq_enum() local
1708 cdata = &max98095->dai[channel]; in max98095_get_bq_enum()
1716 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_handle_bq_pdata() local
1717 struct max98095_pdata *pdata = max98095->pdata; in max98095_handle_bq_pdata()
1726 max98095->bq_enum, in max98095_handle_bq_pdata()
1730 max98095->bq_enum, in max98095_handle_bq_pdata()
1742 max98095->bq_textcnt = 0; in max98095_handle_bq_pdata()
1743 max98095->bq_texts = NULL; in max98095_handle_bq_pdata()
1745 for (j = 0; j < max98095->bq_textcnt; j++) { in max98095_handle_bq_pdata()
1746 if (strcmp(cfg[i].name, max98095->bq_texts[j]) == 0) in max98095_handle_bq_pdata()
1750 if (j != max98095->bq_textcnt) in max98095_handle_bq_pdata()
1754 t = krealloc(max98095->bq_texts, in max98095_handle_bq_pdata()
1755 sizeof(char *) * (max98095->bq_textcnt + 1), in max98095_handle_bq_pdata()
1761 t[max98095->bq_textcnt] = cfg[i].name; in max98095_handle_bq_pdata()
1762 max98095->bq_textcnt++; in max98095_handle_bq_pdata()
1763 max98095->bq_texts = t; in max98095_handle_bq_pdata()
1767 max98095->bq_enum.texts = max98095->bq_texts; in max98095_handle_bq_pdata()
1768 max98095->bq_enum.items = max98095->bq_textcnt; in max98095_handle_bq_pdata()
1777 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_handle_pdata() local
1778 struct max98095_pdata *pdata = max98095->pdata; in max98095_handle_pdata()
1807 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_report_jack() local
1821 max98095->headphone_jack) in max98095_report_jack()
1825 if ((value & M98095_MIC_IN) && max98095->mic_jack) in max98095_report_jack()
1828 if (max98095->headphone_jack == max98095->mic_jack) { in max98095_report_jack()
1829 snd_soc_jack_report(max98095->headphone_jack, in max98095_report_jack()
1833 if (max98095->headphone_jack) in max98095_report_jack()
1834 snd_soc_jack_report(max98095->headphone_jack, in max98095_report_jack()
1836 if (max98095->mic_jack) in max98095_report_jack()
1837 snd_soc_jack_report(max98095->mic_jack, in max98095_report_jack()
1846 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_jack_detect_enable() local
1851 if (max98095->pdata->jack_detect_pin5en) in max98095_jack_detect_enable()
1854 if (max98095->pdata->jack_detect_delay) in max98095_jack_detect_enable()
1855 slew = max98095->pdata->jack_detect_delay; in max98095_jack_detect_enable()
1890 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_jack_detect() local
1894 max98095->headphone_jack = hp_jack; in max98095_jack_detect()
1895 max98095->mic_jack = mic_jack; in max98095_jack_detect()
1919 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_suspend() local
1921 if (max98095->headphone_jack || max98095->mic_jack) in max98095_suspend()
1931 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_resume() local
1936 if (max98095->headphone_jack || max98095->mic_jack) { in max98095_resume()
1981 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_probe() local
1986 max98095->mclk = devm_clk_get(component->dev, "mclk"); in max98095_probe()
1987 if (PTR_ERR(max98095->mclk) == -EPROBE_DEFER) in max98095_probe()
1997 max98095->sysclk = (unsigned)-1; in max98095_probe()
1998 max98095->eq_textcnt = 0; in max98095_probe()
1999 max98095->bq_textcnt = 0; in max98095_probe()
2001 cdata = &max98095->dai[0]; in max98095_probe()
2007 cdata = &max98095->dai[1]; in max98095_probe()
2013 cdata = &max98095->dai[2]; in max98095_probe()
2019 max98095->lin_state = 0; in max98095_probe()
2020 max98095->mic1pre = 0; in max98095_probe()
2021 max98095->mic2pre = 0; in max98095_probe()
2081 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); in max98095_remove() local
2084 if (max98095->headphone_jack || max98095->mic_jack) in max98095_remove()
2116 struct max98095_priv *max98095; in max98095_i2c_probe() local
2120 max98095 = devm_kzalloc(&i2c->dev, sizeof(struct max98095_priv), in max98095_i2c_probe()
2122 if (max98095 == NULL) in max98095_i2c_probe()
2125 mutex_init(&max98095->lock); in max98095_i2c_probe()
2127 max98095->regmap = devm_regmap_init_i2c(i2c, &max98095_regmap); in max98095_i2c_probe()
2128 if (IS_ERR(max98095->regmap)) { in max98095_i2c_probe()
2129 ret = PTR_ERR(max98095->regmap); in max98095_i2c_probe()
2135 max98095->devtype = id->driver_data; in max98095_i2c_probe()
2136 i2c_set_clientdata(i2c, max98095); in max98095_i2c_probe()
2137 max98095->pdata = i2c->dev.platform_data; in max98095_i2c_probe()