Lines Matching refs:azx_dev
39 static inline struct azx_dev *
51 static inline void azx_release_device(struct azx_dev *azx_dev)
53 snd_hdac_stream_release(azx_stream(azx_dev));
92 struct azx_dev *azx_dev = get_azx_dev(substream);
94 trace_azx_pcm_close(chip, azx_dev);
96 azx_release_device(azx_dev);
110 struct azx_dev *azx_dev = get_azx_dev(substream);
113 trace_azx_pcm_hw_params(chip, azx_dev);
114 dsp_lock(azx_dev);
115 if (dsp_is_locked(azx_dev)) {
120 azx_dev->core.bufsize = 0;
121 azx_dev->core.period_bytes = 0;
122 azx_dev->core.format_val = 0;
125 dsp_unlock(azx_dev);
132 struct azx_dev *azx_dev = get_azx_dev(substream);
136 dsp_lock(azx_dev);
137 if (!dsp_is_locked(azx_dev))
138 snd_hdac_stream_cleanup(azx_stream(azx_dev));
142 azx_stream(azx_dev)->prepared = 0;
143 dsp_unlock(azx_dev);
151 struct azx_dev *azx_dev = get_azx_dev(substream);
160 trace_azx_pcm_prepare(chip, azx_dev);
161 dsp_lock(azx_dev);
162 if (dsp_is_locked(azx_dev)) {
167 snd_hdac_stream_reset(azx_stream(azx_dev));
181 err = snd_hdac_stream_set_params(azx_stream(azx_dev), format_val);
185 snd_hdac_stream_setup(azx_stream(azx_dev));
187 stream_tag = azx_dev->core.stream_tag;
193 azx_dev->core.format_val, substream);
197 azx_stream(azx_dev)->prepared = 1;
198 dsp_unlock(azx_dev);
207 struct azx_dev *azx_dev;
214 azx_dev = get_azx_dev(substream);
215 trace_azx_pcm_trigger(chip, azx_dev, cmd);
217 hstr = azx_stream(azx_dev);
223 if (dsp_is_locked(azx_dev) || !hstr->prepared)
244 azx_dev = get_azx_dev(s);
245 sbits |= 1 << azx_dev->core.index;
257 azx_dev = get_azx_dev(s);
259 azx_dev->insufficient = 1;
260 snd_hdac_stream_start(azx_stream(azx_dev));
262 snd_hdac_stream_stop(azx_stream(azx_dev));
278 unsigned int azx_get_pos_lpib(struct azx *chip, struct azx_dev *azx_dev)
280 return snd_hdac_stream_get_pos_lpib(azx_stream(azx_dev));
284 unsigned int azx_get_pos_posbuf(struct azx *chip, struct azx_dev *azx_dev)
286 return snd_hdac_stream_get_pos_posbuf(azx_stream(azx_dev));
291 struct azx_dev *azx_dev)
293 struct snd_pcm_substream *substream = azx_dev->core.substream;
299 pos = chip->get_position[stream](chip, azx_dev);
301 pos = azx_get_pos_posbuf(chip, azx_dev);
303 if (pos >= azx_dev->core.bufsize)
311 delay += chip->get_delay[stream](chip, azx_dev, pos);
318 trace_azx_get_position(chip, azx_dev, pos, delay);
327 struct azx_dev *azx_dev = get_azx_dev(substream);
329 azx_get_position(chip, azx_dev));
368 struct azx_dev *azx_dev = get_azx_dev(substream);
391 (azx_dev->core.stream_tag - 1);
495 struct azx_dev *azx_dev = get_azx_dev(substream);
506 nsec = timecounter_read(&azx_dev->core.tc);
582 struct azx_dev *azx_dev;
589 azx_dev = azx_assign_device(chip, substream);
590 trace_azx_pcm_open(chip, azx_dev);
591 if (azx_dev == NULL) {
595 runtime->private_data = azx_dev;
637 azx_release_device(azx_dev);
646 azx_release_device(azx_dev);
942 static struct azx_dev *
961 struct azx_dev *azx_dev;
966 azx_dev = azx_get_dsp_loader_dev(chip);
967 hstr = azx_stream(azx_dev);
970 chip->saved_azx_dev = *azx_dev;
979 *azx_dev = chip->saved_azx_dev;
993 struct azx_dev *azx_dev = azx_get_dsp_loader_dev(chip);
995 snd_hdac_dsp_trigger(azx_stream(azx_dev), start);
1004 struct azx_dev *azx_dev = azx_get_dsp_loader_dev(chip);
1005 struct hdac_stream *hstr = azx_stream(azx_dev);
1013 *azx_dev = chip->saved_azx_dev;
1053 struct azx_dev *azx_dev = stream_to_azx_dev(s);
1057 chip->ops->position_check(chip, azx_dev)) {
1059 snd_pcm_period_elapsed(azx_stream(azx_dev)->substream);
1290 struct azx_dev *azx_dev = kzalloc(sizeof(*azx_dev), GFP_KERNEL);
1293 if (!azx_dev)
1307 snd_hdac_stream_init(azx_bus(chip), azx_stream(azx_dev),