Lines Matching refs:audio

46 	struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev);  in twl4030_audio_set_resource()  local
50 audio->resource[id].reg); in twl4030_audio_set_resource()
53 val |= audio->resource[id].mask; in twl4030_audio_set_resource()
55 val &= ~audio->resource[id].mask; in twl4030_audio_set_resource()
58 val, audio->resource[id].reg); in twl4030_audio_set_resource()
65 struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); in twl4030_audio_get_resource() local
69 audio->resource[id].reg); in twl4030_audio_get_resource()
80 struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); in twl4030_audio_enable_resource() local
89 mutex_lock(&audio->mutex); in twl4030_audio_enable_resource()
90 if (!audio->resource[id].request_count) in twl4030_audio_enable_resource()
96 audio->resource[id].request_count++; in twl4030_audio_enable_resource()
97 mutex_unlock(&audio->mutex); in twl4030_audio_enable_resource()
109 struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); in twl4030_audio_disable_resource() local
118 mutex_lock(&audio->mutex); in twl4030_audio_disable_resource()
119 if (!audio->resource[id].request_count) { in twl4030_audio_disable_resource()
122 mutex_unlock(&audio->mutex); in twl4030_audio_disable_resource()
125 audio->resource[id].request_count--; in twl4030_audio_disable_resource()
127 if (!audio->resource[id].request_count) in twl4030_audio_disable_resource()
133 mutex_unlock(&audio->mutex); in twl4030_audio_disable_resource()
141 struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev); in twl4030_audio_get_mclk() local
143 return audio->audio_mclk; in twl4030_audio_get_mclk()
180 struct twl4030_audio *audio; in twl4030_audio_probe() local
192 audio = devm_kzalloc(&pdev->dev, sizeof(struct twl4030_audio), in twl4030_audio_probe()
194 if (!audio) in twl4030_audio_probe()
197 mutex_init(&audio->mutex); in twl4030_audio_probe()
198 audio->audio_mclk = twl_get_hfclk_rate(); in twl4030_audio_probe()
201 switch (audio->audio_mclk) { in twl4030_audio_probe()
218 audio->resource[TWL4030_AUDIO_RES_POWER].reg = TWL4030_REG_CODEC_MODE; in twl4030_audio_probe()
219 audio->resource[TWL4030_AUDIO_RES_POWER].mask = TWL4030_CODECPDZ; in twl4030_audio_probe()
222 audio->resource[TWL4030_AUDIO_RES_APLL].reg = TWL4030_REG_APLL_CTL; in twl4030_audio_probe()
223 audio->resource[TWL4030_AUDIO_RES_APLL].mask = TWL4030_APLL_EN; in twl4030_audio_probe()
226 cell = &audio->cells[childs]; in twl4030_audio_probe()
235 cell = &audio->cells[childs]; in twl4030_audio_probe()
244 platform_set_drvdata(pdev, audio); in twl4030_audio_probe()
248 ret = mfd_add_devices(&pdev->dev, pdev->id, audio->cells, in twl4030_audio_probe()