include/sound/hdaudio.h
572
void snd_hdac_stream_init(struct hdac_bus *bus, struct hdac_stream *azx_dev,
include/sound/hdaudio.h
576
void snd_hdac_stream_release_locked(struct hdac_stream *azx_dev);
include/sound/hdaudio.h
577
void snd_hdac_stream_release(struct hdac_stream *azx_dev);
include/sound/hdaudio.h
581
int snd_hdac_stream_setup(struct hdac_stream *azx_dev, bool code_loading);
include/sound/hdaudio.h
582
void snd_hdac_stream_cleanup(struct hdac_stream *azx_dev);
include/sound/hdaudio.h
583
int snd_hdac_stream_setup_periods(struct hdac_stream *azx_dev);
include/sound/hdaudio.h
584
int snd_hdac_stream_set_params(struct hdac_stream *azx_dev,
include/sound/hdaudio.h
586
void snd_hdac_stream_start(struct hdac_stream *azx_dev);
include/sound/hdaudio.h
587
void snd_hdac_stream_stop(struct hdac_stream *azx_dev);
include/sound/hdaudio.h
590
void snd_hdac_stream_reset(struct hdac_stream *azx_dev);
include/sound/hdaudio.h
591
void snd_hdac_stream_sync_trigger(struct hdac_stream *azx_dev, bool set,
include/sound/hdaudio.h
593
void snd_hdac_stream_sync(struct hdac_stream *azx_dev, bool start,
include/sound/hdaudio.h
595
void snd_hdac_stream_timecounter_init(struct hdac_stream *azx_dev,
include/sound/hdaudio.h
603
struct hdac_stream *azx_dev, u32 value);
include/sound/hdaudio.h
606
int snd_hdac_stream_wait_drsm(struct hdac_stream *azx_dev);
include/sound/hdaudio.h
608
struct hdac_stream *azx_dev, u32 value);
include/sound/hdaudio.h
609
int snd_hdac_stream_set_lpib(struct hdac_stream *azx_dev, u32 value);
include/sound/hdaudio.h
659
int snd_hdac_dsp_prepare(struct hdac_stream *azx_dev, unsigned int format,
include/sound/hdaudio.h
661
void snd_hdac_dsp_trigger(struct hdac_stream *azx_dev, bool start);
include/sound/hdaudio.h
662
void snd_hdac_dsp_cleanup(struct hdac_stream *azx_dev,
include/sound/hdaudio.h
671
snd_hdac_dsp_prepare(struct hdac_stream *azx_dev, unsigned int format,
include/sound/hdaudio.h
677
static inline void snd_hdac_dsp_trigger(struct hdac_stream *azx_dev, bool start)
include/sound/hdaudio.h
681
static inline void snd_hdac_dsp_cleanup(struct hdac_stream *azx_dev,
include/sound/hdaudio_ext.h
87
struct hdac_ext_stream *azx_dev, bool decouple);
sound/hda/common/controller.c
100
azx_release_device(azx_dev);
sound/hda/common/controller.c
1000
struct azx_dev *azx_dev = azx_get_dsp_loader_dev(chip);
sound/hda/common/controller.c
1001
struct hdac_stream *hstr = azx_stream(azx_dev);
sound/hda/common/controller.c
1009
*azx_dev = chip->saved_azx_dev;
sound/hda/common/controller.c
1048
struct azx_dev *azx_dev = stream_to_azx_dev(s);
sound/hda/common/controller.c
1052
chip->ops->position_check(chip, azx_dev)) {
sound/hda/common/controller.c
1054
snd_pcm_period_elapsed(azx_stream(azx_dev)->substream);
sound/hda/common/controller.c
114
struct azx_dev *azx_dev = get_azx_dev(substream);
sound/hda/common/controller.c
115
struct hdac_stream *hdas = azx_stream(azx_dev);
sound/hda/common/controller.c
117
trace_azx_pcm_hw_params(chip, azx_dev);
sound/hda/common/controller.c
118
guard_dsp_lock(azx_dev);
sound/hda/common/controller.c
119
if (dsp_is_locked(azx_dev))
sound/hda/common/controller.c
1286
struct azx_dev *azx_dev = kzalloc_obj(*azx_dev);
sound/hda/common/controller.c
1289
if (!azx_dev)
sound/hda/common/controller.c
1303
snd_hdac_stream_init(azx_bus(chip), azx_stream(azx_dev),
sound/hda/common/controller.c
138
struct azx_dev *azx_dev = get_azx_dev(substream);
sound/hda/common/controller.c
142
guard_dsp_lock(azx_dev);
sound/hda/common/controller.c
143
if (!dsp_is_locked(azx_dev))
sound/hda/common/controller.c
144
snd_hdac_stream_cleanup(azx_stream(azx_dev));
sound/hda/common/controller.c
148
azx_stream(azx_dev)->prepared = 0;
sound/hda/common/controller.c
156
struct azx_dev *azx_dev = get_azx_dev(substream);
sound/hda/common/controller.c
165
trace_azx_pcm_prepare(chip, azx_dev);
sound/hda/common/controller.c
166
guard_dsp_lock(azx_dev);
sound/hda/common/controller.c
167
if (dsp_is_locked(azx_dev))
sound/hda/common/controller.c
170
snd_hdac_stream_reset(azx_stream(azx_dev));
sound/hda/common/controller.c
181
err = snd_hdac_stream_set_params(azx_stream(azx_dev), format_val);
sound/hda/common/controller.c
185
snd_hdac_stream_setup(azx_stream(azx_dev), false);
sound/hda/common/controller.c
187
stream_tag = azx_dev->core.stream_tag;
sound/hda/common/controller.c
193
azx_dev->core.format_val, substream);
sound/hda/common/controller.c
197
azx_stream(azx_dev)->prepared = 1;
sound/hda/common/controller.c
206
struct azx_dev *azx_dev;
sound/hda/common/controller.c
213
azx_dev = get_azx_dev(substream);
sound/hda/common/controller.c
214
trace_azx_pcm_trigger(chip, azx_dev, cmd);
sound/hda/common/controller.c
216
hstr = azx_stream(azx_dev);
sound/hda/common/controller.c
222
if (dsp_is_locked(azx_dev) || !hstr->prepared)
sound/hda/common/controller.c
243
azx_dev = get_azx_dev(s);
sound/hda/common/controller.c
244
sbits |= 1 << azx_dev->core.index;
sound/hda/common/controller.c
255
azx_dev = get_azx_dev(s);
sound/hda/common/controller.c
257
azx_dev->insufficient = 1;
sound/hda/common/controller.c
258
snd_hdac_stream_start(azx_stream(azx_dev));
sound/hda/common/controller.c
260
snd_hdac_stream_stop(azx_stream(azx_dev));
sound/hda/common/controller.c
274
unsigned int azx_get_pos_lpib(struct azx *chip, struct azx_dev *azx_dev)
sound/hda/common/controller.c
276
return snd_hdac_stream_get_pos_lpib(azx_stream(azx_dev));
sound/hda/common/controller.c
280
unsigned int azx_get_pos_posbuf(struct azx *chip, struct azx_dev *azx_dev)
sound/hda/common/controller.c
282
return snd_hdac_stream_get_pos_posbuf(azx_stream(azx_dev));
sound/hda/common/controller.c
287
struct azx_dev *azx_dev)
sound/hda/common/controller.c
289
struct snd_pcm_substream *substream = azx_dev->core.substream;
sound/hda/common/controller.c
295
pos = chip->get_position[stream](chip, azx_dev);
sound/hda/common/controller.c
297
pos = azx_get_pos_posbuf(chip, azx_dev);
sound/hda/common/controller.c
299
if (pos >= azx_dev->core.bufsize)
sound/hda/common/controller.c
307
delay += chip->get_delay[stream](chip, azx_dev, pos);
sound/hda/common/controller.c
314
trace_azx_get_position(chip, azx_dev, pos, delay);
sound/hda/common/controller.c
323
struct azx_dev *azx_dev = get_azx_dev(substream);
sound/hda/common/controller.c
325
azx_get_position(chip, azx_dev));
sound/hda/common/controller.c
364
struct azx_dev *azx_dev = get_azx_dev(substream);
sound/hda/common/controller.c
387
(azx_dev->core.stream_tag - 1);
sound/hda/common/controller.c
43
static inline struct azx_dev *
sound/hda/common/controller.c
492
struct azx_dev *azx_dev = get_azx_dev(substream);
sound/hda/common/controller.c
503
nsec = timecounter_read(&azx_dev->core.tc);
sound/hda/common/controller.c
55
static inline void azx_release_device(struct azx_dev *azx_dev)
sound/hda/common/controller.c
57
snd_hdac_stream_release(azx_stream(azx_dev));
sound/hda/common/controller.c
579
struct azx_dev *azx_dev;
sound/hda/common/controller.c
586
azx_dev = azx_assign_device(chip, substream);
sound/hda/common/controller.c
587
trace_azx_pcm_open(chip, azx_dev);
sound/hda/common/controller.c
588
if (azx_dev == NULL) {
sound/hda/common/controller.c
592
runtime->private_data = azx_dev;
sound/hda/common/controller.c
634
azx_release_device(azx_dev);
sound/hda/common/controller.c
643
azx_release_device(azx_dev);
sound/hda/common/controller.c
939
static struct azx_dev *
sound/hda/common/controller.c
958
struct azx_dev *azx_dev;
sound/hda/common/controller.c
96
struct azx_dev *azx_dev = get_azx_dev(substream);
sound/hda/common/controller.c
963
azx_dev = azx_get_dsp_loader_dev(chip);
sound/hda/common/controller.c
964
hstr = azx_stream(azx_dev);
sound/hda/common/controller.c
967
chip->saved_azx_dev = *azx_dev;
sound/hda/common/controller.c
976
*azx_dev = chip->saved_azx_dev;
sound/hda/common/controller.c
98
trace_azx_pcm_close(chip, azx_dev);
sound/hda/common/controller.c
989
struct azx_dev *azx_dev = azx_get_dsp_loader_dev(chip);
sound/hda/common/controller.c
991
snd_hdac_dsp_trigger(azx_stream(azx_dev), start);
sound/hda/common/controller_trace.h
12
struct azx_dev;
sound/hda/common/controller_trace.h
16
TP_PROTO(struct azx *chip, struct azx_dev *dev, int cmd),
sound/hda/common/controller_trace.h
37
TP_PROTO(struct azx *chip, struct azx_dev *dev, unsigned int pos, unsigned int delay),
sound/hda/common/controller_trace.h
59
TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
sound/hda/common/controller_trace.h
61
TP_ARGS(chip, azx_dev),
sound/hda/common/controller_trace.h
68
__entry->stream_tag = (azx_dev)->core.stream_tag;
sound/hda/common/controller_trace.h
75
TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
sound/hda/common/controller_trace.h
76
TP_ARGS(chip, azx_dev)
sound/hda/common/controller_trace.h
80
TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
sound/hda/common/controller_trace.h
81
TP_ARGS(chip, azx_dev)
sound/hda/common/controller_trace.h
85
TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
sound/hda/common/controller_trace.h
86
TP_ARGS(chip, azx_dev)
sound/hda/common/controller_trace.h
90
TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
sound/hda/common/controller_trace.h
91
TP_ARGS(chip, azx_dev)
sound/hda/common/hda_controller.h
151
struct azx_dev saved_azx_dev;
sound/hda/common/hda_controller.h
184
static inline struct azx_dev *get_azx_dev(struct snd_pcm_substream *substream)
sound/hda/common/hda_controller.h
188
unsigned int azx_get_position(struct azx *chip, struct azx_dev *azx_dev);
sound/hda/common/hda_controller.h
189
unsigned int azx_get_pos_lpib(struct azx *chip, struct azx_dev *azx_dev);
sound/hda/common/hda_controller.h
190
unsigned int azx_get_pos_posbuf(struct azx *chip, struct azx_dev *azx_dev);
sound/hda/common/hda_controller.h
70
#define stream_to_azx_dev(s) container_of(s, struct azx_dev, core)
sound/hda/common/hda_controller.h
79
int (*position_check)(struct azx *chip, struct azx_dev *azx_dev);
sound/hda/common/hda_controller.h
92
typedef unsigned int (*azx_get_pos_callback_t)(struct azx *, struct azx_dev *);
sound/hda/common/hda_controller.h
93
typedef int (*azx_get_delay_callback_t)(struct azx *, struct azx_dev *, unsigned int pos);
sound/hda/controllers/intel.c
582
static int azx_get_delay_from_lpib(struct azx *chip, struct azx_dev *azx_dev,
sound/hda/controllers/intel.c
585
struct snd_pcm_substream *substream = azx_dev->core.substream;
sound/hda/controllers/intel.c
587
unsigned int lpib_pos = azx_get_pos_lpib(chip, azx_dev);
sound/hda/controllers/intel.c
595
if (delay >= azx_dev->core.delay_negative_threshold)
sound/hda/controllers/intel.c
598
delay += azx_dev->core.bufsize;
sound/hda/controllers/intel.c
601
if (delay >= azx_dev->core.period_bytes) {
sound/hda/controllers/intel.c
604
delay, azx_dev->core.period_bytes);
sound/hda/controllers/intel.c
613
static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev);
sound/hda/controllers/intel.c
616
static int azx_position_check(struct azx *chip, struct azx_dev *azx_dev)
sound/hda/controllers/intel.c
621
ok = azx_position_ok(chip, azx_dev);
sound/hda/controllers/intel.c
623
azx_dev->irq_pending = 0;
sound/hda/controllers/intel.c
627
azx_dev->irq_pending = 1;
sound/hda/controllers/intel.c
647
static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev)
sound/hda/controllers/intel.c
649
struct snd_pcm_substream *substream = azx_dev->core.substream;
sound/hda/controllers/intel.c
663
wallclk = azx_readl(chip, WALLCLK) - azx_dev->core.start_wallclk;
sound/hda/controllers/intel.c
664
if (wallclk < (azx_dev->core.period_wallclk * 2) / 3)
sound/hda/controllers/intel.c
668
pos = chip->get_position[stream](chip, azx_dev);
sound/hda/controllers/intel.c
670
pos = azx_get_pos_posbuf(chip, azx_dev);
sound/hda/controllers/intel.c
678
pos = azx_get_pos_lpib(chip, azx_dev);
sound/hda/controllers/intel.c
687
if (pos >= azx_dev->core.bufsize)
sound/hda/controllers/intel.c
690
if (WARN_ONCE(!azx_dev->core.period_bytes,
sound/hda/controllers/intel.c
693
if (wallclk < (azx_dev->core.period_wallclk * 5) / 4 &&
sound/hda/controllers/intel.c
694
pos % azx_dev->core.period_bytes > azx_dev->core.period_bytes / 2)
sound/hda/controllers/intel.c
697
azx_dev->core.start_wallclk += wallclk;
sound/hda/controllers/intel.c
699
if (azx_dev->core.no_period_wakeup)
sound/hda/controllers/intel.c
741
struct azx_dev *azx_dev = stream_to_azx_dev(s);
sound/hda/controllers/intel.c
742
if (!azx_dev->irq_pending ||
sound/hda/controllers/intel.c
746
ok = azx_position_ok(chip, azx_dev);
sound/hda/controllers/intel.c
748
azx_dev->irq_pending = 0;
sound/hda/controllers/intel.c
772
struct azx_dev *azx_dev = stream_to_azx_dev(s);
sound/hda/controllers/intel.c
773
azx_dev->irq_pending = 0;
sound/hda/controllers/intel.c
806
struct azx_dev *azx_dev)
sound/hda/controllers/intel.c
812
link_pos = snd_hdac_stream_get_pos_lpib(azx_stream(azx_dev));
sound/hda/controllers/intel.c
813
if (azx_dev->core.substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
sound/hda/controllers/intel.c
822
mod_dma_pos = le32_to_cpu(*azx_dev->core.posbuf);
sound/hda/controllers/intel.c
823
mod_dma_pos %= azx_dev->core.period_bytes;
sound/hda/controllers/intel.c
825
fifo_size = azx_stream(azx_dev)->fifo_size;
sound/hda/controllers/intel.c
827
if (azx_dev->insufficient) {
sound/hda/controllers/intel.c
832
azx_dev->insufficient = 0;
sound/hda/controllers/intel.c
836
mini_pos = azx_dev->core.bufsize + link_pos - fifo_size;
sound/hda/controllers/intel.c
841
mod_mini_pos = mini_pos % azx_dev->core.period_bytes;
sound/hda/controllers/intel.c
842
mod_link_pos = link_pos % azx_dev->core.period_bytes;
sound/hda/controllers/intel.c
848
bound_pos = mini_pos - mod_mini_pos + azx_dev->core.period_bytes;
sound/hda/controllers/intel.c
849
if (bound_pos >= azx_dev->core.bufsize)
sound/hda/controllers/intel.c
860
static unsigned int azx_get_pos_fifo(struct azx *chip, struct azx_dev *azx_dev)
sound/hda/controllers/intel.c
862
struct snd_pcm_substream *substream = azx_dev->core.substream;
sound/hda/controllers/intel.c
866
pos = snd_hdac_stream_get_pos_lpib(azx_stream(azx_dev));
sound/hda/controllers/intel.c
872
if (azx_dev->insufficient) {
sound/hda/controllers/intel.c
877
azx_dev->insufficient = 0;
sound/hda/controllers/intel.c
884
pos += azx_dev->core.bufsize;
sound/hda/controllers/intel.c
891
static int azx_get_delay_from_fifo(struct azx *chip, struct azx_dev *azx_dev,
sound/hda/controllers/intel.c
894
struct snd_pcm_substream *substream = azx_dev->core.substream;
sound/hda/core/controller.c
575
struct hdac_stream *azx_dev;
sound/hda/core/controller.c
578
list_for_each_entry(azx_dev, &bus->stream_list, list)
sound/hda/core/controller.c
579
snd_hdac_stream_updateb(azx_dev, SD_CTL, SD_INT_MASK, 0);
sound/hda/core/controller.c
588
struct hdac_stream *azx_dev;
sound/hda/core/controller.c
591
list_for_each_entry(azx_dev, &bus->stream_list, list)
sound/hda/core/controller.c
592
snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK);
sound/hda/core/controller.c
676
struct hdac_stream *azx_dev;
sound/hda/core/controller.c
680
list_for_each_entry(azx_dev, &bus->stream_list, list) {
sound/hda/core/controller.c
681
if (status & azx_dev->sd_int_sta_mask) {
sound/hda/core/controller.c
682
sd_status = snd_hdac_stream_readb(azx_dev, SD_STS);
sound/hda/core/controller.c
683
snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK);
sound/hda/core/controller.c
684
handled |= 1 << azx_dev->index;
sound/hda/core/controller.c
685
if ((!azx_dev->substream && !azx_dev->cstream) ||
sound/hda/core/controller.c
686
!azx_dev->running || !(sd_status & SD_INT_COMPLETE))
sound/hda/core/controller.c
689
ack(bus, azx_dev);
sound/hda/core/stream.c
1001
azx_dev->locked = false;
sound/hda/core/stream.c
101
azx_dev->sd_int_sta_mask = 1 << idx;
sound/hda/core/stream.c
102
azx_dev->index = idx;
sound/hda/core/stream.c
103
azx_dev->direction = direction;
sound/hda/core/stream.c
104
azx_dev->stream_tag = tag;
sound/hda/core/stream.c
105
snd_hdac_dsp_lock_init(azx_dev);
sound/hda/core/stream.c
106
list_add_tail(&azx_dev->list, &bus->stream_list);
sound/hda/core/stream.c
109
azx_dev->spib_addr = bus->spbcap + AZX_SPB_BASE +
sound/hda/core/stream.c
113
azx_dev->fifo_addr = bus->spbcap + AZX_SPB_BASE +
sound/hda/core/stream.c
119
azx_dev->dpibr_addr = bus->drsmcap + AZX_DRSM_BASE +
sound/hda/core/stream.c
130
void snd_hdac_stream_start(struct hdac_stream *azx_dev)
sound/hda/core/stream.c
132
struct hdac_bus *bus = azx_dev->bus;
sound/hda/core/stream.c
135
trace_snd_hdac_stream_start(bus, azx_dev);
sound/hda/core/stream.c
137
azx_dev->start_wallclk = snd_hdac_chip_readl(bus, WALLCLK);
sound/hda/core/stream.c
141
1 << azx_dev->index,
sound/hda/core/stream.c
142
1 << azx_dev->index);
sound/hda/core/stream.c
144
if (azx_dev->stripe) {
sound/hda/core/stream.c
145
if (azx_dev->substream)
sound/hda/core/stream.c
146
stripe_ctl = snd_hdac_get_stream_stripe_ctl(bus, azx_dev->substream);
sound/hda/core/stream.c
149
snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, SD_CTL_STRIPE_MASK,
sound/hda/core/stream.c
154
snd_hdac_stream_updatel(azx_dev, SD_CTL,
sound/hda/core/stream.c
157
snd_hdac_stream_updateb(azx_dev, SD_CTL,
sound/hda/core/stream.c
159
azx_dev->running = true;
sound/hda/core/stream.c
167
static void snd_hdac_stream_clear(struct hdac_stream *azx_dev)
sound/hda/core/stream.c
169
snd_hdac_stream_updateb(azx_dev, SD_CTL,
sound/hda/core/stream.c
171
snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK); /* to be sure */
sound/hda/core/stream.c
172
if (azx_dev->stripe)
sound/hda/core/stream.c
173
snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, SD_CTL_STRIPE_MASK, 0);
sound/hda/core/stream.c
174
azx_dev->running = false;
sound/hda/core/stream.c
183
void snd_hdac_stream_stop(struct hdac_stream *azx_dev)
sound/hda/core/stream.c
185
trace_snd_hdac_stream_stop(azx_dev->bus, azx_dev);
sound/hda/core/stream.c
187
snd_hdac_stream_clear(azx_dev);
sound/hda/core/stream.c
189
snd_hdac_chip_updatel(azx_dev->bus, INTCTL, 1 << azx_dev->index, 0);
sound/hda/core/stream.c
224
void snd_hdac_stream_reset(struct hdac_stream *azx_dev)
sound/hda/core/stream.c
229
snd_hdac_stream_clear(azx_dev);
sound/hda/core/stream.c
231
dma_run_state = snd_hdac_stream_readb(azx_dev, SD_CTL) & SD_CTL_DMA_START;
sound/hda/core/stream.c
233
snd_hdac_stream_updateb(azx_dev, SD_CTL, 0, SD_CTL_STREAM_RESET);
sound/hda/core/stream.c
236
snd_hdac_stream_readb_poll(azx_dev, SD_CTL, val, (val & SD_CTL_STREAM_RESET), 3, 300);
sound/hda/core/stream.c
238
if (azx_dev->bus->dma_stop_delay && dma_run_state)
sound/hda/core/stream.c
239
udelay(azx_dev->bus->dma_stop_delay);
sound/hda/core/stream.c
241
snd_hdac_stream_updateb(azx_dev, SD_CTL, SD_CTL_STREAM_RESET, 0);
sound/hda/core/stream.c
244
snd_hdac_stream_readb_poll(azx_dev, SD_CTL, val, !(val & SD_CTL_STREAM_RESET), 3, 300);
sound/hda/core/stream.c
247
if (azx_dev->posbuf)
sound/hda/core/stream.c
248
*azx_dev->posbuf = 0;
sound/hda/core/stream.c
257
int snd_hdac_stream_setup(struct hdac_stream *azx_dev, bool code_loading)
sound/hda/core/stream.c
259
struct hdac_bus *bus = azx_dev->bus;
sound/hda/core/stream.c
265
if (azx_dev->substream)
sound/hda/core/stream.c
266
runtime = azx_dev->substream->runtime;
sound/hda/core/stream.c
270
snd_hdac_stream_clear(azx_dev);
sound/hda/core/stream.c
272
val = snd_hdac_stream_readl(azx_dev, SD_CTL);
sound/hda/core/stream.c
274
(azx_dev->stream_tag << SD_CTL_STREAM_TAG_SHIFT);
sound/hda/core/stream.c
277
snd_hdac_stream_writel(azx_dev, SD_CTL, val);
sound/hda/core/stream.c
280
snd_hdac_stream_writel(azx_dev, SD_CBL, azx_dev->bufsize);
sound/hda/core/stream.c
284
snd_hdac_stream_writew(azx_dev, SD_FORMAT, azx_dev->format_val);
sound/hda/core/stream.c
287
snd_hdac_stream_writew(azx_dev, SD_LVI, azx_dev->frags - 1);
sound/hda/core/stream.c
291
snd_hdac_stream_writel(azx_dev, SD_BDLPL, (u32)(azx_dev->bdl.addr + bus->addr_offset));
sound/hda/core/stream.c
293
snd_hdac_stream_writel(azx_dev, SD_BDLPU,
sound/hda/core/stream.c
294
upper_32_bits(azx_dev->bdl.addr + bus->addr_offset));
sound/hda/core/stream.c
304
snd_hdac_stream_updatel(azx_dev, SD_CTL, 0, SD_INT_MASK);
sound/hda/core/stream.c
308
ret = snd_hdac_stream_readw_poll(azx_dev, SD_FIFOSIZE, reg,
sound/hda/core/stream.c
313
azx_dev->fifo_size = reg;
sound/hda/core/stream.c
321
azx_dev->delay_negative_threshold =
sound/hda/core/stream.c
324
azx_dev->delay_negative_threshold = 0;
sound/hda/core/stream.c
328
azx_dev->period_wallclk = (((runtime->period_size * 24000) /
sound/hda/core/stream.c
339
void snd_hdac_stream_cleanup(struct hdac_stream *azx_dev)
sound/hda/core/stream.c
341
snd_hdac_stream_writel(azx_dev, SD_BDLPL, 0);
sound/hda/core/stream.c
342
snd_hdac_stream_writel(azx_dev, SD_BDLPU, 0);
sound/hda/core/stream.c
343
snd_hdac_stream_writel(azx_dev, SD_CTL, 0);
sound/hda/core/stream.c
344
azx_dev->bufsize = 0;
sound/hda/core/stream.c
345
azx_dev->period_bytes = 0;
sound/hda/core/stream.c
346
azx_dev->format_val = 0;
sound/hda/core/stream.c
364
struct hdac_stream *azx_dev;
sound/hda/core/stream.c
374
list_for_each_entry(azx_dev, &bus->stream_list, list) {
sound/hda/core/stream.c
375
if (azx_dev->direction != substream->stream)
sound/hda/core/stream.c
377
if (azx_dev->opened)
sound/hda/core/stream.c
379
if (azx_dev->assigned_key == key) {
sound/hda/core/stream.c
380
res = azx_dev;
sound/hda/core/stream.c
384
res = azx_dev;
sound/hda/core/stream.c
403
void snd_hdac_stream_release_locked(struct hdac_stream *azx_dev)
sound/hda/core/stream.c
405
azx_dev->opened = 0;
sound/hda/core/stream.c
406
azx_dev->running = 0;
sound/hda/core/stream.c
407
azx_dev->substream = NULL;
sound/hda/core/stream.c
417
void snd_hdac_stream_release(struct hdac_stream *azx_dev)
sound/hda/core/stream.c
419
struct hdac_bus *bus = azx_dev->bus;
sound/hda/core/stream.c
422
snd_hdac_stream_release_locked(azx_dev);
sound/hda/core/stream.c
453
struct hdac_stream *azx_dev, __le32 **bdlp,
sound/hda/core/stream.c
462
if (azx_dev->frags >= AZX_MAX_BDL_ENTRIES)
sound/hda/core/stream.c
485
azx_dev->frags++;
sound/hda/core/stream.c
501
static int snd_hdac_stream_setup_bdle(struct hdac_stream *azx_dev, struct snd_dma_buffer *dmab,
sound/hda/core/stream.c
504
struct hdac_bus *bus = azx_dev->bus;
sound/hda/core/stream.c
510
snd_hdac_stream_writel(azx_dev, SD_BDLPL, 0);
sound/hda/core/stream.c
511
snd_hdac_stream_writel(azx_dev, SD_BDLPU, 0);
sound/hda/core/stream.c
513
period_bytes = azx_dev->period_bytes;
sound/hda/core/stream.c
514
periods = azx_dev->bufsize / period_bytes;
sound/hda/core/stream.c
517
bdl = (__le32 *)azx_dev->bdl.area;
sound/hda/core/stream.c
519
azx_dev->frags = 0;
sound/hda/core/stream.c
522
if (runtime && !azx_dev->no_period_wakeup && pos_adj > 0) {
sound/hda/core/stream.c
535
ofs = setup_bdle(bus, dmab, azx_dev,
sound/hda/core/stream.c
545
ofs = setup_bdle(bus, dmab, azx_dev,
sound/hda/core/stream.c
548
ofs = setup_bdle(bus, dmab, azx_dev,
sound/hda/core/stream.c
550
!azx_dev->no_period_wakeup);
sound/hda/core/stream.c
558
azx_dev->bufsize, period_bytes);
sound/hda/core/stream.c
569
int snd_hdac_stream_setup_periods(struct hdac_stream *azx_dev)
sound/hda/core/stream.c
571
struct snd_pcm_substream *substream = azx_dev->substream;
sound/hda/core/stream.c
572
struct snd_compr_stream *cstream = azx_dev->cstream;
sound/hda/core/stream.c
586
return snd_hdac_stream_setup_bdle(azx_dev, dmab, runtime);
sound/hda/core/stream.c
598
int snd_hdac_stream_set_params(struct hdac_stream *azx_dev,
sound/hda/core/stream.c
601
struct snd_pcm_substream *substream = azx_dev->substream;
sound/hda/core/stream.c
602
struct snd_compr_stream *cstream = azx_dev->cstream;
sound/hda/core/stream.c
619
if (bufsize != azx_dev->bufsize ||
sound/hda/core/stream.c
620
period_bytes != azx_dev->period_bytes ||
sound/hda/core/stream.c
621
format_val != azx_dev->format_val ||
sound/hda/core/stream.c
622
no_period_wakeup != azx_dev->no_period_wakeup) {
sound/hda/core/stream.c
623
azx_dev->bufsize = bufsize;
sound/hda/core/stream.c
624
azx_dev->period_bytes = period_bytes;
sound/hda/core/stream.c
625
azx_dev->format_val = format_val;
sound/hda/core/stream.c
626
azx_dev->no_period_wakeup = no_period_wakeup;
sound/hda/core/stream.c
627
err = snd_hdac_stream_setup_periods(azx_dev);
sound/hda/core/stream.c
637
struct hdac_stream *azx_dev = container_of(cc, struct hdac_stream, cc);
sound/hda/core/stream.c
639
return snd_hdac_chip_readl(azx_dev->bus, WALLCLK);
sound/hda/core/stream.c
642
static void azx_timecounter_init(struct hdac_stream *azx_dev,
sound/hda/core/stream.c
645
struct timecounter *tc = &azx_dev->tc;
sound/hda/core/stream.c
646
struct cyclecounter *cc = &azx_dev->cc;
sound/hda/core/stream.c
681
void snd_hdac_stream_timecounter_init(struct hdac_stream *azx_dev,
sound/hda/core/stream.c
684
struct hdac_bus *bus = azx_dev->bus;
sound/hda/core/stream.c
685
struct snd_pcm_runtime *runtime = azx_dev->substream->runtime;
sound/hda/core/stream.c
716
void snd_hdac_stream_sync_trigger(struct hdac_stream *azx_dev, bool set,
sound/hda/core/stream.c
719
struct hdac_bus *bus = azx_dev->bus;
sound/hda/core/stream.c
742
void snd_hdac_stream_sync(struct hdac_stream *azx_dev, bool start,
sound/hda/core/stream.c
745
struct hdac_bus *bus = azx_dev->bus;
sound/hda/core/stream.c
813
struct hdac_stream *azx_dev, u32 value)
sound/hda/core/stream.c
820
writel(value, azx_dev->spib_addr);
sound/hda/core/stream.c
857
int snd_hdac_stream_wait_drsm(struct hdac_stream *azx_dev)
sound/hda/core/stream.c
859
struct hdac_bus *bus = azx_dev->bus;
sound/hda/core/stream.c
863
mask = 1 << azx_dev->index;
sound/hda/core/stream.c
880
struct hdac_stream *azx_dev, u32 value)
sound/hda/core/stream.c
887
writel(value, azx_dev->dpibr_addr);
sound/hda/core/stream.c
898
int snd_hdac_stream_set_lpib(struct hdac_stream *azx_dev, u32 value)
sound/hda/core/stream.c
900
snd_hdac_stream_writel(azx_dev, SD_LPIB, value);
sound/hda/core/stream.c
917
int snd_hdac_dsp_prepare(struct hdac_stream *azx_dev, unsigned int format,
sound/hda/core/stream.c
920
struct hdac_bus *bus = azx_dev->bus;
sound/hda/core/stream.c
923
guard(snd_hdac_dsp_lock)(azx_dev);
sound/hda/core/stream.c
925
if (azx_dev->running || azx_dev->locked)
sound/hda/core/stream.c
927
azx_dev->locked = true;
sound/hda/core/stream.c
935
azx_dev->substream = NULL;
sound/hda/core/stream.c
936
azx_dev->bufsize = byte_size;
sound/hda/core/stream.c
938
azx_dev->period_bytes = byte_size / 2;
sound/hda/core/stream.c
939
azx_dev->format_val = format;
sound/hda/core/stream.c
94
void snd_hdac_stream_init(struct hdac_bus *bus, struct hdac_stream *azx_dev,
sound/hda/core/stream.c
940
azx_dev->no_period_wakeup = 1;
sound/hda/core/stream.c
942
snd_hdac_stream_reset(azx_dev);
sound/hda/core/stream.c
944
err = snd_hdac_stream_setup_bdle(azx_dev, bufp, NULL);
sound/hda/core/stream.c
948
snd_hdac_stream_setup(azx_dev, true);
sound/hda/core/stream.c
949
return azx_dev->stream_tag;
sound/hda/core/stream.c
955
azx_dev->locked = false;
sound/hda/core/stream.c
966
void snd_hdac_dsp_trigger(struct hdac_stream *azx_dev, bool start)
sound/hda/core/stream.c
969
snd_hdac_stream_start(azx_dev);
sound/hda/core/stream.c
97
azx_dev->bus = bus;
sound/hda/core/stream.c
971
snd_hdac_stream_stop(azx_dev);
sound/hda/core/stream.c
980
void snd_hdac_dsp_cleanup(struct hdac_stream *azx_dev,
sound/hda/core/stream.c
983
struct hdac_bus *bus = azx_dev->bus;
sound/hda/core/stream.c
985
if (!dmab->area || !azx_dev->locked)
sound/hda/core/stream.c
988
guard(snd_hdac_dsp_lock)(azx_dev);
sound/hda/core/stream.c
99
azx_dev->sd_addr = bus->remap_addr + (0x20 * idx + 0x80);
sound/hda/core/stream.c
990
snd_hdac_stream_writel(azx_dev, SD_BDLPL, 0);
sound/hda/core/stream.c
991
snd_hdac_stream_writel(azx_dev, SD_BDLPU, 0);
sound/hda/core/stream.c
992
snd_hdac_stream_writel(azx_dev, SD_CTL, 0);
sound/hda/core/stream.c
993
azx_dev->bufsize = 0;
sound/hda/core/stream.c
994
azx_dev->period_bytes = 0;
sound/hda/core/stream.c
995
azx_dev->format_val = 0;
sound/hda/core/trace.h
67
TP_PROTO(struct hdac_bus *bus, struct hdac_stream *azx_dev),
sound/hda/core/trace.h
69
TP_ARGS(bus, azx_dev),
sound/hda/core/trace.h
76
__entry->stream_tag = (azx_dev)->stream_tag;
sound/hda/core/trace.h
83
TP_PROTO(struct hdac_bus *bus, struct hdac_stream *azx_dev),
sound/hda/core/trace.h
84
TP_ARGS(bus, azx_dev)
sound/hda/core/trace.h
88
TP_PROTO(struct hdac_bus *bus, struct hdac_stream *azx_dev),
sound/hda/core/trace.h
89
TP_ARGS(bus, azx_dev)