Lines Matching refs:azx_dev

49 static inline struct azx_dev *
61 static inline void azx_release_device(struct azx_dev *azx_dev) in azx_release_device() argument
63 snd_hdac_stream_release(azx_stream(azx_dev)); in azx_release_device()
102 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_close() local
104 trace_azx_pcm_close(chip, azx_dev); in azx_pcm_close()
106 azx_release_device(azx_dev); in azx_pcm_close()
120 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_hw_params() local
123 trace_azx_pcm_hw_params(chip, azx_dev); in azx_pcm_hw_params()
124 dsp_lock(azx_dev); in azx_pcm_hw_params()
125 if (dsp_is_locked(azx_dev)) { in azx_pcm_hw_params()
130 azx_dev->core.bufsize = 0; in azx_pcm_hw_params()
131 azx_dev->core.period_bytes = 0; in azx_pcm_hw_params()
132 azx_dev->core.format_val = 0; in azx_pcm_hw_params()
136 dsp_unlock(azx_dev); in azx_pcm_hw_params()
143 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_hw_free() local
149 dsp_lock(azx_dev); in azx_pcm_hw_free()
150 if (!dsp_is_locked(azx_dev)) in azx_pcm_hw_free()
151 snd_hdac_stream_cleanup(azx_stream(azx_dev)); in azx_pcm_hw_free()
156 azx_stream(azx_dev)->prepared = 0; in azx_pcm_hw_free()
157 dsp_unlock(azx_dev); in azx_pcm_hw_free()
165 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_prepare() local
174 trace_azx_pcm_prepare(chip, azx_dev); in azx_pcm_prepare()
175 dsp_lock(azx_dev); in azx_pcm_prepare()
176 if (dsp_is_locked(azx_dev)) { in azx_pcm_prepare()
181 snd_hdac_stream_reset(azx_stream(azx_dev)); in azx_pcm_prepare()
195 err = snd_hdac_stream_set_params(azx_stream(azx_dev), format_val); in azx_pcm_prepare()
199 snd_hdac_stream_setup(azx_stream(azx_dev)); in azx_pcm_prepare()
201 stream_tag = azx_dev->core.stream_tag; in azx_pcm_prepare()
207 azx_dev->core.format_val, substream); in azx_pcm_prepare()
211 azx_stream(azx_dev)->prepared = 1; in azx_pcm_prepare()
212 dsp_unlock(azx_dev); in azx_pcm_prepare()
221 struct azx_dev *azx_dev; in azx_pcm_trigger() local
228 azx_dev = get_azx_dev(substream); in azx_pcm_trigger()
229 trace_azx_pcm_trigger(chip, azx_dev, cmd); in azx_pcm_trigger()
231 hstr = azx_stream(azx_dev); in azx_pcm_trigger()
237 if (dsp_is_locked(azx_dev) || !hstr->prepared) in azx_pcm_trigger()
258 azx_dev = get_azx_dev(s); in azx_pcm_trigger()
259 sbits |= 1 << azx_dev->core.index; in azx_pcm_trigger()
271 azx_dev = get_azx_dev(s); in azx_pcm_trigger()
273 azx_dev->insufficient = 1; in azx_pcm_trigger()
274 snd_hdac_stream_start(azx_stream(azx_dev), true); in azx_pcm_trigger()
276 snd_hdac_stream_stop(azx_stream(azx_dev)); in azx_pcm_trigger()
292 unsigned int azx_get_pos_lpib(struct azx *chip, struct azx_dev *azx_dev) in azx_get_pos_lpib() argument
294 return snd_hdac_stream_get_pos_lpib(azx_stream(azx_dev)); in azx_get_pos_lpib()
298 unsigned int azx_get_pos_posbuf(struct azx *chip, struct azx_dev *azx_dev) in azx_get_pos_posbuf() argument
300 return snd_hdac_stream_get_pos_posbuf(azx_stream(azx_dev)); in azx_get_pos_posbuf()
305 struct azx_dev *azx_dev) in azx_get_position() argument
307 struct snd_pcm_substream *substream = azx_dev->core.substream; in azx_get_position()
313 pos = chip->get_position[stream](chip, azx_dev); in azx_get_position()
315 pos = azx_get_pos_posbuf(chip, azx_dev); in azx_get_position()
317 if (pos >= azx_dev->core.bufsize) in azx_get_position()
325 delay += chip->get_delay[stream](chip, azx_dev, pos); in azx_get_position()
332 trace_azx_get_position(chip, azx_dev, pos, delay); in azx_get_position()
341 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_pointer() local
343 azx_get_position(chip, azx_dev)); in azx_pcm_pointer()
382 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_get_sync_time() local
405 (azx_dev->core.stream_tag - 1); in azx_get_sync_time()
509 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_get_time_info() local
520 nsec = timecounter_read(&azx_dev->core.tc); in azx_get_time_info()
597 struct azx_dev *azx_dev; in azx_pcm_open() local
604 azx_dev = azx_assign_device(chip, substream); in azx_pcm_open()
605 trace_azx_pcm_open(chip, azx_dev); in azx_pcm_open()
606 if (azx_dev == NULL) { in azx_pcm_open()
610 runtime->private_data = azx_dev; in azx_pcm_open()
654 azx_release_device(azx_dev); in azx_pcm_open()
663 azx_release_device(azx_dev); in azx_pcm_open()
1011 static struct azx_dev *
1030 struct azx_dev *azx_dev; in snd_hda_codec_load_dsp_prepare() local
1035 azx_dev = azx_get_dsp_loader_dev(chip); in snd_hda_codec_load_dsp_prepare()
1036 hstr = azx_stream(azx_dev); in snd_hda_codec_load_dsp_prepare()
1039 chip->saved_azx_dev = *azx_dev; in snd_hda_codec_load_dsp_prepare()
1048 *azx_dev = chip->saved_azx_dev; in snd_hda_codec_load_dsp_prepare()
1062 struct azx_dev *azx_dev = azx_get_dsp_loader_dev(chip); in snd_hda_codec_load_dsp_trigger() local
1064 snd_hdac_dsp_trigger(azx_stream(azx_dev), start); in snd_hda_codec_load_dsp_trigger()
1073 struct azx_dev *azx_dev = azx_get_dsp_loader_dev(chip); in snd_hda_codec_load_dsp_cleanup() local
1074 struct hdac_stream *hstr = azx_stream(azx_dev); in snd_hda_codec_load_dsp_cleanup()
1082 *azx_dev = chip->saved_azx_dev; in snd_hda_codec_load_dsp_cleanup()
1124 struct azx_dev *azx_dev = stream_to_azx_dev(s); in stream_update() local
1128 chip->ops->position_check(chip, azx_dev)) { in stream_update()
1130 snd_pcm_period_elapsed(azx_stream(azx_dev)->substream); in stream_update()
1376 struct azx_dev *azx_dev = kzalloc(sizeof(*azx_dev), GFP_KERNEL); in azx_init_streams() local
1379 if (!azx_dev) in azx_init_streams()
1393 snd_hdac_stream_init(azx_bus(chip), azx_stream(azx_dev), in azx_init_streams()