azx_dev           542 include/sound/hdaudio.h void snd_hdac_stream_init(struct hdac_bus *bus, struct hdac_stream *azx_dev,
azx_dev           546 include/sound/hdaudio.h void snd_hdac_stream_release(struct hdac_stream *azx_dev);
azx_dev           550 include/sound/hdaudio.h int snd_hdac_stream_setup(struct hdac_stream *azx_dev);
azx_dev           551 include/sound/hdaudio.h void snd_hdac_stream_cleanup(struct hdac_stream *azx_dev);
azx_dev           552 include/sound/hdaudio.h int snd_hdac_stream_setup_periods(struct hdac_stream *azx_dev);
azx_dev           553 include/sound/hdaudio.h int snd_hdac_stream_set_params(struct hdac_stream *azx_dev,
azx_dev           555 include/sound/hdaudio.h void snd_hdac_stream_start(struct hdac_stream *azx_dev, bool fresh_start);
azx_dev           556 include/sound/hdaudio.h void snd_hdac_stream_clear(struct hdac_stream *azx_dev);
azx_dev           557 include/sound/hdaudio.h void snd_hdac_stream_stop(struct hdac_stream *azx_dev);
azx_dev           558 include/sound/hdaudio.h void snd_hdac_stream_reset(struct hdac_stream *azx_dev);
azx_dev           559 include/sound/hdaudio.h void snd_hdac_stream_sync_trigger(struct hdac_stream *azx_dev, bool set,
azx_dev           561 include/sound/hdaudio.h void snd_hdac_stream_sync(struct hdac_stream *azx_dev, bool start,
azx_dev           563 include/sound/hdaudio.h void snd_hdac_stream_timecounter_init(struct hdac_stream *azx_dev,
azx_dev           606 include/sound/hdaudio.h int snd_hdac_dsp_prepare(struct hdac_stream *azx_dev, unsigned int format,
azx_dev           608 include/sound/hdaudio.h void snd_hdac_dsp_trigger(struct hdac_stream *azx_dev, bool start);
azx_dev           609 include/sound/hdaudio.h void snd_hdac_dsp_cleanup(struct hdac_stream *azx_dev,
azx_dev           618 include/sound/hdaudio.h snd_hdac_dsp_prepare(struct hdac_stream *azx_dev, unsigned int format,
azx_dev           624 include/sound/hdaudio.h static inline void snd_hdac_dsp_trigger(struct hdac_stream *azx_dev, bool start)
azx_dev           628 include/sound/hdaudio.h static inline void snd_hdac_dsp_cleanup(struct hdac_stream *azx_dev,
azx_dev            90 include/sound/hdaudio_ext.h void snd_hdac_ext_stream_release(struct hdac_ext_stream *azx_dev, int type);
azx_dev            92 include/sound/hdaudio_ext.h 				struct hdac_ext_stream *azx_dev, bool decouple);
azx_dev           444 sound/hda/hdac_controller.c 	struct hdac_stream *azx_dev;
azx_dev           447 sound/hda/hdac_controller.c 	list_for_each_entry(azx_dev, &bus->stream_list, list)
azx_dev           448 sound/hda/hdac_controller.c 		snd_hdac_stream_updateb(azx_dev, SD_CTL, SD_INT_MASK, 0);
azx_dev           460 sound/hda/hdac_controller.c 	struct hdac_stream *azx_dev;
azx_dev           463 sound/hda/hdac_controller.c 	list_for_each_entry(azx_dev, &bus->stream_list, list)
azx_dev           464 sound/hda/hdac_controller.c 		snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK);
azx_dev           547 sound/hda/hdac_controller.c 	struct hdac_stream *azx_dev;
azx_dev           551 sound/hda/hdac_controller.c 	list_for_each_entry(azx_dev, &bus->stream_list, list) {
azx_dev           552 sound/hda/hdac_controller.c 		if (status & azx_dev->sd_int_sta_mask) {
azx_dev           553 sound/hda/hdac_controller.c 			sd_status = snd_hdac_stream_readb(azx_dev, SD_STS);
azx_dev           554 sound/hda/hdac_controller.c 			snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK);
azx_dev           555 sound/hda/hdac_controller.c 			handled |= 1 << azx_dev->index;
azx_dev           556 sound/hda/hdac_controller.c 			if (!azx_dev->substream || !azx_dev->running ||
azx_dev           560 sound/hda/hdac_controller.c 				ack(bus, azx_dev);
azx_dev            60 sound/hda/hdac_stream.c void snd_hdac_stream_init(struct hdac_bus *bus, struct hdac_stream *azx_dev,
azx_dev            63 sound/hda/hdac_stream.c 	azx_dev->bus = bus;
azx_dev            65 sound/hda/hdac_stream.c 	azx_dev->sd_addr = bus->remap_addr + (0x20 * idx + 0x80);
azx_dev            67 sound/hda/hdac_stream.c 	azx_dev->sd_int_sta_mask = 1 << idx;
azx_dev            68 sound/hda/hdac_stream.c 	azx_dev->index = idx;
azx_dev            69 sound/hda/hdac_stream.c 	azx_dev->direction = direction;
azx_dev            70 sound/hda/hdac_stream.c 	azx_dev->stream_tag = tag;
azx_dev            71 sound/hda/hdac_stream.c 	snd_hdac_dsp_lock_init(azx_dev);
azx_dev            72 sound/hda/hdac_stream.c 	list_add_tail(&azx_dev->list, &bus->stream_list);
azx_dev            83 sound/hda/hdac_stream.c void snd_hdac_stream_start(struct hdac_stream *azx_dev, bool fresh_start)
azx_dev            85 sound/hda/hdac_stream.c 	struct hdac_bus *bus = azx_dev->bus;
azx_dev            88 sound/hda/hdac_stream.c 	trace_snd_hdac_stream_start(bus, azx_dev);
azx_dev            90 sound/hda/hdac_stream.c 	azx_dev->start_wallclk = snd_hdac_chip_readl(bus, WALLCLK);
azx_dev            92 sound/hda/hdac_stream.c 		azx_dev->start_wallclk -= azx_dev->period_wallclk;
azx_dev            96 sound/hda/hdac_stream.c 			      1 << azx_dev->index,
azx_dev            97 sound/hda/hdac_stream.c 			      1 << azx_dev->index);
azx_dev            99 sound/hda/hdac_stream.c 	if (azx_dev->stripe) {
azx_dev           100 sound/hda/hdac_stream.c 		if (azx_dev->substream)
azx_dev           101 sound/hda/hdac_stream.c 			stripe_ctl = snd_hdac_get_stream_stripe_ctl(bus, azx_dev->substream);
azx_dev           104 sound/hda/hdac_stream.c 		snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, SD_CTL_STRIPE_MASK,
azx_dev           108 sound/hda/hdac_stream.c 	snd_hdac_stream_updateb(azx_dev, SD_CTL,
azx_dev           110 sound/hda/hdac_stream.c 	azx_dev->running = true;
azx_dev           118 sound/hda/hdac_stream.c void snd_hdac_stream_clear(struct hdac_stream *azx_dev)
azx_dev           120 sound/hda/hdac_stream.c 	snd_hdac_stream_updateb(azx_dev, SD_CTL,
azx_dev           122 sound/hda/hdac_stream.c 	snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK); /* to be sure */
azx_dev           123 sound/hda/hdac_stream.c 	if (azx_dev->stripe)
azx_dev           124 sound/hda/hdac_stream.c 		snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, SD_CTL_STRIPE_MASK, 0);
azx_dev           125 sound/hda/hdac_stream.c 	azx_dev->running = false;
azx_dev           135 sound/hda/hdac_stream.c void snd_hdac_stream_stop(struct hdac_stream *azx_dev)
azx_dev           137 sound/hda/hdac_stream.c 	trace_snd_hdac_stream_stop(azx_dev->bus, azx_dev);
azx_dev           139 sound/hda/hdac_stream.c 	snd_hdac_stream_clear(azx_dev);
azx_dev           141 sound/hda/hdac_stream.c 	snd_hdac_chip_updatel(azx_dev->bus, INTCTL, 1 << azx_dev->index, 0);
azx_dev           149 sound/hda/hdac_stream.c void snd_hdac_stream_reset(struct hdac_stream *azx_dev)
azx_dev           154 sound/hda/hdac_stream.c 	snd_hdac_stream_clear(azx_dev);
azx_dev           156 sound/hda/hdac_stream.c 	snd_hdac_stream_updateb(azx_dev, SD_CTL, 0, SD_CTL_STREAM_RESET);
azx_dev           160 sound/hda/hdac_stream.c 		val = snd_hdac_stream_readb(azx_dev, SD_CTL) &
azx_dev           166 sound/hda/hdac_stream.c 	snd_hdac_stream_writeb(azx_dev, SD_CTL, val);
azx_dev           172 sound/hda/hdac_stream.c 		val = snd_hdac_stream_readb(azx_dev, SD_CTL) &
azx_dev           179 sound/hda/hdac_stream.c 	if (azx_dev->posbuf)
azx_dev           180 sound/hda/hdac_stream.c 		*azx_dev->posbuf = 0;
azx_dev           188 sound/hda/hdac_stream.c int snd_hdac_stream_setup(struct hdac_stream *azx_dev)
azx_dev           190 sound/hda/hdac_stream.c 	struct hdac_bus *bus = azx_dev->bus;
azx_dev           194 sound/hda/hdac_stream.c 	if (azx_dev->substream)
azx_dev           195 sound/hda/hdac_stream.c 		runtime = azx_dev->substream->runtime;
azx_dev           199 sound/hda/hdac_stream.c 	snd_hdac_stream_clear(azx_dev);
azx_dev           201 sound/hda/hdac_stream.c 	val = snd_hdac_stream_readl(azx_dev, SD_CTL);
azx_dev           203 sound/hda/hdac_stream.c 		(azx_dev->stream_tag << SD_CTL_STREAM_TAG_SHIFT);
azx_dev           206 sound/hda/hdac_stream.c 	snd_hdac_stream_writel(azx_dev, SD_CTL, val);
azx_dev           209 sound/hda/hdac_stream.c 	snd_hdac_stream_writel(azx_dev, SD_CBL, azx_dev->bufsize);
azx_dev           213 sound/hda/hdac_stream.c 	snd_hdac_stream_writew(azx_dev, SD_FORMAT, azx_dev->format_val);
azx_dev           216 sound/hda/hdac_stream.c 	snd_hdac_stream_writew(azx_dev, SD_LVI, azx_dev->frags - 1);
azx_dev           220 sound/hda/hdac_stream.c 	snd_hdac_stream_writel(azx_dev, SD_BDLPL, (u32)azx_dev->bdl.addr);
azx_dev           222 sound/hda/hdac_stream.c 	snd_hdac_stream_writel(azx_dev, SD_BDLPU,
azx_dev           223 sound/hda/hdac_stream.c 			       upper_32_bits(azx_dev->bdl.addr));
azx_dev           233 sound/hda/hdac_stream.c 	snd_hdac_stream_updatel(azx_dev, SD_CTL, 0, SD_INT_MASK);
azx_dev           235 sound/hda/hdac_stream.c 	azx_dev->fifo_size = snd_hdac_stream_readw(azx_dev, SD_FIFOSIZE) + 1;
azx_dev           242 sound/hda/hdac_stream.c 		azx_dev->delay_negative_threshold =
azx_dev           245 sound/hda/hdac_stream.c 		azx_dev->delay_negative_threshold = 0;
azx_dev           249 sound/hda/hdac_stream.c 		azx_dev->period_wallclk = (((runtime->period_size * 24000) /
azx_dev           260 sound/hda/hdac_stream.c void snd_hdac_stream_cleanup(struct hdac_stream *azx_dev)
azx_dev           262 sound/hda/hdac_stream.c 	snd_hdac_stream_writel(azx_dev, SD_BDLPL, 0);
azx_dev           263 sound/hda/hdac_stream.c 	snd_hdac_stream_writel(azx_dev, SD_BDLPU, 0);
azx_dev           264 sound/hda/hdac_stream.c 	snd_hdac_stream_writel(azx_dev, SD_CTL, 0);
azx_dev           265 sound/hda/hdac_stream.c 	azx_dev->bufsize = 0;
azx_dev           266 sound/hda/hdac_stream.c 	azx_dev->period_bytes = 0;
azx_dev           267 sound/hda/hdac_stream.c 	azx_dev->format_val = 0;
azx_dev           285 sound/hda/hdac_stream.c 	struct hdac_stream *azx_dev;
azx_dev           292 sound/hda/hdac_stream.c 	list_for_each_entry(azx_dev, &bus->stream_list, list) {
azx_dev           293 sound/hda/hdac_stream.c 		if (azx_dev->direction != substream->stream)
azx_dev           295 sound/hda/hdac_stream.c 		if (azx_dev->opened)
azx_dev           297 sound/hda/hdac_stream.c 		if (azx_dev->assigned_key == key) {
azx_dev           298 sound/hda/hdac_stream.c 			res = azx_dev;
azx_dev           302 sound/hda/hdac_stream.c 			res = azx_dev;
azx_dev           322 sound/hda/hdac_stream.c void snd_hdac_stream_release(struct hdac_stream *azx_dev)
azx_dev           324 sound/hda/hdac_stream.c 	struct hdac_bus *bus = azx_dev->bus;
azx_dev           327 sound/hda/hdac_stream.c 	azx_dev->opened = 0;
azx_dev           328 sound/hda/hdac_stream.c 	azx_dev->running = 0;
azx_dev           329 sound/hda/hdac_stream.c 	azx_dev->substream = NULL;
azx_dev           361 sound/hda/hdac_stream.c 		      struct hdac_stream *azx_dev, __le32 **bdlp,
azx_dev           370 sound/hda/hdac_stream.c 		if (azx_dev->frags >= AZX_MAX_BDL_ENTRIES)
azx_dev           393 sound/hda/hdac_stream.c 		azx_dev->frags++;
azx_dev           407 sound/hda/hdac_stream.c int snd_hdac_stream_setup_periods(struct hdac_stream *azx_dev)
azx_dev           409 sound/hda/hdac_stream.c 	struct hdac_bus *bus = azx_dev->bus;
azx_dev           410 sound/hda/hdac_stream.c 	struct snd_pcm_substream *substream = azx_dev->substream;
azx_dev           417 sound/hda/hdac_stream.c 	snd_hdac_stream_writel(azx_dev, SD_BDLPL, 0);
azx_dev           418 sound/hda/hdac_stream.c 	snd_hdac_stream_writel(azx_dev, SD_BDLPU, 0);
azx_dev           420 sound/hda/hdac_stream.c 	period_bytes = azx_dev->period_bytes;
azx_dev           421 sound/hda/hdac_stream.c 	periods = azx_dev->bufsize / period_bytes;
azx_dev           424 sound/hda/hdac_stream.c 	bdl = (__le32 *)azx_dev->bdl.area;
azx_dev           426 sound/hda/hdac_stream.c 	azx_dev->frags = 0;
azx_dev           429 sound/hda/hdac_stream.c 	if (!azx_dev->no_period_wakeup && pos_adj > 0) {
azx_dev           444 sound/hda/hdac_stream.c 					 azx_dev,
azx_dev           455 sound/hda/hdac_stream.c 					 azx_dev, &bdl, ofs,
azx_dev           459 sound/hda/hdac_stream.c 					 azx_dev, &bdl, ofs,
azx_dev           461 sound/hda/hdac_stream.c 					 !azx_dev->no_period_wakeup);
azx_dev           469 sound/hda/hdac_stream.c 		azx_dev->bufsize, period_bytes);
azx_dev           482 sound/hda/hdac_stream.c int snd_hdac_stream_set_params(struct hdac_stream *azx_dev,
azx_dev           487 sound/hda/hdac_stream.c 	struct snd_pcm_substream *substream = azx_dev->substream;
azx_dev           497 sound/hda/hdac_stream.c 	if (bufsize != azx_dev->bufsize ||
azx_dev           498 sound/hda/hdac_stream.c 	    period_bytes != azx_dev->period_bytes ||
azx_dev           499 sound/hda/hdac_stream.c 	    format_val != azx_dev->format_val ||
azx_dev           500 sound/hda/hdac_stream.c 	    runtime->no_period_wakeup != azx_dev->no_period_wakeup) {
azx_dev           501 sound/hda/hdac_stream.c 		azx_dev->bufsize = bufsize;
azx_dev           502 sound/hda/hdac_stream.c 		azx_dev->period_bytes = period_bytes;
azx_dev           503 sound/hda/hdac_stream.c 		azx_dev->format_val = format_val;
azx_dev           504 sound/hda/hdac_stream.c 		azx_dev->no_period_wakeup = runtime->no_period_wakeup;
azx_dev           505 sound/hda/hdac_stream.c 		err = snd_hdac_stream_setup_periods(azx_dev);
azx_dev           515 sound/hda/hdac_stream.c 	struct hdac_stream *azx_dev = container_of(cc, struct hdac_stream, cc);
azx_dev           517 sound/hda/hdac_stream.c 	return snd_hdac_chip_readl(azx_dev->bus, WALLCLK);
azx_dev           520 sound/hda/hdac_stream.c static void azx_timecounter_init(struct hdac_stream *azx_dev,
azx_dev           523 sound/hda/hdac_stream.c 	struct timecounter *tc = &azx_dev->tc;
azx_dev           524 sound/hda/hdac_stream.c 	struct cyclecounter *cc = &azx_dev->cc;
azx_dev           564 sound/hda/hdac_stream.c void snd_hdac_stream_timecounter_init(struct hdac_stream *azx_dev,
azx_dev           567 sound/hda/hdac_stream.c 	struct hdac_bus *bus = azx_dev->bus;
azx_dev           568 sound/hda/hdac_stream.c 	struct snd_pcm_runtime *runtime = azx_dev->substream->runtime;
azx_dev           595 sound/hda/hdac_stream.c void snd_hdac_stream_sync_trigger(struct hdac_stream *azx_dev, bool set,
azx_dev           598 sound/hda/hdac_stream.c 	struct hdac_bus *bus = azx_dev->bus;
azx_dev           621 sound/hda/hdac_stream.c void snd_hdac_stream_sync(struct hdac_stream *azx_dev, bool start,
azx_dev           624 sound/hda/hdac_stream.c 	struct hdac_bus *bus = azx_dev->bus;
azx_dev           665 sound/hda/hdac_stream.c int snd_hdac_dsp_prepare(struct hdac_stream *azx_dev, unsigned int format,
azx_dev           668 sound/hda/hdac_stream.c 	struct hdac_bus *bus = azx_dev->bus;
azx_dev           672 sound/hda/hdac_stream.c 	snd_hdac_dsp_lock(azx_dev);
azx_dev           674 sound/hda/hdac_stream.c 	if (azx_dev->running || azx_dev->locked) {
azx_dev           679 sound/hda/hdac_stream.c 	azx_dev->locked = true;
azx_dev           687 sound/hda/hdac_stream.c 	azx_dev->substream = NULL;
azx_dev           688 sound/hda/hdac_stream.c 	azx_dev->bufsize = byte_size;
azx_dev           689 sound/hda/hdac_stream.c 	azx_dev->period_bytes = byte_size;
azx_dev           690 sound/hda/hdac_stream.c 	azx_dev->format_val = format;
azx_dev           692 sound/hda/hdac_stream.c 	snd_hdac_stream_reset(azx_dev);
azx_dev           695 sound/hda/hdac_stream.c 	snd_hdac_stream_writel(azx_dev, SD_BDLPL, 0);
azx_dev           696 sound/hda/hdac_stream.c 	snd_hdac_stream_writel(azx_dev, SD_BDLPU, 0);
azx_dev           698 sound/hda/hdac_stream.c 	azx_dev->frags = 0;
azx_dev           699 sound/hda/hdac_stream.c 	bdl = (__le32 *)azx_dev->bdl.area;
azx_dev           700 sound/hda/hdac_stream.c 	err = setup_bdle(bus, bufp, azx_dev, &bdl, 0, byte_size, 0);
azx_dev           704 sound/hda/hdac_stream.c 	snd_hdac_stream_setup(azx_dev);
azx_dev           705 sound/hda/hdac_stream.c 	snd_hdac_dsp_unlock(azx_dev);
azx_dev           706 sound/hda/hdac_stream.c 	return azx_dev->stream_tag;
azx_dev           712 sound/hda/hdac_stream.c 	azx_dev->locked = false;
azx_dev           715 sound/hda/hdac_stream.c 	snd_hdac_dsp_unlock(azx_dev);
azx_dev           725 sound/hda/hdac_stream.c void snd_hdac_dsp_trigger(struct hdac_stream *azx_dev, bool start)
azx_dev           728 sound/hda/hdac_stream.c 		snd_hdac_stream_start(azx_dev, true);
azx_dev           730 sound/hda/hdac_stream.c 		snd_hdac_stream_stop(azx_dev);
azx_dev           739 sound/hda/hdac_stream.c void snd_hdac_dsp_cleanup(struct hdac_stream *azx_dev,
azx_dev           742 sound/hda/hdac_stream.c 	struct hdac_bus *bus = azx_dev->bus;
azx_dev           744 sound/hda/hdac_stream.c 	if (!dmab->area || !azx_dev->locked)
azx_dev           747 sound/hda/hdac_stream.c 	snd_hdac_dsp_lock(azx_dev);
azx_dev           749 sound/hda/hdac_stream.c 	snd_hdac_stream_writel(azx_dev, SD_BDLPL, 0);
azx_dev           750 sound/hda/hdac_stream.c 	snd_hdac_stream_writel(azx_dev, SD_BDLPU, 0);
azx_dev           751 sound/hda/hdac_stream.c 	snd_hdac_stream_writel(azx_dev, SD_CTL, 0);
azx_dev           752 sound/hda/hdac_stream.c 	azx_dev->bufsize = 0;
azx_dev           753 sound/hda/hdac_stream.c 	azx_dev->period_bytes = 0;
azx_dev           754 sound/hda/hdac_stream.c 	azx_dev->format_val = 0;
azx_dev           760 sound/hda/hdac_stream.c 	azx_dev->locked = false;
azx_dev           762 sound/hda/hdac_stream.c 	snd_hdac_dsp_unlock(azx_dev);
azx_dev            56 sound/hda/trace.h 	TP_PROTO(struct hdac_bus *bus, struct hdac_stream *azx_dev),
azx_dev            58 sound/hda/trace.h 	TP_ARGS(bus, azx_dev),
azx_dev            65 sound/hda/trace.h 		__entry->stream_tag = (azx_dev)->stream_tag;
azx_dev            72 sound/hda/trace.h 	TP_PROTO(struct hdac_bus *bus, struct hdac_stream *azx_dev),
azx_dev            73 sound/hda/trace.h 	TP_ARGS(bus, azx_dev)
azx_dev            77 sound/hda/trace.h 	TP_PROTO(struct hdac_bus *bus, struct hdac_stream *azx_dev),
azx_dev            78 sound/hda/trace.h 	TP_ARGS(bus, azx_dev)
azx_dev            38 sound/pci/hda/hda_controller.c static inline struct azx_dev *
azx_dev            50 sound/pci/hda/hda_controller.c static inline void azx_release_device(struct azx_dev *azx_dev)
azx_dev            52 sound/pci/hda/hda_controller.c 	snd_hdac_stream_release(azx_stream(azx_dev));
azx_dev            91 sound/pci/hda/hda_controller.c 	struct azx_dev *azx_dev = get_azx_dev(substream);
azx_dev            93 sound/pci/hda/hda_controller.c 	trace_azx_pcm_close(chip, azx_dev);
azx_dev            95 sound/pci/hda/hda_controller.c 	azx_release_device(azx_dev);
azx_dev           109 sound/pci/hda/hda_controller.c 	struct azx_dev *azx_dev = get_azx_dev(substream);
azx_dev           112 sound/pci/hda/hda_controller.c 	trace_azx_pcm_hw_params(chip, azx_dev);
azx_dev           113 sound/pci/hda/hda_controller.c 	dsp_lock(azx_dev);
azx_dev           114 sound/pci/hda/hda_controller.c 	if (dsp_is_locked(azx_dev)) {
azx_dev           119 sound/pci/hda/hda_controller.c 	azx_dev->core.bufsize = 0;
azx_dev           120 sound/pci/hda/hda_controller.c 	azx_dev->core.period_bytes = 0;
azx_dev           121 sound/pci/hda/hda_controller.c 	azx_dev->core.format_val = 0;
azx_dev           126 sound/pci/hda/hda_controller.c 	dsp_unlock(azx_dev);
azx_dev           133 sound/pci/hda/hda_controller.c 	struct azx_dev *azx_dev = get_azx_dev(substream);
azx_dev           138 sound/pci/hda/hda_controller.c 	dsp_lock(azx_dev);
azx_dev           139 sound/pci/hda/hda_controller.c 	if (!dsp_is_locked(azx_dev))
azx_dev           140 sound/pci/hda/hda_controller.c 		snd_hdac_stream_cleanup(azx_stream(azx_dev));
azx_dev           145 sound/pci/hda/hda_controller.c 	azx_stream(azx_dev)->prepared = 0;
azx_dev           146 sound/pci/hda/hda_controller.c 	dsp_unlock(azx_dev);
azx_dev           154 sound/pci/hda/hda_controller.c 	struct azx_dev *azx_dev = get_azx_dev(substream);
azx_dev           163 sound/pci/hda/hda_controller.c 	trace_azx_pcm_prepare(chip, azx_dev);
azx_dev           164 sound/pci/hda/hda_controller.c 	dsp_lock(azx_dev);
azx_dev           165 sound/pci/hda/hda_controller.c 	if (dsp_is_locked(azx_dev)) {
azx_dev           170 sound/pci/hda/hda_controller.c 	snd_hdac_stream_reset(azx_stream(azx_dev));
azx_dev           184 sound/pci/hda/hda_controller.c 	err = snd_hdac_stream_set_params(azx_stream(azx_dev), format_val);
azx_dev           188 sound/pci/hda/hda_controller.c 	snd_hdac_stream_setup(azx_stream(azx_dev));
azx_dev           190 sound/pci/hda/hda_controller.c 	stream_tag = azx_dev->core.stream_tag;
azx_dev           196 sound/pci/hda/hda_controller.c 				     azx_dev->core.format_val, substream);
azx_dev           200 sound/pci/hda/hda_controller.c 		azx_stream(azx_dev)->prepared = 1;
azx_dev           201 sound/pci/hda/hda_controller.c 	dsp_unlock(azx_dev);
azx_dev           210 sound/pci/hda/hda_controller.c 	struct azx_dev *azx_dev;
azx_dev           217 sound/pci/hda/hda_controller.c 	azx_dev = get_azx_dev(substream);
azx_dev           218 sound/pci/hda/hda_controller.c 	trace_azx_pcm_trigger(chip, azx_dev, cmd);
azx_dev           220 sound/pci/hda/hda_controller.c 	hstr = azx_stream(azx_dev);
azx_dev           226 sound/pci/hda/hda_controller.c 	if (dsp_is_locked(azx_dev) || !hstr->prepared)
azx_dev           247 sound/pci/hda/hda_controller.c 		azx_dev = get_azx_dev(s);
azx_dev           248 sound/pci/hda/hda_controller.c 		sbits |= 1 << azx_dev->core.index;
azx_dev           260 sound/pci/hda/hda_controller.c 		azx_dev = get_azx_dev(s);
azx_dev           262 sound/pci/hda/hda_controller.c 			azx_dev->insufficient = 1;
azx_dev           263 sound/pci/hda/hda_controller.c 			snd_hdac_stream_start(azx_stream(azx_dev), true);
azx_dev           265 sound/pci/hda/hda_controller.c 			snd_hdac_stream_stop(azx_stream(azx_dev));
azx_dev           281 sound/pci/hda/hda_controller.c unsigned int azx_get_pos_lpib(struct azx *chip, struct azx_dev *azx_dev)
azx_dev           283 sound/pci/hda/hda_controller.c 	return snd_hdac_stream_get_pos_lpib(azx_stream(azx_dev));
azx_dev           287 sound/pci/hda/hda_controller.c unsigned int azx_get_pos_posbuf(struct azx *chip, struct azx_dev *azx_dev)
azx_dev           289 sound/pci/hda/hda_controller.c 	return snd_hdac_stream_get_pos_posbuf(azx_stream(azx_dev));
azx_dev           294 sound/pci/hda/hda_controller.c 			      struct azx_dev *azx_dev)
azx_dev           296 sound/pci/hda/hda_controller.c 	struct snd_pcm_substream *substream = azx_dev->core.substream;
azx_dev           302 sound/pci/hda/hda_controller.c 		pos = chip->get_position[stream](chip, azx_dev);
azx_dev           304 sound/pci/hda/hda_controller.c 		pos = azx_get_pos_posbuf(chip, azx_dev);
azx_dev           306 sound/pci/hda/hda_controller.c 	if (pos >= azx_dev->core.bufsize)
azx_dev           314 sound/pci/hda/hda_controller.c 			delay += chip->get_delay[stream](chip, azx_dev, pos);
azx_dev           321 sound/pci/hda/hda_controller.c 	trace_azx_get_position(chip, azx_dev, pos, delay);
azx_dev           330 sound/pci/hda/hda_controller.c 	struct azx_dev *azx_dev = get_azx_dev(substream);
azx_dev           332 sound/pci/hda/hda_controller.c 			       azx_get_position(chip, azx_dev));
azx_dev           371 sound/pci/hda/hda_controller.c 	struct azx_dev *azx_dev = get_azx_dev(substream);
azx_dev           394 sound/pci/hda/hda_controller.c 					(azx_dev->core.stream_tag - 1);
azx_dev           498 sound/pci/hda/hda_controller.c 	struct azx_dev *azx_dev = get_azx_dev(substream);
azx_dev           509 sound/pci/hda/hda_controller.c 		nsec = timecounter_read(&azx_dev->core.tc);
azx_dev           586 sound/pci/hda/hda_controller.c 	struct azx_dev *azx_dev;
azx_dev           593 sound/pci/hda/hda_controller.c 	azx_dev = azx_assign_device(chip, substream);
azx_dev           594 sound/pci/hda/hda_controller.c 	trace_azx_pcm_open(chip, azx_dev);
azx_dev           595 sound/pci/hda/hda_controller.c 	if (azx_dev == NULL) {
azx_dev           599 sound/pci/hda/hda_controller.c 	runtime->private_data = azx_dev;
azx_dev           648 sound/pci/hda/hda_controller.c 		azx_release_device(azx_dev);
azx_dev           657 sound/pci/hda/hda_controller.c 		azx_release_device(azx_dev);
azx_dev          1009 sound/pci/hda/hda_controller.c static struct azx_dev *
azx_dev          1028 sound/pci/hda/hda_controller.c 	struct azx_dev *azx_dev;
azx_dev          1033 sound/pci/hda/hda_controller.c 	azx_dev = azx_get_dsp_loader_dev(chip);
azx_dev          1034 sound/pci/hda/hda_controller.c 	hstr = azx_stream(azx_dev);
azx_dev          1037 sound/pci/hda/hda_controller.c 		chip->saved_azx_dev = *azx_dev;
azx_dev          1046 sound/pci/hda/hda_controller.c 			*azx_dev = chip->saved_azx_dev;
azx_dev          1060 sound/pci/hda/hda_controller.c 	struct azx_dev *azx_dev = azx_get_dsp_loader_dev(chip);
azx_dev          1062 sound/pci/hda/hda_controller.c 	snd_hdac_dsp_trigger(azx_stream(azx_dev), start);
azx_dev          1071 sound/pci/hda/hda_controller.c 	struct azx_dev *azx_dev = azx_get_dsp_loader_dev(chip);
azx_dev          1072 sound/pci/hda/hda_controller.c 	struct hdac_stream *hstr = azx_stream(azx_dev);
azx_dev          1080 sound/pci/hda/hda_controller.c 		*azx_dev = chip->saved_azx_dev;
azx_dev          1122 sound/pci/hda/hda_controller.c 	struct azx_dev *azx_dev = stream_to_azx_dev(s);
azx_dev          1126 sound/pci/hda/hda_controller.c 	    chip->ops->position_check(chip, azx_dev)) {
azx_dev          1128 sound/pci/hda/hda_controller.c 		snd_pcm_period_elapsed(azx_stream(azx_dev)->substream);
azx_dev          1351 sound/pci/hda/hda_controller.c 		struct azx_dev *azx_dev = kzalloc(sizeof(*azx_dev), GFP_KERNEL);
azx_dev          1354 sound/pci/hda/hda_controller.c 		if (!azx_dev)
azx_dev          1368 sound/pci/hda/hda_controller.c 		snd_hdac_stream_init(azx_bus(chip), azx_stream(azx_dev),
azx_dev            69 sound/pci/hda/hda_controller.h #define stream_to_azx_dev(s)	container_of(s, struct azx_dev, core)
azx_dev            80 sound/pci/hda/hda_controller.h 	int (*position_check)(struct azx *chip, struct azx_dev *azx_dev);
azx_dev            93 sound/pci/hda/hda_controller.h typedef unsigned int (*azx_get_pos_callback_t)(struct azx *, struct azx_dev *);
azx_dev            94 sound/pci/hda/hda_controller.h typedef int (*azx_get_delay_callback_t)(struct azx *, struct azx_dev *, unsigned int pos);
azx_dev           151 sound/pci/hda/hda_controller.h 	struct azx_dev saved_azx_dev;
azx_dev           184 sound/pci/hda/hda_controller.h static inline struct azx_dev *get_azx_dev(struct snd_pcm_substream *substream)
azx_dev           188 sound/pci/hda/hda_controller.h unsigned int azx_get_position(struct azx *chip, struct azx_dev *azx_dev);
azx_dev           189 sound/pci/hda/hda_controller.h unsigned int azx_get_pos_lpib(struct azx *chip, struct azx_dev *azx_dev);
azx_dev           190 sound/pci/hda/hda_controller.h unsigned int azx_get_pos_posbuf(struct azx *chip, struct azx_dev *azx_dev);
azx_dev            12 sound/pci/hda/hda_controller_trace.h struct azx_dev;
azx_dev            16 sound/pci/hda/hda_controller_trace.h 	TP_PROTO(struct azx *chip, struct azx_dev *dev, int cmd),
azx_dev            37 sound/pci/hda/hda_controller_trace.h     TP_PROTO(struct azx *chip, struct azx_dev *dev, unsigned int pos, unsigned int delay),
azx_dev            59 sound/pci/hda/hda_controller_trace.h 	TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
azx_dev            61 sound/pci/hda/hda_controller_trace.h 	TP_ARGS(chip, azx_dev),
azx_dev            68 sound/pci/hda/hda_controller_trace.h 		__entry->stream_tag = (azx_dev)->core.stream_tag;
azx_dev            75 sound/pci/hda/hda_controller_trace.h 	TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
azx_dev            76 sound/pci/hda/hda_controller_trace.h 	TP_ARGS(chip, azx_dev)
azx_dev            80 sound/pci/hda/hda_controller_trace.h 	TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
azx_dev            81 sound/pci/hda/hda_controller_trace.h 	TP_ARGS(chip, azx_dev)
azx_dev            85 sound/pci/hda/hda_controller_trace.h 	TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
azx_dev            86 sound/pci/hda/hda_controller_trace.h 	TP_ARGS(chip, azx_dev)
azx_dev            90 sound/pci/hda/hda_controller_trace.h 	TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
azx_dev            91 sound/pci/hda/hda_controller_trace.h 	TP_ARGS(chip, azx_dev)
azx_dev           612 sound/pci/hda/hda_intel.c static int azx_get_delay_from_lpib(struct azx *chip, struct azx_dev *azx_dev,
azx_dev           615 sound/pci/hda/hda_intel.c 	struct snd_pcm_substream *substream = azx_dev->core.substream;
azx_dev           617 sound/pci/hda/hda_intel.c 	unsigned int lpib_pos = azx_get_pos_lpib(chip, azx_dev);
azx_dev           625 sound/pci/hda/hda_intel.c 		if (delay >= azx_dev->core.delay_negative_threshold)
azx_dev           628 sound/pci/hda/hda_intel.c 			delay += azx_dev->core.bufsize;
azx_dev           631 sound/pci/hda/hda_intel.c 	if (delay >= azx_dev->core.period_bytes) {
azx_dev           634 sound/pci/hda/hda_intel.c 			 delay, azx_dev->core.period_bytes);
azx_dev           643 sound/pci/hda/hda_intel.c static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev);
azx_dev           646 sound/pci/hda/hda_intel.c static int azx_position_check(struct azx *chip, struct azx_dev *azx_dev)
azx_dev           651 sound/pci/hda/hda_intel.c 	ok = azx_position_ok(chip, azx_dev);
azx_dev           653 sound/pci/hda/hda_intel.c 		azx_dev->irq_pending = 0;
azx_dev           657 sound/pci/hda/hda_intel.c 		azx_dev->irq_pending = 1;
azx_dev           675 sound/pci/hda/hda_intel.c static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev)
azx_dev           677 sound/pci/hda/hda_intel.c 	struct snd_pcm_substream *substream = azx_dev->core.substream;
azx_dev           682 sound/pci/hda/hda_intel.c 	wallclk = azx_readl(chip, WALLCLK) - azx_dev->core.start_wallclk;
azx_dev           683 sound/pci/hda/hda_intel.c 	if (wallclk < (azx_dev->core.period_wallclk * 2) / 3)
azx_dev           687 sound/pci/hda/hda_intel.c 		pos = chip->get_position[stream](chip, azx_dev);
azx_dev           689 sound/pci/hda/hda_intel.c 		pos = azx_get_pos_posbuf(chip, azx_dev);
azx_dev           697 sound/pci/hda/hda_intel.c 			pos = azx_get_pos_lpib(chip, azx_dev);
azx_dev           706 sound/pci/hda/hda_intel.c 	if (pos >= azx_dev->core.bufsize)
azx_dev           709 sound/pci/hda/hda_intel.c 	if (WARN_ONCE(!azx_dev->core.period_bytes,
azx_dev           712 sound/pci/hda/hda_intel.c 	if (wallclk < (azx_dev->core.period_wallclk * 5) / 4 &&
azx_dev           713 sound/pci/hda/hda_intel.c 	    pos % azx_dev->core.period_bytes > azx_dev->core.period_bytes / 2)
azx_dev           716 sound/pci/hda/hda_intel.c 	azx_dev->core.start_wallclk += wallclk;
azx_dev           742 sound/pci/hda/hda_intel.c 			struct azx_dev *azx_dev = stream_to_azx_dev(s);
azx_dev           743 sound/pci/hda/hda_intel.c 			if (!azx_dev->irq_pending ||
azx_dev           747 sound/pci/hda/hda_intel.c 			ok = azx_position_ok(chip, azx_dev);
azx_dev           749 sound/pci/hda/hda_intel.c 				azx_dev->irq_pending = 0;
azx_dev           773 sound/pci/hda/hda_intel.c 		struct azx_dev *azx_dev = stream_to_azx_dev(s);
azx_dev           774 sound/pci/hda/hda_intel.c 		azx_dev->irq_pending = 0;
azx_dev           800 sound/pci/hda/hda_intel.c 					 struct azx_dev *azx_dev)
azx_dev           806 sound/pci/hda/hda_intel.c 	link_pos = snd_hdac_stream_get_pos_lpib(azx_stream(azx_dev));
azx_dev           807 sound/pci/hda/hda_intel.c 	if (azx_dev->core.substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
azx_dev           816 sound/pci/hda/hda_intel.c 	mod_dma_pos = le32_to_cpu(*azx_dev->core.posbuf);
azx_dev           817 sound/pci/hda/hda_intel.c 	mod_dma_pos %= azx_dev->core.period_bytes;
azx_dev           819 sound/pci/hda/hda_intel.c 	fifo_size = azx_stream(azx_dev)->fifo_size - 1;
azx_dev           821 sound/pci/hda/hda_intel.c 	if (azx_dev->insufficient) {
azx_dev           826 sound/pci/hda/hda_intel.c 		azx_dev->insufficient = 0;
azx_dev           830 sound/pci/hda/hda_intel.c 		mini_pos = azx_dev->core.bufsize + link_pos - fifo_size;
azx_dev           835 sound/pci/hda/hda_intel.c 	mod_mini_pos = mini_pos % azx_dev->core.period_bytes;
azx_dev           836 sound/pci/hda/hda_intel.c 	mod_link_pos = link_pos % azx_dev->core.period_bytes;
azx_dev           842 sound/pci/hda/hda_intel.c 		bound_pos = mini_pos - mod_mini_pos + azx_dev->core.period_bytes;
azx_dev           843 sound/pci/hda/hda_intel.c 		if (bound_pos >= azx_dev->core.bufsize)
azx_dev           854 sound/pci/hda/hda_intel.c static unsigned int azx_get_pos_fifo(struct azx *chip, struct azx_dev *azx_dev)
azx_dev           856 sound/pci/hda/hda_intel.c 	struct snd_pcm_substream *substream = azx_dev->core.substream;
azx_dev           860 sound/pci/hda/hda_intel.c 	pos = snd_hdac_stream_get_pos_lpib(azx_stream(azx_dev));
azx_dev           866 sound/pci/hda/hda_intel.c 	if (azx_dev->insufficient) {
azx_dev           871 sound/pci/hda/hda_intel.c 			azx_dev->insufficient = 0;
azx_dev           878 sound/pci/hda/hda_intel.c 			pos += azx_dev->core.bufsize;
azx_dev           885 sound/pci/hda/hda_intel.c static int azx_get_delay_from_fifo(struct azx *chip, struct azx_dev *azx_dev,
azx_dev           888 sound/pci/hda/hda_intel.c 	struct snd_pcm_substream *substream = azx_dev->core.substream;
azx_dev           895 sound/pci/hda/hda_intel.c 					 struct azx_dev *azx_dev)
azx_dev           900 sound/pci/hda/hda_intel.c 				     azx_dev->core.index));
azx_dev           904 sound/pci/hda/hda_intel.c static unsigned int azx_get_pos_skl(struct azx *chip, struct azx_dev *azx_dev)
azx_dev           907 sound/pci/hda/hda_intel.c 	if (azx_dev->core.substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
azx_dev           908 sound/pci/hda/hda_intel.c 		return azx_skl_get_dpib_pos(chip, azx_dev);
azx_dev           915 sound/pci/hda/hda_intel.c 	azx_skl_get_dpib_pos(chip, azx_dev);
azx_dev           916 sound/pci/hda/hda_intel.c 	return azx_get_pos_posbuf(chip, azx_dev);