Lines Matching refs:d
578 struct amdtp_domain *d = s->domain; in pool_seq_descs() local
582 if (!d->replay.enable || !s->ctx_data.rx.replay_target) { in pool_seq_descs()
585 if (!d->replay.on_the_fly) { in pool_seq_descs()
1175 const struct amdtp_domain *d = s->domain; in process_rx_packets() local
1177 const unsigned int events_per_period = d->events_per_period; in process_rx_packets()
1201 if (s == d->irq_target) { in process_rx_packets()
1246 struct amdtp_domain *d = s->domain; in skip_rx_packets() local
1265 bool sched_irq = (s == d->irq_target && i == packets - 1); in skip_rx_packets()
1281 struct amdtp_domain *d = s->domain; in process_rx_packets_intermediately() local
1296 if (compare_ohci_cycle_count(cycle, d->processing_cycle.rx_start) >= 0) in process_rx_packets_intermediately()
1317 if (d->replay.enable) in process_rx_packets_intermediately()
1324 if (s == d->irq_target) in process_rx_packets_intermediately()
1356 struct amdtp_domain *d = s->domain; in process_tx_packets() local
1360 if (d->replay.enable) in process_tx_packets()
1410 struct amdtp_domain *d = s->domain; in process_tx_packets_intermediately() local
1425 if (compare_ohci_cycle_count(cycle, d->processing_cycle.tx_start) >= 0) in process_tx_packets_intermediately()
1461 struct amdtp_domain *d = s->domain; in drop_tx_packets_initially() local
1521 list_for_each_entry(s, &d->streams, list) { in drop_tx_packets_initially()
1532 list_for_each_entry(s, &d->streams, list) { in drop_tx_packets_initially()
1537 d->processing_cycle.tx_init_skip); in drop_tx_packets_initially()
1545 d->processing_cycle.tx_start = cycle; in drop_tx_packets_initially()
1550 static void process_ctxs_in_domain(struct amdtp_domain *d) in process_ctxs_in_domain() argument
1554 list_for_each_entry(s, &d->streams, list) { in process_ctxs_in_domain()
1555 if (s != d->irq_target && amdtp_stream_running(s)) in process_ctxs_in_domain()
1564 if (amdtp_stream_running(d->irq_target)) in process_ctxs_in_domain()
1565 cancel_stream(d->irq_target); in process_ctxs_in_domain()
1567 list_for_each_entry(s, &d->streams, list) { in process_ctxs_in_domain()
1577 struct amdtp_domain *d = s->domain; in irq_target_callback() local
1580 process_ctxs_in_domain(d); in irq_target_callback()
1587 struct amdtp_domain *d = s->domain; in irq_target_callback_intermediately() local
1590 process_ctxs_in_domain(d); in irq_target_callback_intermediately()
1597 struct amdtp_domain *d = s->domain; in irq_target_callback_skip() local
1601 process_ctxs_in_domain(d); in irq_target_callback_skip()
1603 if (d->replay.enable && !d->replay.on_the_fly) { in irq_target_callback_skip()
1608 list_for_each_entry(rx, &d->streams, list) { in irq_target_callback_skip()
1631 list_for_each_entry(s, &d->streams, list) { in irq_target_callback_skip()
1638 if (s == d->irq_target) in irq_target_callback_skip()
1644 d->processing_cycle.rx_start = cycle; in irq_target_callback_skip()
1655 struct amdtp_domain *d = s->domain; in amdtp_stream_first_callback() local
1660 if (s == d->irq_target) in amdtp_stream_first_callback()
1879 unsigned long amdtp_domain_stream_pcm_pointer(struct amdtp_domain *d, in amdtp_domain_stream_pcm_pointer() argument
1882 struct amdtp_stream *irq_target = d->irq_target; in amdtp_domain_stream_pcm_pointer()
1903 int amdtp_domain_stream_pcm_ack(struct amdtp_domain *d, struct amdtp_stream *s) in amdtp_domain_stream_pcm_ack() argument
1905 struct amdtp_stream *irq_target = d->irq_target; in amdtp_domain_stream_pcm_ack()
1983 int amdtp_domain_init(struct amdtp_domain *d) in amdtp_domain_init() argument
1985 INIT_LIST_HEAD(&d->streams); in amdtp_domain_init()
1987 d->events_per_period = 0; in amdtp_domain_init()
1997 void amdtp_domain_destroy(struct amdtp_domain *d) in amdtp_domain_destroy() argument
2011 int amdtp_domain_add_stream(struct amdtp_domain *d, struct amdtp_stream *s, in amdtp_domain_add_stream() argument
2016 list_for_each_entry(tmp, &d->streams, list) { in amdtp_domain_add_stream()
2021 list_add(&s->list, &d->streams); in amdtp_domain_add_stream()
2025 s->domain = d; in amdtp_domain_add_stream()
2033 static int make_association(struct amdtp_domain *d) in make_association() argument
2039 list_for_each_entry(rx, &d->streams, list) { in make_association()
2045 list_for_each_entry(s, &d->streams, list) { in make_association()
2057 list_for_each_entry(s, &d->streams, list) { in make_association()
2087 int amdtp_domain_start(struct amdtp_domain *d, unsigned int tx_init_skip_cycles, bool replay_seq, in amdtp_domain_start() argument
2090 unsigned int events_per_buffer = d->events_per_buffer; in amdtp_domain_start()
2091 unsigned int events_per_period = d->events_per_period; in amdtp_domain_start()
2098 err = make_association(d); in amdtp_domain_start()
2102 d->replay.enable = replay_seq; in amdtp_domain_start()
2103 d->replay.on_the_fly = replay_on_the_fly; in amdtp_domain_start()
2106 list_for_each_entry(s, &d->streams, list) { in amdtp_domain_start()
2114 d->irq_target = s; in amdtp_domain_start()
2116 d->processing_cycle.tx_init_skip = tx_init_skip_cycles; in amdtp_domain_start()
2122 events_per_period = amdtp_rate_table[d->irq_target->sfc] / 100; in amdtp_domain_start()
2127 amdtp_rate_table[d->irq_target->sfc]); in amdtp_domain_start()
2129 list_for_each_entry(s, &d->streams, list) { in amdtp_domain_start()
2132 if (s->direction == AMDTP_OUT_STREAM && s == d->irq_target) { in amdtp_domain_start()
2134 amdtp_rate_table[d->irq_target->sfc]); in amdtp_domain_start()
2145 list_for_each_entry(s, &d->streams, list) in amdtp_domain_start()
2155 void amdtp_domain_stop(struct amdtp_domain *d) in amdtp_domain_stop() argument
2159 if (d->irq_target) in amdtp_domain_stop()
2160 amdtp_stream_stop(d->irq_target); in amdtp_domain_stop()
2162 list_for_each_entry_safe(s, next, &d->streams, list) { in amdtp_domain_stop()
2165 if (s != d->irq_target) in amdtp_domain_stop()
2169 d->events_per_period = 0; in amdtp_domain_stop()
2170 d->irq_target = NULL; in amdtp_domain_stop()