Lines Matching full:core

24 #include <linux/mfd/wl1273-core.h>
39 struct wl1273_core *core; member
43 static int snd_wl1273_fm_set_i2s_mode(struct wl1273_core *core, in snd_wl1273_fm_set_i2s_mode() argument
46 struct device *dev = &core->client->dev; in snd_wl1273_fm_set_i2s_mode()
53 mutex_lock(&core->lock); in snd_wl1273_fm_set_i2s_mode()
55 mode = core->i2s_mode & ~WL1273_IS2_WIDTH & ~WL1273_IS2_RATE; in snd_wl1273_fm_set_i2s_mode()
123 dev_dbg(dev, "core->i2s_mode: 0x%04x\n", core->i2s_mode); in snd_wl1273_fm_set_i2s_mode()
126 if (core->i2s_mode != mode) { in snd_wl1273_fm_set_i2s_mode()
127 r = core->write(core, WL1273_I2S_MODE_CONFIG_SET, mode); in snd_wl1273_fm_set_i2s_mode()
131 core->i2s_mode = mode; in snd_wl1273_fm_set_i2s_mode()
132 r = core->write(core, WL1273_AUDIO_ENABLE, in snd_wl1273_fm_set_i2s_mode()
138 mutex_unlock(&core->lock); in snd_wl1273_fm_set_i2s_mode()
143 static int snd_wl1273_fm_set_channel_number(struct wl1273_core *core, in snd_wl1273_fm_set_channel_number() argument
146 struct device *dev = &core->client->dev; in snd_wl1273_fm_set_channel_number()
151 mutex_lock(&core->lock); in snd_wl1273_fm_set_channel_number()
153 if (core->channel_number == channel_number) in snd_wl1273_fm_set_channel_number()
156 if (channel_number == 1 && core->mode == WL1273_MODE_RX) in snd_wl1273_fm_set_channel_number()
157 r = core->write(core, WL1273_MOST_MODE_SET, WL1273_RX_MONO); in snd_wl1273_fm_set_channel_number()
158 else if (channel_number == 1 && core->mode == WL1273_MODE_TX) in snd_wl1273_fm_set_channel_number()
159 r = core->write(core, WL1273_MONO_SET, WL1273_TX_MONO); in snd_wl1273_fm_set_channel_number()
160 else if (channel_number == 2 && core->mode == WL1273_MODE_RX) in snd_wl1273_fm_set_channel_number()
161 r = core->write(core, WL1273_MOST_MODE_SET, WL1273_RX_STEREO); in snd_wl1273_fm_set_channel_number()
162 else if (channel_number == 2 && core->mode == WL1273_MODE_TX) in snd_wl1273_fm_set_channel_number()
163 r = core->write(core, WL1273_MONO_SET, WL1273_TX_STEREO); in snd_wl1273_fm_set_channel_number()
167 mutex_unlock(&core->lock); in snd_wl1273_fm_set_channel_number()
223 ucontrol->value.integer.value[0] = wl1273->core->audio_mode; in snd_wl1273_fm_audio_get()
238 if (wl1273->core->audio_mode == val) in snd_wl1273_fm_audio_put()
241 r = wl1273->core->set_audio(wl1273->core, val); in snd_wl1273_fm_audio_put()
262 ucontrol->value.integer.value[0] = wl1273->core->volume; in snd_wl1273_fm_volume_get()
276 r = wl1273->core->set_volume(wl1273->core, in snd_wl1273_fm_volume_put()
334 struct wl1273_core *core = wl1273->core; in wl1273_hw_params() local
377 r = snd_wl1273_fm_set_i2s_mode(core, rate, width); in wl1273_hw_params()
382 r = snd_wl1273_fm_set_channel_number(core, wl1273->channels); in wl1273_hw_params()
445 struct wl1273_core **core = codec->dev->platform_data; in wl1273_probe() local
451 if (!core) { in wl1273_probe()
463 wl1273->core = *core; in wl1273_probe()