dpcm              106 include/sound/soc-dpcm.h #define for_each_dpcm_fe(be, stream, dpcm)				\
dpcm              107 include/sound/soc-dpcm.h 	list_for_each_entry(dpcm, &(be)->dpcm[stream].fe_clients, list_fe)
dpcm              109 include/sound/soc-dpcm.h #define for_each_dpcm_be(fe, stream, dpcm)				\
dpcm              110 include/sound/soc-dpcm.h 	list_for_each_entry(dpcm, &(fe)->dpcm[stream].be_clients, list_be)
dpcm              111 include/sound/soc-dpcm.h #define for_each_dpcm_be_safe(fe, stream, dpcm, _dpcm)			\
dpcm              112 include/sound/soc-dpcm.h 	list_for_each_entry_safe(dpcm, _dpcm, &(fe)->dpcm[stream].be_clients, list_be)
dpcm              113 include/sound/soc-dpcm.h #define for_each_dpcm_be_rollback(fe, stream, dpcm)			\
dpcm              114 include/sound/soc-dpcm.h 	list_for_each_entry_continue_reverse(dpcm, &(fe)->dpcm[stream].be_clients, list_be)
dpcm             1129 include/sound/soc.h 	struct snd_soc_dpcm_runtime dpcm[2];
dpcm              114 sound/drivers/aloop.c static inline unsigned int byte_pos(struct loopback_pcm *dpcm, unsigned int x)
dpcm              116 sound/drivers/aloop.c 	if (dpcm->pcm_rate_shift == NO_PITCH) {
dpcm              120 sound/drivers/aloop.c 			    HZ * (unsigned long long)dpcm->pcm_rate_shift);
dpcm              122 sound/drivers/aloop.c 	return x - (x % dpcm->pcm_salign);
dpcm              125 sound/drivers/aloop.c static inline unsigned int frac_pos(struct loopback_pcm *dpcm, unsigned int x)
dpcm              127 sound/drivers/aloop.c 	if (dpcm->pcm_rate_shift == NO_PITCH) {	/* no pitch */
dpcm              130 sound/drivers/aloop.c 		x = div_u64(dpcm->pcm_rate_shift * (unsigned long long)x * HZ,
dpcm              136 sound/drivers/aloop.c static inline struct loopback_setup *get_setup(struct loopback_pcm *dpcm)
dpcm              138 sound/drivers/aloop.c 	int device = dpcm->substream->pstr->pcm->device;
dpcm              140 sound/drivers/aloop.c 	if (dpcm->substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
dpcm              142 sound/drivers/aloop.c 	return &dpcm->loopback->setup[dpcm->substream->number][device];
dpcm              145 sound/drivers/aloop.c static inline unsigned int get_notify(struct loopback_pcm *dpcm)
dpcm              147 sound/drivers/aloop.c 	return get_setup(dpcm)->notify;
dpcm              150 sound/drivers/aloop.c static inline unsigned int get_rate_shift(struct loopback_pcm *dpcm)
dpcm              152 sound/drivers/aloop.c 	return get_setup(dpcm)->rate_shift;
dpcm              156 sound/drivers/aloop.c static void loopback_timer_start(struct loopback_pcm *dpcm)
dpcm              159 sound/drivers/aloop.c 	unsigned int rate_shift = get_rate_shift(dpcm);
dpcm              161 sound/drivers/aloop.c 	if (rate_shift != dpcm->pcm_rate_shift) {
dpcm              162 sound/drivers/aloop.c 		dpcm->pcm_rate_shift = rate_shift;
dpcm              163 sound/drivers/aloop.c 		dpcm->period_size_frac = frac_pos(dpcm, dpcm->pcm_period_size);
dpcm              165 sound/drivers/aloop.c 	if (dpcm->period_size_frac <= dpcm->irq_pos) {
dpcm              166 sound/drivers/aloop.c 		dpcm->irq_pos %= dpcm->period_size_frac;
dpcm              167 sound/drivers/aloop.c 		dpcm->period_update_pending = 1;
dpcm              169 sound/drivers/aloop.c 	tick = dpcm->period_size_frac - dpcm->irq_pos;
dpcm              170 sound/drivers/aloop.c 	tick = (tick + dpcm->pcm_bps - 1) / dpcm->pcm_bps;
dpcm              171 sound/drivers/aloop.c 	mod_timer(&dpcm->timer, jiffies + tick);
dpcm              175 sound/drivers/aloop.c static inline void loopback_timer_stop(struct loopback_pcm *dpcm)
dpcm              177 sound/drivers/aloop.c 	del_timer(&dpcm->timer);
dpcm              178 sound/drivers/aloop.c 	dpcm->timer.expires = 0;
dpcm              181 sound/drivers/aloop.c static inline void loopback_timer_stop_sync(struct loopback_pcm *dpcm)
dpcm              183 sound/drivers/aloop.c 	del_timer_sync(&dpcm->timer);
dpcm              240 sound/drivers/aloop.c static void loopback_active_notify(struct loopback_pcm *dpcm)
dpcm              242 sound/drivers/aloop.c 	snd_ctl_notify(dpcm->loopback->card,
dpcm              244 sound/drivers/aloop.c 		       &get_setup(dpcm)->active_id);
dpcm              250 sound/drivers/aloop.c 	struct loopback_pcm *dpcm = runtime->private_data;
dpcm              251 sound/drivers/aloop.c 	struct loopback_cable *cable = dpcm->cable;
dpcm              259 sound/drivers/aloop.c 		dpcm->last_jiffies = jiffies;
dpcm              260 sound/drivers/aloop.c 		dpcm->pcm_rate_shift = 0;
dpcm              261 sound/drivers/aloop.c 		dpcm->last_drift = 0;
dpcm              265 sound/drivers/aloop.c 		loopback_timer_start(dpcm);
dpcm              268 sound/drivers/aloop.c 			loopback_active_notify(dpcm);
dpcm              274 sound/drivers/aloop.c 		loopback_timer_stop(dpcm);
dpcm              277 sound/drivers/aloop.c 			loopback_active_notify(dpcm);
dpcm              283 sound/drivers/aloop.c 		loopback_timer_stop(dpcm);
dpcm              286 sound/drivers/aloop.c 			loopback_active_notify(dpcm);
dpcm              291 sound/drivers/aloop.c 		dpcm->last_jiffies = jiffies;
dpcm              293 sound/drivers/aloop.c 		loopback_timer_start(dpcm);
dpcm              296 sound/drivers/aloop.c 			loopback_active_notify(dpcm);
dpcm              307 sound/drivers/aloop.c 	struct loopback_pcm *dpcm = runtime->private_data;
dpcm              308 sound/drivers/aloop.c 	struct loopback_cable *cable = dpcm->cable;
dpcm              320 sound/drivers/aloop.c 	struct loopback_pcm *dpcm = runtime->private_data;
dpcm              321 sound/drivers/aloop.c 	struct loopback_cable *cable = dpcm->cable;
dpcm              324 sound/drivers/aloop.c 	loopback_timer_stop_sync(dpcm);
dpcm              332 sound/drivers/aloop.c 	dpcm->buf_pos = 0;
dpcm              333 sound/drivers/aloop.c 	dpcm->pcm_buffer_size = frames_to_bytes(runtime, runtime->buffer_size);
dpcm              336 sound/drivers/aloop.c 		dpcm->silent_size = dpcm->pcm_buffer_size;
dpcm              341 sound/drivers/aloop.c 	dpcm->irq_pos = 0;
dpcm              342 sound/drivers/aloop.c 	dpcm->period_update_pending = 0;
dpcm              343 sound/drivers/aloop.c 	dpcm->pcm_bps = bps;
dpcm              344 sound/drivers/aloop.c 	dpcm->pcm_salign = salign;
dpcm              345 sound/drivers/aloop.c 	dpcm->pcm_period_size = frames_to_bytes(runtime, runtime->period_size);
dpcm              347 sound/drivers/aloop.c 	mutex_lock(&dpcm->loopback->cable_lock);
dpcm              349 sound/drivers/aloop.c             (get_setup(dpcm)->notify &&
dpcm              353 sound/drivers/aloop.c 	mutex_unlock(&dpcm->loopback->cable_lock);
dpcm              358 sound/drivers/aloop.c static void clear_capture_buf(struct loopback_pcm *dpcm, unsigned int bytes)
dpcm              360 sound/drivers/aloop.c 	struct snd_pcm_runtime *runtime = dpcm->substream->runtime;
dpcm              362 sound/drivers/aloop.c 	unsigned int dst_off = dpcm->buf_pos;
dpcm              364 sound/drivers/aloop.c 	if (dpcm->silent_size >= dpcm->pcm_buffer_size)
dpcm              366 sound/drivers/aloop.c 	if (dpcm->silent_size + bytes > dpcm->pcm_buffer_size)
dpcm              367 sound/drivers/aloop.c 		bytes = dpcm->pcm_buffer_size - dpcm->silent_size;
dpcm              371 sound/drivers/aloop.c 		if (dst_off + size > dpcm->pcm_buffer_size)
dpcm              372 sound/drivers/aloop.c 			size = dpcm->pcm_buffer_size - dst_off;
dpcm              376 sound/drivers/aloop.c 		dpcm->silent_size += size;
dpcm              433 sound/drivers/aloop.c static inline unsigned int bytepos_delta(struct loopback_pcm *dpcm,
dpcm              439 sound/drivers/aloop.c 	last_pos = byte_pos(dpcm, dpcm->irq_pos);
dpcm              440 sound/drivers/aloop.c 	dpcm->irq_pos += jiffies_delta * dpcm->pcm_bps;
dpcm              441 sound/drivers/aloop.c 	delta = byte_pos(dpcm, dpcm->irq_pos) - last_pos;
dpcm              442 sound/drivers/aloop.c 	if (delta >= dpcm->last_drift)
dpcm              443 sound/drivers/aloop.c 		delta -= dpcm->last_drift;
dpcm              444 sound/drivers/aloop.c 	dpcm->last_drift = 0;
dpcm              445 sound/drivers/aloop.c 	if (dpcm->irq_pos >= dpcm->period_size_frac) {
dpcm              446 sound/drivers/aloop.c 		dpcm->irq_pos %= dpcm->period_size_frac;
dpcm              447 sound/drivers/aloop.c 		dpcm->period_update_pending = 1;
dpcm              452 sound/drivers/aloop.c static inline void bytepos_finish(struct loopback_pcm *dpcm,
dpcm              455 sound/drivers/aloop.c 	dpcm->buf_pos += delta;
dpcm              456 sound/drivers/aloop.c 	dpcm->buf_pos %= dpcm->pcm_buffer_size;
dpcm              515 sound/drivers/aloop.c 	struct loopback_pcm *dpcm = from_timer(dpcm, t, timer);
dpcm              518 sound/drivers/aloop.c 	spin_lock_irqsave(&dpcm->cable->lock, flags);
dpcm              519 sound/drivers/aloop.c 	if (loopback_pos_update(dpcm->cable) & (1 << dpcm->substream->stream)) {
dpcm              520 sound/drivers/aloop.c 		loopback_timer_start(dpcm);
dpcm              521 sound/drivers/aloop.c 		if (dpcm->period_update_pending) {
dpcm              522 sound/drivers/aloop.c 			dpcm->period_update_pending = 0;
dpcm              523 sound/drivers/aloop.c 			spin_unlock_irqrestore(&dpcm->cable->lock, flags);
dpcm              525 sound/drivers/aloop.c 			snd_pcm_period_elapsed(dpcm->substream);
dpcm              529 sound/drivers/aloop.c 	spin_unlock_irqrestore(&dpcm->cable->lock, flags);
dpcm              535 sound/drivers/aloop.c 	struct loopback_pcm *dpcm = runtime->private_data;
dpcm              538 sound/drivers/aloop.c 	spin_lock(&dpcm->cable->lock);
dpcm              539 sound/drivers/aloop.c 	loopback_pos_update(dpcm->cable);
dpcm              540 sound/drivers/aloop.c 	pos = dpcm->buf_pos;
dpcm              541 sound/drivers/aloop.c 	spin_unlock(&dpcm->cable->lock);
dpcm              572 sound/drivers/aloop.c 	struct loopback_pcm *dpcm = runtime->private_data;
dpcm              573 sound/drivers/aloop.c 	kfree(dpcm);
dpcm              586 sound/drivers/aloop.c 	struct loopback_pcm *dpcm = runtime->private_data;
dpcm              587 sound/drivers/aloop.c 	struct loopback_cable *cable = dpcm->cable;
dpcm              589 sound/drivers/aloop.c 	mutex_lock(&dpcm->loopback->cable_lock);
dpcm              591 sound/drivers/aloop.c 	mutex_unlock(&dpcm->loopback->cable_lock);
dpcm              606 sound/drivers/aloop.c 	struct loopback_pcm *dpcm = rule->private;
dpcm              607 sound/drivers/aloop.c 	struct loopback_cable *cable = dpcm->cable;
dpcm              611 sound/drivers/aloop.c 	mutex_lock(&dpcm->loopback->cable_lock);
dpcm              614 sound/drivers/aloop.c 	mutex_unlock(&dpcm->loopback->cable_lock);
dpcm              621 sound/drivers/aloop.c 	struct loopback_pcm *dpcm = rule->private;
dpcm              622 sound/drivers/aloop.c 	struct loopback_cable *cable = dpcm->cable;
dpcm              625 sound/drivers/aloop.c 	mutex_lock(&dpcm->loopback->cable_lock);
dpcm              628 sound/drivers/aloop.c 	mutex_unlock(&dpcm->loopback->cable_lock);
dpcm              637 sound/drivers/aloop.c 	struct loopback_pcm *dpcm = rule->private;
dpcm              638 sound/drivers/aloop.c 	struct loopback_cable *cable = dpcm->cable;
dpcm              641 sound/drivers/aloop.c 	mutex_lock(&dpcm->loopback->cable_lock);
dpcm              644 sound/drivers/aloop.c 	mutex_unlock(&dpcm->loopback->cable_lock);
dpcm              675 sound/drivers/aloop.c 	struct loopback_pcm *dpcm;
dpcm              681 sound/drivers/aloop.c 	dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL);
dpcm              682 sound/drivers/aloop.c 	if (!dpcm) {
dpcm              686 sound/drivers/aloop.c 	dpcm->loopback = loopback;
dpcm              687 sound/drivers/aloop.c 	dpcm->substream = substream;
dpcm              688 sound/drivers/aloop.c 	timer_setup(&dpcm->timer, loopback_timer_function, 0);
dpcm              701 sound/drivers/aloop.c 	dpcm->cable = cable;
dpcm              710 sound/drivers/aloop.c 				  rule_format, dpcm,
dpcm              716 sound/drivers/aloop.c 				  rule_rate, dpcm,
dpcm              722 sound/drivers/aloop.c 				  rule_channels, dpcm,
dpcm              727 sound/drivers/aloop.c 	runtime->private_data = dpcm;
dpcm              729 sound/drivers/aloop.c 	if (get_notify(dpcm))
dpcm              735 sound/drivers/aloop.c 	cable->streams[substream->stream] = dpcm;
dpcm              741 sound/drivers/aloop.c 		kfree(dpcm);
dpcm              750 sound/drivers/aloop.c 	struct loopback_pcm *dpcm = substream->runtime->private_data;
dpcm              752 sound/drivers/aloop.c 	loopback_timer_stop_sync(dpcm);
dpcm             1064 sound/drivers/aloop.c 			    struct loopback_pcm *dpcm,
dpcm             1068 sound/drivers/aloop.c 	if (dpcm == NULL) {
dpcm             1072 sound/drivers/aloop.c 	snd_iprintf(buffer, "    buffer_size:\t%u\n", dpcm->pcm_buffer_size);
dpcm             1073 sound/drivers/aloop.c 	snd_iprintf(buffer, "    buffer_pos:\t\t%u\n", dpcm->buf_pos);
dpcm             1074 sound/drivers/aloop.c 	snd_iprintf(buffer, "    silent_size:\t%u\n", dpcm->silent_size);
dpcm             1075 sound/drivers/aloop.c 	snd_iprintf(buffer, "    period_size:\t%u\n", dpcm->pcm_period_size);
dpcm             1076 sound/drivers/aloop.c 	snd_iprintf(buffer, "    bytes_per_sec:\t%u\n", dpcm->pcm_bps);
dpcm             1077 sound/drivers/aloop.c 	snd_iprintf(buffer, "    sample_align:\t%u\n", dpcm->pcm_salign);
dpcm             1078 sound/drivers/aloop.c 	snd_iprintf(buffer, "    rate_shift:\t\t%u\n", dpcm->pcm_rate_shift);
dpcm             1080 sound/drivers/aloop.c 						dpcm->period_update_pending);
dpcm             1081 sound/drivers/aloop.c 	snd_iprintf(buffer, "    irq_pos:\t\t%u\n", dpcm->irq_pos);
dpcm             1082 sound/drivers/aloop.c 	snd_iprintf(buffer, "    period_frac:\t%u\n", dpcm->period_size_frac);
dpcm             1084 sound/drivers/aloop.c 					dpcm->last_jiffies, jiffies);
dpcm             1085 sound/drivers/aloop.c 	snd_iprintf(buffer, "    timer_expires:\t%lu\n", dpcm->timer.expires);
dpcm              236 sound/drivers/dummy.c static void dummy_systimer_rearm(struct dummy_systimer_pcm *dpcm)
dpcm              238 sound/drivers/dummy.c 	mod_timer(&dpcm->timer, jiffies +
dpcm              239 sound/drivers/dummy.c 		(dpcm->frac_period_rest + dpcm->rate - 1) / dpcm->rate);
dpcm              242 sound/drivers/dummy.c static void dummy_systimer_update(struct dummy_systimer_pcm *dpcm)
dpcm              246 sound/drivers/dummy.c 	delta = jiffies - dpcm->base_time;
dpcm              249 sound/drivers/dummy.c 	dpcm->base_time += delta;
dpcm              250 sound/drivers/dummy.c 	delta *= dpcm->rate;
dpcm              251 sound/drivers/dummy.c 	dpcm->frac_pos += delta;
dpcm              252 sound/drivers/dummy.c 	while (dpcm->frac_pos >= dpcm->frac_buffer_size)
dpcm              253 sound/drivers/dummy.c 		dpcm->frac_pos -= dpcm->frac_buffer_size;
dpcm              254 sound/drivers/dummy.c 	while (dpcm->frac_period_rest <= delta) {
dpcm              255 sound/drivers/dummy.c 		dpcm->elapsed++;
dpcm              256 sound/drivers/dummy.c 		dpcm->frac_period_rest += dpcm->frac_period_size;
dpcm              258 sound/drivers/dummy.c 	dpcm->frac_period_rest -= delta;
dpcm              263 sound/drivers/dummy.c 	struct dummy_systimer_pcm *dpcm = substream->runtime->private_data;
dpcm              264 sound/drivers/dummy.c 	spin_lock(&dpcm->lock);
dpcm              265 sound/drivers/dummy.c 	dpcm->base_time = jiffies;
dpcm              266 sound/drivers/dummy.c 	dummy_systimer_rearm(dpcm);
dpcm              267 sound/drivers/dummy.c 	spin_unlock(&dpcm->lock);
dpcm              273 sound/drivers/dummy.c 	struct dummy_systimer_pcm *dpcm = substream->runtime->private_data;
dpcm              274 sound/drivers/dummy.c 	spin_lock(&dpcm->lock);
dpcm              275 sound/drivers/dummy.c 	del_timer(&dpcm->timer);
dpcm              276 sound/drivers/dummy.c 	spin_unlock(&dpcm->lock);
dpcm              283 sound/drivers/dummy.c 	struct dummy_systimer_pcm *dpcm = runtime->private_data;
dpcm              285 sound/drivers/dummy.c 	dpcm->frac_pos = 0;
dpcm              286 sound/drivers/dummy.c 	dpcm->rate = runtime->rate;
dpcm              287 sound/drivers/dummy.c 	dpcm->frac_buffer_size = runtime->buffer_size * HZ;
dpcm              288 sound/drivers/dummy.c 	dpcm->frac_period_size = runtime->period_size * HZ;
dpcm              289 sound/drivers/dummy.c 	dpcm->frac_period_rest = dpcm->frac_period_size;
dpcm              290 sound/drivers/dummy.c 	dpcm->elapsed = 0;
dpcm              297 sound/drivers/dummy.c 	struct dummy_systimer_pcm *dpcm = from_timer(dpcm, t, timer);
dpcm              301 sound/drivers/dummy.c 	spin_lock_irqsave(&dpcm->lock, flags);
dpcm              302 sound/drivers/dummy.c 	dummy_systimer_update(dpcm);
dpcm              303 sound/drivers/dummy.c 	dummy_systimer_rearm(dpcm);
dpcm              304 sound/drivers/dummy.c 	elapsed = dpcm->elapsed;
dpcm              305 sound/drivers/dummy.c 	dpcm->elapsed = 0;
dpcm              306 sound/drivers/dummy.c 	spin_unlock_irqrestore(&dpcm->lock, flags);
dpcm              308 sound/drivers/dummy.c 		snd_pcm_period_elapsed(dpcm->substream);
dpcm              314 sound/drivers/dummy.c 	struct dummy_systimer_pcm *dpcm = substream->runtime->private_data;
dpcm              317 sound/drivers/dummy.c 	spin_lock(&dpcm->lock);
dpcm              318 sound/drivers/dummy.c 	dummy_systimer_update(dpcm);
dpcm              319 sound/drivers/dummy.c 	pos = dpcm->frac_pos / HZ;
dpcm              320 sound/drivers/dummy.c 	spin_unlock(&dpcm->lock);
dpcm              326 sound/drivers/dummy.c 	struct dummy_systimer_pcm *dpcm;
dpcm              328 sound/drivers/dummy.c 	dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL);
dpcm              329 sound/drivers/dummy.c 	if (!dpcm)
dpcm              331 sound/drivers/dummy.c 	substream->runtime->private_data = dpcm;
dpcm              332 sound/drivers/dummy.c 	timer_setup(&dpcm->timer, dummy_systimer_callback, 0);
dpcm              333 sound/drivers/dummy.c 	spin_lock_init(&dpcm->lock);
dpcm              334 sound/drivers/dummy.c 	dpcm->substream = substream;
dpcm              369 sound/drivers/dummy.c 	struct dummy_hrtimer_pcm *dpcm;
dpcm              371 sound/drivers/dummy.c 	dpcm = container_of(timer, struct dummy_hrtimer_pcm, timer);
dpcm              372 sound/drivers/dummy.c 	if (!atomic_read(&dpcm->running))
dpcm              378 sound/drivers/dummy.c 	snd_pcm_period_elapsed(dpcm->substream);
dpcm              379 sound/drivers/dummy.c 	if (!atomic_read(&dpcm->running))
dpcm              382 sound/drivers/dummy.c 	hrtimer_forward_now(timer, dpcm->period_time);
dpcm              388 sound/drivers/dummy.c 	struct dummy_hrtimer_pcm *dpcm = substream->runtime->private_data;
dpcm              390 sound/drivers/dummy.c 	dpcm->base_time = hrtimer_cb_get_time(&dpcm->timer);
dpcm              391 sound/drivers/dummy.c 	hrtimer_start(&dpcm->timer, dpcm->period_time, HRTIMER_MODE_REL_SOFT);
dpcm              392 sound/drivers/dummy.c 	atomic_set(&dpcm->running, 1);
dpcm              398 sound/drivers/dummy.c 	struct dummy_hrtimer_pcm *dpcm = substream->runtime->private_data;
dpcm              400 sound/drivers/dummy.c 	atomic_set(&dpcm->running, 0);
dpcm              401 sound/drivers/dummy.c 	if (!hrtimer_callback_running(&dpcm->timer))
dpcm              402 sound/drivers/dummy.c 		hrtimer_cancel(&dpcm->timer);
dpcm              406 sound/drivers/dummy.c static inline void dummy_hrtimer_sync(struct dummy_hrtimer_pcm *dpcm)
dpcm              408 sound/drivers/dummy.c 	hrtimer_cancel(&dpcm->timer);
dpcm              415 sound/drivers/dummy.c 	struct dummy_hrtimer_pcm *dpcm = runtime->private_data;
dpcm              419 sound/drivers/dummy.c 	delta = ktime_us_delta(hrtimer_cb_get_time(&dpcm->timer),
dpcm              420 sound/drivers/dummy.c 			       dpcm->base_time);
dpcm              429 sound/drivers/dummy.c 	struct dummy_hrtimer_pcm *dpcm = runtime->private_data;
dpcm              434 sound/drivers/dummy.c 	dummy_hrtimer_sync(dpcm);
dpcm              440 sound/drivers/dummy.c 	dpcm->period_time = ktime_set(sec, nsecs);
dpcm              447 sound/drivers/dummy.c 	struct dummy_hrtimer_pcm *dpcm;
dpcm              449 sound/drivers/dummy.c 	dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL);
dpcm              450 sound/drivers/dummy.c 	if (!dpcm)
dpcm              452 sound/drivers/dummy.c 	substream->runtime->private_data = dpcm;
dpcm              453 sound/drivers/dummy.c 	hrtimer_init(&dpcm->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT);
dpcm              454 sound/drivers/dummy.c 	dpcm->timer.function = dummy_hrtimer_callback;
dpcm              455 sound/drivers/dummy.c 	dpcm->substream = substream;
dpcm              456 sound/drivers/dummy.c 	atomic_set(&dpcm->running, 0);
dpcm              462 sound/drivers/dummy.c 	struct dummy_hrtimer_pcm *dpcm = substream->runtime->private_data;
dpcm              463 sound/drivers/dummy.c 	dummy_hrtimer_sync(dpcm);
dpcm              464 sound/drivers/dummy.c 	kfree(dpcm);
dpcm              444 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm = runtime->private_data;
dpcm              459 sound/pci/asihpi/asihpi.c 	hpi_handle_error(hpi_format_create(&dpcm->format,
dpcm              464 sound/pci/asihpi/asihpi.c 		if (hpi_instream_reset(dpcm->h_stream) != 0)
dpcm              468 sound/pci/asihpi/asihpi.c 			dpcm->h_stream, &dpcm->format) != 0)
dpcm              472 sound/pci/asihpi/asihpi.c 	dpcm->hpi_buffer_attached = 0;
dpcm              474 sound/pci/asihpi/asihpi.c 		err = hpi_stream_host_buffer_attach(dpcm->h_stream,
dpcm              487 sound/pci/asihpi/asihpi.c 		err = hpi_stream_get_info_ex(dpcm->h_stream, NULL,
dpcm              488 sound/pci/asihpi/asihpi.c 				&dpcm->hpi_buffer_attached, NULL, NULL, NULL);
dpcm              497 sound/pci/asihpi/asihpi.c 	dpcm->bytes_per_sec = bytes_per_sec;
dpcm              498 sound/pci/asihpi/asihpi.c 	dpcm->buffer_bytes = params_buffer_bytes(params);
dpcm              499 sound/pci/asihpi/asihpi.c 	dpcm->period_bytes = params_period_bytes(params);
dpcm              508 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm = runtime->private_data;
dpcm              509 sound/pci/asihpi/asihpi.c 	if (dpcm->hpi_buffer_attached)
dpcm              510 sound/pci/asihpi/asihpi.c 		hpi_stream_host_buffer_detach(dpcm->h_stream);
dpcm              518 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm = runtime->private_data;
dpcm              519 sound/pci/asihpi/asihpi.c 	kfree(dpcm);
dpcm              526 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm = runtime->private_data;
dpcm              532 sound/pci/asihpi/asihpi.c 	mod_timer(&dpcm->timer, jiffies + expiry);
dpcm              533 sound/pci/asihpi/asihpi.c 	dpcm->respawn_timer = 1;
dpcm              539 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm = runtime->private_data;
dpcm              541 sound/pci/asihpi/asihpi.c 	dpcm->respawn_timer = 0;
dpcm              542 sound/pci/asihpi/asihpi.c 	del_timer(&dpcm->timer);
dpcm              547 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm;
dpcm              550 sound/pci/asihpi/asihpi.c 	dpcm = (struct snd_card_asihpi_pcm *)substream->runtime->private_data;
dpcm              555 sound/pci/asihpi/asihpi.c 	card->llmode_streampriv = dpcm;
dpcm              584 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm = substream->runtime->private_data;
dpcm              627 sound/pci/asihpi/asihpi.c 					dpcm->h_stream,
dpcm              642 sound/pci/asihpi/asihpi.c 			hpi_handle_error(hpi_stream_start(dpcm->h_stream));
dpcm              667 sound/pci/asihpi/asihpi.c 		hpi_handle_error(hpi_stream_stop(dpcm->h_stream));
dpcm              670 sound/pci/asihpi/asihpi.c 				hpi_outstream_reset(dpcm->h_stream));
dpcm              673 sound/pci/asihpi/asihpi.c 			hpi_handle_error(hpi_stream_group_reset(dpcm->h_stream));
dpcm              679 sound/pci/asihpi/asihpi.c 		hpi_handle_error(hpi_stream_start(dpcm->h_stream));
dpcm              684 sound/pci/asihpi/asihpi.c 		hpi_handle_error(hpi_stream_stop(dpcm->h_stream));
dpcm              741 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm = from_timer(dpcm, t, timer);
dpcm              742 sound/pci/asihpi/asihpi.c 	struct snd_pcm_substream *substream = dpcm->substream;
dpcm              835 sound/pci/asihpi/asihpi.c 	remdata = newdata % dpcm->period_bytes;
dpcm              841 sound/pci/asihpi/asihpi.c 	if (xfercount && (on_card_bytes  > dpcm->period_bytes))
dpcm              842 sound/pci/asihpi/asihpi.c 		next_jiffies = ((on_card_bytes - dpcm->period_bytes) * HZ / dpcm->bytes_per_sec);
dpcm              844 sound/pci/asihpi/asihpi.c 		next_jiffies = ((dpcm->period_bytes - remdata) * HZ / dpcm->bytes_per_sec);
dpcm              847 sound/pci/asihpi/asihpi.c 	dpcm->timer.expires = jiffies + next_jiffies;
dpcm              924 sound/pci/asihpi/asihpi.c 	if (!card->hpi->interrupt_mode && dpcm->respawn_timer)
dpcm              925 sound/pci/asihpi/asihpi.c 		add_timer(&dpcm->timer);
dpcm              963 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm = runtime->private_data;
dpcm              967 sound/pci/asihpi/asihpi.c 	hpi_handle_error(hpi_outstream_reset(dpcm->h_stream));
dpcm              968 sound/pci/asihpi/asihpi.c 	dpcm->pcm_buf_host_rw_ofs = 0;
dpcm              969 sound/pci/asihpi/asihpi.c 	dpcm->pcm_buf_dma_ofs = 0;
dpcm              970 sound/pci/asihpi/asihpi.c 	dpcm->pcm_buf_elapsed_dma_ofs = 0;
dpcm              978 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm = runtime->private_data;
dpcm              983 sound/pci/asihpi/asihpi.c 	ptr = bytes_to_frames(runtime, dpcm->pcm_buf_dma_ofs  % dpcm->buffer_bytes);
dpcm             1024 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm;
dpcm             1029 sound/pci/asihpi/asihpi.c 	dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL);
dpcm             1030 sound/pci/asihpi/asihpi.c 	if (dpcm == NULL)
dpcm             1034 sound/pci/asihpi/asihpi.c 			      substream->number, &dpcm->h_stream);
dpcm             1037 sound/pci/asihpi/asihpi.c 		kfree(dpcm);
dpcm             1048 sound/pci/asihpi/asihpi.c 	timer_setup(&dpcm->timer, snd_card_asihpi_timer_function, 0);
dpcm             1049 sound/pci/asihpi/asihpi.c 	dpcm->substream = substream;
dpcm             1050 sound/pci/asihpi/asihpi.c 	runtime->private_data = dpcm;
dpcm             1074 sound/pci/asihpi/asihpi.c 			snd_card_asihpi_playback_formats(card, dpcm->h_stream);
dpcm             1114 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm = runtime->private_data;
dpcm             1116 sound/pci/asihpi/asihpi.c 	hpi_handle_error(hpi_outstream_close(dpcm->h_stream));
dpcm             1138 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm = runtime->private_data;
dpcm             1142 sound/pci/asihpi/asihpi.c 	snd_printddd("%s, pointer=%d\n", name, dpcm->pcm_buf_dma_ofs);
dpcm             1147 sound/pci/asihpi/asihpi.c 	return bytes_to_frames(runtime, dpcm->pcm_buf_dma_ofs % dpcm->buffer_bytes);
dpcm             1159 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm = runtime->private_data;
dpcm             1161 sound/pci/asihpi/asihpi.c 	hpi_handle_error(hpi_instream_reset(dpcm->h_stream));
dpcm             1162 sound/pci/asihpi/asihpi.c 	dpcm->pcm_buf_host_rw_ofs = 0;
dpcm             1163 sound/pci/asihpi/asihpi.c 	dpcm->pcm_buf_dma_ofs = 0;
dpcm             1164 sound/pci/asihpi/asihpi.c 	dpcm->pcm_buf_elapsed_dma_ofs = 0;
dpcm             1207 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm;
dpcm             1211 sound/pci/asihpi/asihpi.c 	dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL);
dpcm             1212 sound/pci/asihpi/asihpi.c 	if (dpcm == NULL)
dpcm             1220 sound/pci/asihpi/asihpi.c 			     substream->number, &dpcm->h_stream));
dpcm             1222 sound/pci/asihpi/asihpi.c 		kfree(dpcm);
dpcm             1228 sound/pci/asihpi/asihpi.c 	timer_setup(&dpcm->timer, snd_card_asihpi_timer_function, 0);
dpcm             1229 sound/pci/asihpi/asihpi.c 	dpcm->substream = substream;
dpcm             1230 sound/pci/asihpi/asihpi.c 	runtime->private_data = dpcm;
dpcm             1253 sound/pci/asihpi/asihpi.c 		snd_card_asihpi_capture_formats(card, dpcm->h_stream);
dpcm             1282 sound/pci/asihpi/asihpi.c 	struct snd_card_asihpi_pcm *dpcm = substream->runtime->private_data;
dpcm             1284 sound/pci/asihpi/asihpi.c 	hpi_handle_error(hpi_instream_close(dpcm->h_stream));
dpcm              146 sound/soc/fsl/fsl_asrc_dma.c 	struct snd_soc_dpcm *dpcm;
dpcm              154 sound/soc/fsl/fsl_asrc_dma.c 	for_each_dpcm_be(rtd, stream, dpcm) {
dpcm              155 sound/soc/fsl/fsl_asrc_dma.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm              159 sound/soc/fsl/fsl_asrc_dma.c 		if (dpcm->fe != rtd)
dpcm              285 sound/soc/intel/boards/kbl_da7219_max98927.c 	struct snd_soc_dpcm *dpcm = container_of(
dpcm              287 sound/soc/intel/boards/kbl_da7219_max98927.c 	struct snd_soc_dai_link *fe_dai_link = dpcm->fe->dai_link;
dpcm              288 sound/soc/intel/boards/kbl_da7219_max98927.c 	struct snd_soc_dai_link *be_dai_link = dpcm->be->dai_link;
dpcm              404 sound/soc/intel/boards/kbl_rt5663_max98927.c 	struct snd_soc_dpcm *dpcm = container_of(
dpcm              406 sound/soc/intel/boards/kbl_rt5663_max98927.c 	struct snd_soc_dai_link *fe_dai_link = dpcm->fe->dai_link;
dpcm              407 sound/soc/intel/boards/kbl_rt5663_max98927.c 	struct snd_soc_dai_link *be_dai_link = dpcm->be->dai_link;
dpcm              274 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c 	struct snd_soc_dpcm *dpcm = container_of(
dpcm              276 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c 	struct snd_soc_dai_link *fe_dai_link = dpcm->fe->dai_link;
dpcm              277 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c 	struct snd_soc_dai_link *be_dai_link = dpcm->be->dai_link;
dpcm             1416 sound/soc/sh/rcar/core.c 		struct snd_soc_dpcm *dpcm;
dpcm             1420 sound/soc/sh/rcar/core.c 		for_each_dpcm_be(fe, stream, dpcm) {
dpcm             1421 sound/soc/sh/rcar/core.c 			be_params = &dpcm->hw_params;
dpcm              132 sound/soc/soc-compress.c 	struct snd_soc_dpcm *dpcm;
dpcm              143 sound/soc/soc-compress.c 	fe->dpcm[stream].runtime = fe_substream->runtime;
dpcm              153 sound/soc/soc-compress.c 	fe->dpcm[stream].runtime = fe_substream->runtime;
dpcm              155 sound/soc/soc-compress.c 	fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE;
dpcm              160 sound/soc/soc-compress.c 		for_each_dpcm_be(fe, stream, dpcm)
dpcm              161 sound/soc/soc-compress.c 			dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE;
dpcm              164 sound/soc/soc-compress.c 		fe->dpcm[stream].runtime = NULL;
dpcm              194 sound/soc/soc-compress.c 	fe->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN;
dpcm              195 sound/soc/soc-compress.c 	fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO;
dpcm              211 sound/soc/soc-compress.c 	fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO;
dpcm              303 sound/soc/soc-compress.c 	struct snd_soc_dpcm *dpcm;
dpcm              315 sound/soc/soc-compress.c 	fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE;
dpcm              324 sound/soc/soc-compress.c 	for_each_dpcm_be(fe, stream, dpcm)
dpcm              325 sound/soc/soc-compress.c 		dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE;
dpcm              329 sound/soc/soc-compress.c 	fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE;
dpcm              330 sound/soc/soc-compress.c 	fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO;
dpcm              334 sound/soc/soc-compress.c 	fe->dpcm[stream].runtime = NULL;
dpcm              428 sound/soc/soc-compress.c 	fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE;
dpcm              436 sound/soc/soc-compress.c 		fe->dpcm[stream].state = SND_SOC_DPCM_STATE_START;
dpcm              440 sound/soc/soc-compress.c 		fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP;
dpcm              443 sound/soc/soc-compress.c 		fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED;
dpcm              448 sound/soc/soc-compress.c 	fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO;
dpcm              549 sound/soc/soc-compress.c 	memset(&fe->dpcm[fe_substream->stream].hw_params, 0,
dpcm              552 sound/soc/soc-compress.c 	fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE;
dpcm              579 sound/soc/soc-compress.c 	fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE;
dpcm              582 sound/soc/soc-compress.c 	fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO;
dpcm             1457 sound/soc/soc-core.c 	INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_PLAYBACK].be_clients);
dpcm             1458 sound/soc/soc-core.c 	INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_CAPTURE].be_clients);
dpcm             1459 sound/soc/soc-core.c 	INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_PLAYBACK].fe_clients);
dpcm             1460 sound/soc/soc-core.c 	INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_CAPTURE].fe_clients);
dpcm              157 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm              159 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, dir, dpcm) {
dpcm              161 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm              167 sound/soc/soc-pcm.c 		    (be->dpcm[dir].users >= 1))
dpcm             1149 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             1156 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             1157 sound/soc/soc-pcm.c 		if (dpcm->be == be && dpcm->fe == fe)
dpcm             1161 sound/soc/soc-pcm.c 	dpcm = kzalloc(sizeof(struct snd_soc_dpcm), GFP_KERNEL);
dpcm             1162 sound/soc/soc-pcm.c 	if (!dpcm)
dpcm             1165 sound/soc/soc-pcm.c 	dpcm->be = be;
dpcm             1166 sound/soc/soc-pcm.c 	dpcm->fe = fe;
dpcm             1167 sound/soc/soc-pcm.c 	be->dpcm[stream].runtime = fe->dpcm[stream].runtime;
dpcm             1168 sound/soc/soc-pcm.c 	dpcm->state = SND_SOC_DPCM_LINK_STATE_NEW;
dpcm             1170 sound/soc/soc-pcm.c 	list_add(&dpcm->list_be, &fe->dpcm[stream].be_clients);
dpcm             1171 sound/soc/soc-pcm.c 	list_add(&dpcm->list_fe, &be->dpcm[stream].fe_clients);
dpcm             1182 sound/soc/soc-pcm.c 		dpcm->debugfs_state = debugfs_create_dir(name,
dpcm             1184 sound/soc/soc-pcm.c 		debugfs_create_u32("state", 0644, dpcm->debugfs_state,
dpcm             1185 sound/soc/soc-pcm.c 				   &dpcm->state);
dpcm             1196 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             1200 sound/soc/soc-pcm.c 	if (!be->dpcm[stream].users)
dpcm             1205 sound/soc/soc-pcm.c 	for_each_dpcm_fe(be, stream, dpcm) {
dpcm             1206 sound/soc/soc-pcm.c 		if (dpcm->fe == fe)
dpcm             1211 sound/soc/soc-pcm.c 			dpcm->fe->dai_link->name,
dpcm             1212 sound/soc/soc-pcm.c 			stream ? "<-" : "->", dpcm->be->dai_link->name);
dpcm             1214 sound/soc/soc-pcm.c 		fe_substream = snd_soc_dpcm_get_substream(dpcm->fe, stream);
dpcm             1223 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm, *d;
dpcm             1226 sound/soc/soc-pcm.c 	for_each_dpcm_be_safe(fe, stream, dpcm, d) {
dpcm             1229 sound/soc/soc-pcm.c 				dpcm->be->dai_link->name);
dpcm             1231 sound/soc/soc-pcm.c 		if (dpcm->state != SND_SOC_DPCM_LINK_STATE_FREE)
dpcm             1236 sound/soc/soc-pcm.c 			stream ? "<-" : "->", dpcm->be->dai_link->name);
dpcm             1239 sound/soc/soc-pcm.c 		dpcm_be_reparent(fe, dpcm->be, stream);
dpcm             1242 sound/soc/soc-pcm.c 		debugfs_remove_recursive(dpcm->debugfs_state);
dpcm             1245 sound/soc/soc-pcm.c 		list_del(&dpcm->list_be);
dpcm             1246 sound/soc/soc-pcm.c 		list_del(&dpcm->list_fe);
dpcm             1248 sound/soc/soc-pcm.c 		kfree(dpcm);
dpcm             1387 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             1395 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             1399 sound/soc/soc-pcm.c 		widget = dai_get_widget(dpcm->be->cpu_dai, stream);
dpcm             1407 sound/soc/soc-pcm.c 		for_each_rtd_codec_dai(dpcm->be, i, dai) {
dpcm             1419 sound/soc/soc-pcm.c 			dpcm->be->dai_link->name, fe->dai_link->name);
dpcm             1420 sound/soc/soc-pcm.c 		dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE;
dpcm             1421 sound/soc/soc-pcm.c 		dpcm->be->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_BE;
dpcm             1466 sound/soc/soc-pcm.c 		if (!fe->dpcm[stream].runtime && !fe->fe_compr)
dpcm             1479 sound/soc/soc-pcm.c 		be->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_BE;
dpcm             1502 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             1506 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm)
dpcm             1507 sound/soc/soc-pcm.c 		dpcm->be->dpcm[stream].runtime_update =
dpcm             1515 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             1518 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             1520 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             1524 sound/soc/soc-pcm.c 		if (be->dpcm[stream].users == 0)
dpcm             1527 sound/soc/soc-pcm.c 				be->dpcm[stream].state);
dpcm             1529 sound/soc/soc-pcm.c 		if (--be->dpcm[stream].users != 0)
dpcm             1532 sound/soc/soc-pcm.c 		if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN)
dpcm             1537 sound/soc/soc-pcm.c 		be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE;
dpcm             1543 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             1547 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             1549 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             1564 sound/soc/soc-pcm.c 		if (be->dpcm[stream].users == DPCM_MAX_BE_USERS)
dpcm             1567 sound/soc/soc-pcm.c 				be->dpcm[stream].state);
dpcm             1569 sound/soc/soc-pcm.c 		if (be->dpcm[stream].users++ != 0)
dpcm             1572 sound/soc/soc-pcm.c 		if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) &&
dpcm             1573 sound/soc/soc-pcm.c 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE))
dpcm             1579 sound/soc/soc-pcm.c 		be_substream->runtime = be->dpcm[stream].runtime;
dpcm             1583 sound/soc/soc-pcm.c 			be->dpcm[stream].users--;
dpcm             1584 sound/soc/soc-pcm.c 			if (be->dpcm[stream].users < 0)
dpcm             1587 sound/soc/soc-pcm.c 					be->dpcm[stream].state);
dpcm             1589 sound/soc/soc-pcm.c 			be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE;
dpcm             1593 sound/soc/soc-pcm.c 		be->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN;
dpcm             1601 sound/soc/soc-pcm.c 	for_each_dpcm_be_rollback(fe, stream, dpcm) {
dpcm             1602 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             1609 sound/soc/soc-pcm.c 		if (be->dpcm[stream].users == 0)
dpcm             1612 sound/soc/soc-pcm.c 				be->dpcm[stream].state);
dpcm             1614 sound/soc/soc-pcm.c 		if (--be->dpcm[stream].users != 0)
dpcm             1617 sound/soc/soc-pcm.c 		if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN)
dpcm             1622 sound/soc/soc-pcm.c 		be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE;
dpcm             1646 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             1658 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             1659 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             1688 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             1699 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             1700 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             1740 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             1751 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             1752 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             1825 sound/soc/soc-pcm.c 	if (state == SND_SOC_DPCM_UPDATE_NO && fe->dpcm[stream].trigger_pending) {
dpcm             1827 sound/soc/soc-pcm.c 				       fe->dpcm[stream].trigger_pending - 1);
dpcm             1828 sound/soc/soc-pcm.c 		fe->dpcm[stream].trigger_pending = 0;
dpcm             1830 sound/soc/soc-pcm.c 	fe->dpcm[stream].runtime_update = state;
dpcm             1837 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             1854 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             1855 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             1917 sound/soc/soc-pcm.c 	fe->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN;
dpcm             1941 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             1944 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             1946 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             1954 sound/soc/soc-pcm.c 		if (be->dpcm[stream].users == 0)
dpcm             1957 sound/soc/soc-pcm.c 				be->dpcm[stream].state);
dpcm             1959 sound/soc/soc-pcm.c 		if (--be->dpcm[stream].users != 0)
dpcm             1962 sound/soc/soc-pcm.c 		if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) &&
dpcm             1963 sound/soc/soc-pcm.c 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN)) {
dpcm             1965 sound/soc/soc-pcm.c 			be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE;
dpcm             1974 sound/soc/soc-pcm.c 		be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE;
dpcm             1997 sound/soc/soc-pcm.c 	fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE;
dpcm             2004 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             2008 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             2010 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             2023 sound/soc/soc-pcm.c 		if (be->dpcm[stream].users > 1)
dpcm             2026 sound/soc/soc-pcm.c 		if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) &&
dpcm             2027 sound/soc/soc-pcm.c 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) &&
dpcm             2028 sound/soc/soc-pcm.c 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) &&
dpcm             2029 sound/soc/soc-pcm.c 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) &&
dpcm             2030 sound/soc/soc-pcm.c 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) &&
dpcm             2031 sound/soc/soc-pcm.c 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND))
dpcm             2039 sound/soc/soc-pcm.c 		be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE;
dpcm             2065 sound/soc/soc-pcm.c 	fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE;
dpcm             2074 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             2077 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             2079 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             2088 sound/soc/soc-pcm.c 		memcpy(&dpcm->hw_params, &fe->dpcm[stream].hw_params,
dpcm             2094 sound/soc/soc-pcm.c 					&dpcm->hw_params);
dpcm             2104 sound/soc/soc-pcm.c 		memcpy(&be->dpcm[stream].hw_params, &dpcm->hw_params,
dpcm             2111 sound/soc/soc-pcm.c 		if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) &&
dpcm             2112 sound/soc/soc-pcm.c 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) &&
dpcm             2113 sound/soc/soc-pcm.c 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE))
dpcm             2119 sound/soc/soc-pcm.c 		ret = soc_pcm_hw_params(be_substream, &dpcm->hw_params);
dpcm             2121 sound/soc/soc-pcm.c 			dev_err(dpcm->be->dev,
dpcm             2126 sound/soc/soc-pcm.c 		be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS;
dpcm             2132 sound/soc/soc-pcm.c 	for_each_dpcm_be_rollback(fe, stream, dpcm) {
dpcm             2133 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             2144 sound/soc/soc-pcm.c 		if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) &&
dpcm             2145 sound/soc/soc-pcm.c 		   (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) &&
dpcm             2146 sound/soc/soc-pcm.c 		   (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) &&
dpcm             2147 sound/soc/soc-pcm.c 		   (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP))
dpcm             2165 sound/soc/soc-pcm.c 	memcpy(&fe->dpcm[substream->stream].hw_params, params,
dpcm             2183 sound/soc/soc-pcm.c 		fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS;
dpcm             2191 sound/soc/soc-pcm.c static int dpcm_do_trigger(struct snd_soc_dpcm *dpcm,
dpcm             2196 sound/soc/soc-pcm.c 	dev_dbg(dpcm->be->dev, "ASoC: trigger BE %s cmd %d\n",
dpcm             2197 sound/soc/soc-pcm.c 			dpcm->be->dai_link->name, cmd);
dpcm             2201 sound/soc/soc-pcm.c 		dev_err(dpcm->be->dev,"ASoC: trigger BE failed %d\n", ret);
dpcm             2209 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             2212 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             2214 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             2224 sound/soc/soc-pcm.c 			if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) &&
dpcm             2225 sound/soc/soc-pcm.c 			    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) &&
dpcm             2226 sound/soc/soc-pcm.c 			    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED))
dpcm             2229 sound/soc/soc-pcm.c 			ret = dpcm_do_trigger(dpcm, be_substream, cmd);
dpcm             2233 sound/soc/soc-pcm.c 			be->dpcm[stream].state = SND_SOC_DPCM_STATE_START;
dpcm             2236 sound/soc/soc-pcm.c 			if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND))
dpcm             2239 sound/soc/soc-pcm.c 			ret = dpcm_do_trigger(dpcm, be_substream, cmd);
dpcm             2243 sound/soc/soc-pcm.c 			be->dpcm[stream].state = SND_SOC_DPCM_STATE_START;
dpcm             2246 sound/soc/soc-pcm.c 			if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED))
dpcm             2249 sound/soc/soc-pcm.c 			ret = dpcm_do_trigger(dpcm, be_substream, cmd);
dpcm             2253 sound/soc/soc-pcm.c 			be->dpcm[stream].state = SND_SOC_DPCM_STATE_START;
dpcm             2256 sound/soc/soc-pcm.c 			if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) &&
dpcm             2257 sound/soc/soc-pcm.c 			    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED))
dpcm             2263 sound/soc/soc-pcm.c 			ret = dpcm_do_trigger(dpcm, be_substream, cmd);
dpcm             2267 sound/soc/soc-pcm.c 			be->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP;
dpcm             2270 sound/soc/soc-pcm.c 			if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START)
dpcm             2276 sound/soc/soc-pcm.c 			ret = dpcm_do_trigger(dpcm, be_substream, cmd);
dpcm             2280 sound/soc/soc-pcm.c 			be->dpcm[stream].state = SND_SOC_DPCM_STATE_SUSPEND;
dpcm             2283 sound/soc/soc-pcm.c 			if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START)
dpcm             2289 sound/soc/soc-pcm.c 			ret = dpcm_do_trigger(dpcm, be_substream, cmd);
dpcm             2293 sound/soc/soc-pcm.c 			be->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED;
dpcm             2341 sound/soc/soc-pcm.c 	fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE;
dpcm             2403 sound/soc/soc-pcm.c 		fe->dpcm[stream].state = SND_SOC_DPCM_STATE_START;
dpcm             2407 sound/soc/soc-pcm.c 		fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP;
dpcm             2410 sound/soc/soc-pcm.c 		fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED;
dpcm             2415 sound/soc/soc-pcm.c 	fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO;
dpcm             2427 sound/soc/soc-pcm.c 	if (fe->dpcm[stream].runtime_update != SND_SOC_DPCM_UPDATE_NO) {
dpcm             2428 sound/soc/soc-pcm.c 		fe->dpcm[stream].trigger_pending = cmd + 1;
dpcm             2438 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             2441 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             2443 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             2451 sound/soc/soc-pcm.c 		if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) &&
dpcm             2452 sound/soc/soc-pcm.c 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) &&
dpcm             2453 sound/soc/soc-pcm.c 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND) &&
dpcm             2454 sound/soc/soc-pcm.c 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED))
dpcm             2467 sound/soc/soc-pcm.c 		be->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE;
dpcm             2484 sound/soc/soc-pcm.c 	if (list_empty(&fe->dpcm[stream].be_clients)) {
dpcm             2505 sound/soc/soc-pcm.c 	fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE;
dpcm             2559 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             2568 sound/soc/soc-pcm.c 	if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_HW_FREE ||
dpcm             2569 sound/soc/soc-pcm.c 		fe->dpcm[stream].state == SND_SOC_DPCM_STATE_CLOSE)
dpcm             2578 sound/soc/soc-pcm.c 	if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_OPEN)
dpcm             2586 sound/soc/soc-pcm.c 	if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_HW_PARAMS)
dpcm             2598 sound/soc/soc-pcm.c 	if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_PREPARE ||
dpcm             2599 sound/soc/soc-pcm.c 		fe->dpcm[stream].state == SND_SOC_DPCM_STATE_STOP)
dpcm             2633 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             2634 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             2635 sound/soc/soc-pcm.c 		if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START)
dpcm             2636 sound/soc/soc-pcm.c 				dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE;
dpcm             2778 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             2781 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, SNDRV_PCM_STREAM_PLAYBACK, dpcm) {
dpcm             2783 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             2807 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             2813 sound/soc/soc-pcm.c 	fe->dpcm[stream].runtime = fe_substream->runtime;
dpcm             2830 sound/soc/soc-pcm.c 		for_each_dpcm_be(fe, stream, dpcm)
dpcm             2831 sound/soc/soc-pcm.c 			dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE;
dpcm             2834 sound/soc/soc-pcm.c 		fe->dpcm[stream].runtime = NULL;
dpcm             2846 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             2853 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm)
dpcm             2854 sound/soc/soc-pcm.c 		dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE;
dpcm             2858 sound/soc/soc-pcm.c 	fe->dpcm[stream].runtime = NULL;
dpcm             3027 sound/soc/soc-pcm.c 	if (fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE)
dpcm             3037 sound/soc/soc-pcm.c 	if ((fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE) ||
dpcm             3038 sound/soc/soc-pcm.c 	   ((fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_BE) &&
dpcm             3039 sound/soc/soc-pcm.c 		  be->dpcm[stream].runtime_update))
dpcm             3057 sound/soc/soc-pcm.c 	return be->dpcm[stream].state;
dpcm             3065 sound/soc/soc-pcm.c 	be->dpcm[stream].state = state;
dpcm             3076 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             3082 sound/soc/soc-pcm.c 	for_each_dpcm_fe(be, stream, dpcm) {
dpcm             3084 sound/soc/soc-pcm.c 		if (dpcm->fe == fe)
dpcm             3087 sound/soc/soc-pcm.c 		state = dpcm->fe->dpcm[stream].state;
dpcm             3109 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             3115 sound/soc/soc-pcm.c 	for_each_dpcm_fe(be, stream, dpcm) {
dpcm             3117 sound/soc/soc-pcm.c 		if (dpcm->fe == fe)
dpcm             3120 sound/soc/soc-pcm.c 		state = dpcm->fe->dpcm[stream].state;
dpcm             3168 sound/soc/soc-pcm.c 	struct snd_pcm_hw_params *params = &fe->dpcm[stream].hw_params;
dpcm             3169 sound/soc/soc-pcm.c 	struct snd_soc_dpcm *dpcm;
dpcm             3179 sound/soc/soc-pcm.c 	                dpcm_state_string(fe->dpcm[stream].state));
dpcm             3181 sound/soc/soc-pcm.c 	if ((fe->dpcm[stream].state >= SND_SOC_DPCM_STATE_HW_PARAMS) &&
dpcm             3182 sound/soc/soc-pcm.c 	    (fe->dpcm[stream].state <= SND_SOC_DPCM_STATE_STOP))
dpcm             3193 sound/soc/soc-pcm.c 	if (list_empty(&fe->dpcm[stream].be_clients)) {
dpcm             3200 sound/soc/soc-pcm.c 	for_each_dpcm_be(fe, stream, dpcm) {
dpcm             3201 sound/soc/soc-pcm.c 		struct snd_soc_pcm_runtime *be = dpcm->be;
dpcm             3202 sound/soc/soc-pcm.c 		params = &dpcm->hw_params;
dpcm             3209 sound/soc/soc-pcm.c 				dpcm_state_string(be->dpcm[stream].state));
dpcm             3211 sound/soc/soc-pcm.c 		if ((be->dpcm[stream].state >= SND_SOC_DPCM_STATE_HW_PARAMS) &&
dpcm             3212 sound/soc/soc-pcm.c 		    (be->dpcm[stream].state <= SND_SOC_DPCM_STATE_STOP))
dpcm               42 sound/soc/sof/intel/hda-dai.c 	struct snd_soc_dpcm *dpcm;
dpcm               44 sound/soc/sof/intel/hda-dai.c 	for_each_dpcm_fe(rtd, dir, dpcm) {
dpcm               45 sound/soc/sof/intel/hda-dai.c 		fe_substream = snd_soc_dpcm_get_substream(dpcm->fe, dir);
dpcm              274 sound/soc/sof/intel/hda-dai.c 	return hda_link_hw_params(substream, &rtd->dpcm[stream].hw_params,