Lines Matching refs:azx_dev

43 static inline struct azx_dev *
55 static inline void azx_release_device(struct azx_dev *azx_dev) in azx_release_device() argument
57 snd_hdac_stream_release(azx_stream(azx_dev)); in azx_release_device()
96 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_close() local
98 trace_azx_pcm_close(chip, azx_dev); in azx_pcm_close()
100 azx_release_device(azx_dev); in azx_pcm_close()
114 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_hw_params() local
115 struct hdac_stream *hdas = azx_stream(azx_dev); in azx_pcm_hw_params()
117 trace_azx_pcm_hw_params(chip, azx_dev); in azx_pcm_hw_params()
118 guard_dsp_lock(azx_dev); in azx_pcm_hw_params()
119 if (dsp_is_locked(azx_dev)) in azx_pcm_hw_params()
138 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_hw_free() local
142 guard_dsp_lock(azx_dev); in azx_pcm_hw_free()
143 if (!dsp_is_locked(azx_dev)) in azx_pcm_hw_free()
144 snd_hdac_stream_cleanup(azx_stream(azx_dev)); in azx_pcm_hw_free()
148 azx_stream(azx_dev)->prepared = 0; in azx_pcm_hw_free()
156 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_prepare() local
165 trace_azx_pcm_prepare(chip, azx_dev); in azx_pcm_prepare()
166 guard_dsp_lock(azx_dev); in azx_pcm_prepare()
167 if (dsp_is_locked(azx_dev)) in azx_pcm_prepare()
170 snd_hdac_stream_reset(azx_stream(azx_dev)); in azx_pcm_prepare()
181 err = snd_hdac_stream_set_params(azx_stream(azx_dev), format_val); in azx_pcm_prepare()
185 snd_hdac_stream_setup(azx_stream(azx_dev), false); in azx_pcm_prepare()
187 stream_tag = azx_dev->core.stream_tag; in azx_pcm_prepare()
193 azx_dev->core.format_val, substream); in azx_pcm_prepare()
197 azx_stream(azx_dev)->prepared = 1; in azx_pcm_prepare()
206 struct azx_dev *azx_dev; in azx_pcm_trigger() local
213 azx_dev = get_azx_dev(substream); in azx_pcm_trigger()
214 trace_azx_pcm_trigger(chip, azx_dev, cmd); in azx_pcm_trigger()
216 hstr = azx_stream(azx_dev); in azx_pcm_trigger()
222 if (dsp_is_locked(azx_dev) || !hstr->prepared) in azx_pcm_trigger()
243 azx_dev = get_azx_dev(s); in azx_pcm_trigger()
244 sbits |= 1 << azx_dev->core.index; in azx_pcm_trigger()
255 azx_dev = get_azx_dev(s); in azx_pcm_trigger()
257 azx_dev->insufficient = 1; in azx_pcm_trigger()
258 snd_hdac_stream_start(azx_stream(azx_dev)); in azx_pcm_trigger()
260 snd_hdac_stream_stop(azx_stream(azx_dev)); in azx_pcm_trigger()
274 unsigned int azx_get_pos_lpib(struct azx *chip, struct azx_dev *azx_dev) in azx_get_pos_lpib() argument
276 return snd_hdac_stream_get_pos_lpib(azx_stream(azx_dev)); in azx_get_pos_lpib()
280 unsigned int azx_get_pos_posbuf(struct azx *chip, struct azx_dev *azx_dev) in azx_get_pos_posbuf() argument
282 return snd_hdac_stream_get_pos_posbuf(azx_stream(azx_dev)); in azx_get_pos_posbuf()
287 struct azx_dev *azx_dev) in azx_get_position() argument
289 struct snd_pcm_substream *substream = azx_dev->core.substream; in azx_get_position()
295 pos = chip->get_position[stream](chip, azx_dev); in azx_get_position()
297 pos = azx_get_pos_posbuf(chip, azx_dev); in azx_get_position()
299 if (pos >= azx_dev->core.bufsize) in azx_get_position()
307 delay += chip->get_delay[stream](chip, azx_dev, pos); in azx_get_position()
314 trace_azx_get_position(chip, azx_dev, pos, delay); in azx_get_position()
323 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_pointer() local
325 azx_get_position(chip, azx_dev)); in azx_pcm_pointer()
364 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_get_sync_time() local
387 (azx_dev->core.stream_tag - 1); in azx_get_sync_time()
492 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_get_time_info() local
503 nsec = timecounter_read(&azx_dev->core.tc); in azx_get_time_info()
579 struct azx_dev *azx_dev; in azx_pcm_open() local
586 azx_dev = azx_assign_device(chip, substream); in azx_pcm_open()
587 trace_azx_pcm_open(chip, azx_dev); in azx_pcm_open()
588 if (azx_dev == NULL) { in azx_pcm_open()
592 runtime->private_data = azx_dev; in azx_pcm_open()
634 azx_release_device(azx_dev); in azx_pcm_open()
643 azx_release_device(azx_dev); in azx_pcm_open()
939 static struct azx_dev *
958 struct azx_dev *azx_dev; in snd_hda_codec_load_dsp_prepare() local
963 azx_dev = azx_get_dsp_loader_dev(chip); in snd_hda_codec_load_dsp_prepare()
964 hstr = azx_stream(azx_dev); in snd_hda_codec_load_dsp_prepare()
967 chip->saved_azx_dev = *azx_dev; in snd_hda_codec_load_dsp_prepare()
976 *azx_dev = chip->saved_azx_dev; in snd_hda_codec_load_dsp_prepare()
989 struct azx_dev *azx_dev = azx_get_dsp_loader_dev(chip); in snd_hda_codec_load_dsp_trigger() local
991 snd_hdac_dsp_trigger(azx_stream(azx_dev), start); in snd_hda_codec_load_dsp_trigger()
1000 struct azx_dev *azx_dev = azx_get_dsp_loader_dev(chip); in snd_hda_codec_load_dsp_cleanup() local
1001 struct hdac_stream *hstr = azx_stream(azx_dev); in snd_hda_codec_load_dsp_cleanup()
1009 *azx_dev = chip->saved_azx_dev; in snd_hda_codec_load_dsp_cleanup()
1048 struct azx_dev *azx_dev = stream_to_azx_dev(s); in stream_update() local
1052 chip->ops->position_check(chip, azx_dev)) { in stream_update()
1054 snd_pcm_period_elapsed(azx_stream(azx_dev)->substream); in stream_update()
1286 struct azx_dev *azx_dev = kzalloc_obj(*azx_dev); in azx_init_streams() local
1289 if (!azx_dev) in azx_init_streams()
1303 snd_hdac_stream_init(azx_bus(chip), azx_stream(azx_dev), in azx_init_streams()