Lines Matching refs:azx_dev

38 static inline struct azx_dev *
50 static inline void azx_release_device(struct azx_dev *azx_dev) in azx_release_device() argument
52 snd_hdac_stream_release(azx_stream(azx_dev)); in azx_release_device()
91 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_close() local
93 trace_azx_pcm_close(chip, azx_dev); in azx_pcm_close()
95 azx_release_device(azx_dev); in azx_pcm_close()
109 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_hw_params() local
112 trace_azx_pcm_hw_params(chip, azx_dev); in azx_pcm_hw_params()
113 dsp_lock(azx_dev); in azx_pcm_hw_params()
114 if (dsp_is_locked(azx_dev)) { in azx_pcm_hw_params()
119 azx_dev->core.bufsize = 0; in azx_pcm_hw_params()
120 azx_dev->core.period_bytes = 0; in azx_pcm_hw_params()
121 azx_dev->core.format_val = 0; in azx_pcm_hw_params()
126 dsp_unlock(azx_dev); in azx_pcm_hw_params()
133 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_hw_free() local
138 dsp_lock(azx_dev); in azx_pcm_hw_free()
139 if (!dsp_is_locked(azx_dev)) in azx_pcm_hw_free()
140 snd_hdac_stream_cleanup(azx_stream(azx_dev)); in azx_pcm_hw_free()
145 azx_stream(azx_dev)->prepared = 0; in azx_pcm_hw_free()
146 dsp_unlock(azx_dev); in azx_pcm_hw_free()
154 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_prepare() local
163 trace_azx_pcm_prepare(chip, azx_dev); in azx_pcm_prepare()
164 dsp_lock(azx_dev); in azx_pcm_prepare()
165 if (dsp_is_locked(azx_dev)) { in azx_pcm_prepare()
170 snd_hdac_stream_reset(azx_stream(azx_dev)); in azx_pcm_prepare()
184 err = snd_hdac_stream_set_params(azx_stream(azx_dev), format_val); in azx_pcm_prepare()
188 snd_hdac_stream_setup(azx_stream(azx_dev)); in azx_pcm_prepare()
190 stream_tag = azx_dev->core.stream_tag; in azx_pcm_prepare()
196 azx_dev->core.format_val, substream); in azx_pcm_prepare()
200 azx_stream(azx_dev)->prepared = 1; in azx_pcm_prepare()
201 dsp_unlock(azx_dev); in azx_pcm_prepare()
210 struct azx_dev *azx_dev; in azx_pcm_trigger() local
217 azx_dev = get_azx_dev(substream); in azx_pcm_trigger()
218 trace_azx_pcm_trigger(chip, azx_dev, cmd); in azx_pcm_trigger()
220 hstr = azx_stream(azx_dev); in azx_pcm_trigger()
226 if (dsp_is_locked(azx_dev) || !hstr->prepared) in azx_pcm_trigger()
247 azx_dev = get_azx_dev(s); in azx_pcm_trigger()
248 sbits |= 1 << azx_dev->core.index; in azx_pcm_trigger()
260 azx_dev = get_azx_dev(s); in azx_pcm_trigger()
262 azx_dev->insufficient = 1; in azx_pcm_trigger()
263 snd_hdac_stream_start(azx_stream(azx_dev), true); in azx_pcm_trigger()
265 snd_hdac_stream_stop(azx_stream(azx_dev)); in azx_pcm_trigger()
281 unsigned int azx_get_pos_lpib(struct azx *chip, struct azx_dev *azx_dev) in azx_get_pos_lpib() argument
283 return snd_hdac_stream_get_pos_lpib(azx_stream(azx_dev)); in azx_get_pos_lpib()
287 unsigned int azx_get_pos_posbuf(struct azx *chip, struct azx_dev *azx_dev) in azx_get_pos_posbuf() argument
289 return snd_hdac_stream_get_pos_posbuf(azx_stream(azx_dev)); in azx_get_pos_posbuf()
294 struct azx_dev *azx_dev) in azx_get_position() argument
296 struct snd_pcm_substream *substream = azx_dev->core.substream; in azx_get_position()
302 pos = chip->get_position[stream](chip, azx_dev); in azx_get_position()
304 pos = azx_get_pos_posbuf(chip, azx_dev); in azx_get_position()
306 if (pos >= azx_dev->core.bufsize) in azx_get_position()
314 delay += chip->get_delay[stream](chip, azx_dev, pos); in azx_get_position()
321 trace_azx_get_position(chip, azx_dev, pos, delay); in azx_get_position()
330 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_pcm_pointer() local
332 azx_get_position(chip, azx_dev)); in azx_pcm_pointer()
371 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_get_sync_time() local
394 (azx_dev->core.stream_tag - 1); in azx_get_sync_time()
498 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_get_time_info() local
509 nsec = timecounter_read(&azx_dev->core.tc); in azx_get_time_info()
586 struct azx_dev *azx_dev; in azx_pcm_open() local
593 azx_dev = azx_assign_device(chip, substream); in azx_pcm_open()
594 trace_azx_pcm_open(chip, azx_dev); in azx_pcm_open()
595 if (azx_dev == NULL) { in azx_pcm_open()
599 runtime->private_data = azx_dev; in azx_pcm_open()
648 azx_release_device(azx_dev); in azx_pcm_open()
657 azx_release_device(azx_dev); in azx_pcm_open()
1009 static struct azx_dev *
1028 struct azx_dev *azx_dev; in snd_hda_codec_load_dsp_prepare() local
1033 azx_dev = azx_get_dsp_loader_dev(chip); in snd_hda_codec_load_dsp_prepare()
1034 hstr = azx_stream(azx_dev); in snd_hda_codec_load_dsp_prepare()
1037 chip->saved_azx_dev = *azx_dev; in snd_hda_codec_load_dsp_prepare()
1046 *azx_dev = chip->saved_azx_dev; in snd_hda_codec_load_dsp_prepare()
1060 struct azx_dev *azx_dev = azx_get_dsp_loader_dev(chip); in snd_hda_codec_load_dsp_trigger() local
1062 snd_hdac_dsp_trigger(azx_stream(azx_dev), start); in snd_hda_codec_load_dsp_trigger()
1071 struct azx_dev *azx_dev = azx_get_dsp_loader_dev(chip); in snd_hda_codec_load_dsp_cleanup() local
1072 struct hdac_stream *hstr = azx_stream(azx_dev); in snd_hda_codec_load_dsp_cleanup()
1080 *azx_dev = chip->saved_azx_dev; in snd_hda_codec_load_dsp_cleanup()
1122 struct azx_dev *azx_dev = stream_to_azx_dev(s); in stream_update() local
1126 chip->ops->position_check(chip, azx_dev)) { in stream_update()
1128 snd_pcm_period_elapsed(azx_stream(azx_dev)->substream); in stream_update()
1351 struct azx_dev *azx_dev = kzalloc(sizeof(*azx_dev), GFP_KERNEL); in azx_init_streams() local
1354 if (!azx_dev) in azx_init_streams()
1368 snd_hdac_stream_init(azx_bus(chip), azx_stream(azx_dev), in azx_init_streams()