subs              377 arch/arm/include/asm/atomic.h ATOMIC64_OPS(sub, subs, sbc)
subs               34 arch/arm/include/asm/uaccess-asm.h 	subs	\tmp, \tmp, \addr	@ tmp = limit - 1 - addr
subs              299 arch/arm64/include/asm/insn.h __AARCH64_INSN_FUNCS(subs,	0x7F200000, 0x6B000000)
subs             4000 drivers/media/pci/bt8xx/bttv-driver.c 	INIT_LIST_HEAD(&btv->c.subs);
subs               93 drivers/media/pci/bt8xx/bttv-gpio.c 	list_add_tail(&sub->list,&core->subs);
subs              101 drivers/media/pci/bt8xx/bttv-gpio.c 	list_for_each_entry_safe(sub, save, &core->subs, list) {
subs              208 drivers/media/pci/bt8xx/bttv.h 	struct list_head     subs;     /* struct bttv_sub_device */
subs              248 drivers/media/pci/cobalt/cobalt-alsa-pcm.c static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs,
subs              251 drivers/media/pci/cobalt/cobalt-alsa-pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              493 drivers/media/pci/cobalt/cobalt-alsa-pcm.c static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs,
subs              496 drivers/media/pci/cobalt/cobalt-alsa-pcm.c 	void *pageptr = subs->runtime->dma_area + offset;
subs              217 drivers/media/pci/cx18/cx18-alsa-pcm.c static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs,
subs              220 drivers/media/pci/cx18/cx18-alsa-pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              294 drivers/media/pci/cx18/cx18-alsa-pcm.c static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs,
subs              297 drivers/media/pci/cx18/cx18-alsa-pcm.c 	void *pageptr = subs->runtime->dma_area + offset;
subs              222 drivers/media/pci/ivtv/ivtv-alsa-pcm.c static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs,
subs              225 drivers/media/pci/ivtv/ivtv-alsa-pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              299 drivers/media/pci/ivtv/ivtv-alsa-pcm.c static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs,
subs              302 drivers/media/pci/ivtv/ivtv-alsa-pcm.c 	void *pageptr = subs->runtime->dma_area + offset;
subs              522 drivers/media/platform/s5p-jpeg/jpeg-core.c 					enum v4l2_jpeg_chroma_subsampling subs,
subs              376 drivers/media/usb/cx231xx/cx231xx-audio.c static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs,
subs              379 drivers/media/usb/cx231xx/cx231xx-audio.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              380 drivers/media/usb/cx231xx/cx231xx-audio.c 	struct cx231xx *dev = snd_pcm_substream_chip(subs);
subs              618 drivers/media/usb/cx231xx/cx231xx-audio.c static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs,
subs              621 drivers/media/usb/cx231xx/cx231xx-audio.c 	void *pageptr = subs->runtime->dma_area + offset;
subs              196 drivers/media/usb/em28xx/em28xx-audio.c static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs,
subs              199 drivers/media/usb/em28xx/em28xx-audio.c 	struct em28xx *dev = snd_pcm_substream_chip(subs);
subs              200 drivers/media/usb/em28xx/em28xx-audio.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              475 drivers/media/usb/em28xx/em28xx-audio.c static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs,
subs              478 drivers/media/usb/em28xx/em28xx-audio.c 	void *pageptr = subs->runtime->dma_area + offset;
subs              372 drivers/media/usb/tm6000/tm6000-alsa.c static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs,
subs              375 drivers/media/usb/tm6000/tm6000-alsa.c 	void *pageptr = subs->runtime->dma_area + offset;
subs             4385 drivers/net/wireless/atmel/atmel.c 	subs	r0, r0, #1
subs              854 fs/afs/dir.c   	struct afs_sysnames *subs;
subs              873 fs/afs/dir.c   	subs = net->sysnames;
subs              874 fs/afs/dir.c   	refcount_inc(&subs->usage);
subs              877 fs/afs/dir.c   	for (i = 0; i < subs->nr; i++) {
subs              878 fs/afs/dir.c   		name = subs->subs[i];
subs              897 fs/afs/dir.c   	afs_put_sysnames(subs);
subs              265 fs/afs/internal.h 	char			*subs[AFS_NR_SYSNAME];
subs              104 fs/afs/main.c  	sysnames->subs[0] = (char *)&afs_init_sysname;
subs              434 fs/afs/proc.c  		seq_printf(m, "%s\n", sysnames->subs[i]);
subs              532 fs/afs/proc.c  		sysnames->subs[sysnames->nr] = sub;
subs              537 fs/afs/proc.c  		sysnames->subs[0] = sysnames->blank;
subs              562 fs/afs/proc.c  			if (sysnames->subs[i] != afs_init_sysname &&
subs              563 fs/afs/proc.c  			    sysnames->subs[i] != sysnames->blank)
subs              564 fs/afs/proc.c  				kfree(sysnames->subs[i]);
subs               99 include/linux/ceph/mon_client.h 	} subs[4];
subs              146 net/ceph/debugfs.c 	for (i = 0; i < ARRAY_SIZE(monc->subs); i++) {
subs              148 net/ceph/debugfs.c 			   monc->subs[i].have);
subs              149 net/ceph/debugfs.c 		if (monc->subs[i].want)
subs              151 net/ceph/debugfs.c 				   le64_to_cpu(monc->subs[i].item.start),
subs              152 net/ceph/debugfs.c 				   (monc->subs[i].item.flags &
subs              276 net/ceph/mon_client.c 	for (i = 0; i < ARRAY_SIZE(monc->subs); i++) {
subs              277 net/ceph/mon_client.c 		if (monc->subs[i].want)
subs              282 net/ceph/mon_client.c 	for (i = 0; i < ARRAY_SIZE(monc->subs); i++) {
subs              286 net/ceph/mon_client.c 		if (!monc->subs[i].want)
subs              295 net/ceph/mon_client.c 		     le64_to_cpu(monc->subs[i].item.start),
subs              296 net/ceph/mon_client.c 		     monc->subs[i].item.flags);
subs              298 net/ceph/mon_client.c 		memcpy(p, &monc->subs[i].item, sizeof(monc->subs[i].item));
subs              299 net/ceph/mon_client.c 		p += sizeof(monc->subs[i].item);
subs              356 net/ceph/mon_client.c 	if (monc->subs[sub].want &&
subs              357 net/ceph/mon_client.c 	    monc->subs[sub].item.start == start &&
subs              358 net/ceph/mon_client.c 	    monc->subs[sub].item.flags == flags)
subs              361 net/ceph/mon_client.c 	monc->subs[sub].item.start = start;
subs              362 net/ceph/mon_client.c 	monc->subs[sub].item.flags = flags;
subs              363 net/ceph/mon_client.c 	monc->subs[sub].want = true;
subs              391 net/ceph/mon_client.c 	if (monc->subs[sub].want) {
subs              392 net/ceph/mon_client.c 		if (monc->subs[sub].item.flags & CEPH_SUBSCRIBE_ONETIME)
subs              393 net/ceph/mon_client.c 			monc->subs[sub].want = false;
subs              395 net/ceph/mon_client.c 			monc->subs[sub].item.start = cpu_to_le64(epoch + 1);
subs              398 net/ceph/mon_client.c 	monc->subs[sub].have = epoch;
subs              430 net/ceph/mon_client.c 	while (monc->subs[CEPH_SUB_OSDMAP].have < epoch) {
subs              437 net/ceph/mon_client.c 				     monc->subs[CEPH_SUB_OSDMAP].have >= epoch,
subs               99 sound/core/seq/oss/seq_oss_init.c 		struct snd_seq_port_subscribe subs;
subs              101 sound/core/seq/oss/seq_oss_init.c 		memset(&subs, 0, sizeof(subs));
subs              102 sound/core/seq/oss/seq_oss_init.c 		subs.sender.client = SNDRV_SEQ_CLIENT_SYSTEM;
subs              103 sound/core/seq/oss/seq_oss_init.c 		subs.sender.port = SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE;
subs              104 sound/core/seq/oss/seq_oss_init.c 		subs.dest.client = system_client;
subs              105 sound/core/seq/oss/seq_oss_init.c 		subs.dest.port = system_port;
subs              106 sound/core/seq/oss/seq_oss_init.c 		call_ctl(SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT, &subs);
subs              319 sound/core/seq/oss/seq_oss_midi.c 	struct snd_seq_port_subscribe subs;
subs              349 sound/core/seq/oss/seq_oss_midi.c 	memset(&subs, 0, sizeof(subs));
subs              352 sound/core/seq/oss/seq_oss_midi.c 		subs.sender = dp->addr;
subs              353 sound/core/seq/oss/seq_oss_midi.c 		subs.dest.client = mdev->client;
subs              354 sound/core/seq/oss/seq_oss_midi.c 		subs.dest.port = mdev->port;
subs              355 sound/core/seq/oss/seq_oss_midi.c 		if (snd_seq_kernel_client_ctl(dp->cseq, SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT, &subs) >= 0)
subs              359 sound/core/seq/oss/seq_oss_midi.c 		subs.sender.client = mdev->client;
subs              360 sound/core/seq/oss/seq_oss_midi.c 		subs.sender.port = mdev->port;
subs              361 sound/core/seq/oss/seq_oss_midi.c 		subs.dest = dp->addr;
subs              362 sound/core/seq/oss/seq_oss_midi.c 		subs.flags = SNDRV_SEQ_PORT_SUBS_TIMESTAMP;
subs              363 sound/core/seq/oss/seq_oss_midi.c 		subs.queue = dp->queue;		/* queue for timestamps */
subs              364 sound/core/seq/oss/seq_oss_midi.c 		if (snd_seq_kernel_client_ctl(dp->cseq, SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT, &subs) >= 0)
subs              385 sound/core/seq/oss/seq_oss_midi.c 	struct snd_seq_port_subscribe subs;
subs              394 sound/core/seq/oss/seq_oss_midi.c 	memset(&subs, 0, sizeof(subs));
subs              396 sound/core/seq/oss/seq_oss_midi.c 		subs.sender = dp->addr;
subs              397 sound/core/seq/oss/seq_oss_midi.c 		subs.dest.client = mdev->client;
subs              398 sound/core/seq/oss/seq_oss_midi.c 		subs.dest.port = mdev->port;
subs              399 sound/core/seq/oss/seq_oss_midi.c 		snd_seq_kernel_client_ctl(dp->cseq, SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT, &subs);
subs              402 sound/core/seq/oss/seq_oss_midi.c 		subs.sender.client = mdev->client;
subs              403 sound/core/seq/oss/seq_oss_midi.c 		subs.sender.port = mdev->port;
subs              404 sound/core/seq/oss/seq_oss_midi.c 		subs.dest = dp->addr;
subs              405 sound/core/seq/oss/seq_oss_midi.c 		snd_seq_kernel_client_ctl(dp->cseq, SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT, &subs);
subs              666 sound/core/seq/seq_clientmgr.c 	struct snd_seq_subscribers *subs;
subs              684 sound/core/seq/seq_clientmgr.c 	list_for_each_entry(subs, &grp->list_head, src_list) {
subs              686 sound/core/seq/seq_clientmgr.c 		if (atomic_read(&subs->ref_count) != 2)
subs              688 sound/core/seq/seq_clientmgr.c 		event->dest = subs->info.dest;
subs              689 sound/core/seq/seq_clientmgr.c 		if (subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIMESTAMP)
subs              691 sound/core/seq/seq_clientmgr.c 			update_timestamp_of_queue(event, subs->info.queue,
subs              692 sound/core/seq/seq_clientmgr.c 						  subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIME_REAL);
subs             1413 sound/core/seq/seq_clientmgr.c 					 struct snd_seq_port_subscribe *subs)
subs             1415 sound/core/seq/seq_clientmgr.c 	if (client->number != subs->sender.client &&
subs             1416 sound/core/seq/seq_clientmgr.c 	    client->number != subs->dest.client) {
subs             1428 sound/core/seq/seq_clientmgr.c 	if (client->number != subs->sender.client) {
subs             1433 sound/core/seq/seq_clientmgr.c 	if (client->number != subs->dest.client) {
subs             1465 sound/core/seq/seq_clientmgr.c 	struct snd_seq_port_subscribe *subs = arg;
subs             1470 sound/core/seq/seq_clientmgr.c 	if ((receiver = snd_seq_client_use_ptr(subs->dest.client)) == NULL)
subs             1472 sound/core/seq/seq_clientmgr.c 	if ((sender = snd_seq_client_use_ptr(subs->sender.client)) == NULL)
subs             1474 sound/core/seq/seq_clientmgr.c 	if ((sport = snd_seq_port_use_ptr(sender, subs->sender.port)) == NULL)
subs             1476 sound/core/seq/seq_clientmgr.c 	if ((dport = snd_seq_port_use_ptr(receiver, subs->dest.port)) == NULL)
subs             1479 sound/core/seq/seq_clientmgr.c 	result = check_subscription_permission(client, sport, dport, subs);
subs             1484 sound/core/seq/seq_clientmgr.c 	result = snd_seq_port_connect(client, sender, sport, receiver, dport, subs);
subs             1487 sound/core/seq/seq_clientmgr.c 						   subs, SNDRV_SEQ_EVENT_PORT_SUBSCRIBED);
subs             1507 sound/core/seq/seq_clientmgr.c 	struct snd_seq_port_subscribe *subs = arg;
subs             1512 sound/core/seq/seq_clientmgr.c 	if ((receiver = snd_seq_client_use_ptr(subs->dest.client)) == NULL)
subs             1514 sound/core/seq/seq_clientmgr.c 	if ((sender = snd_seq_client_use_ptr(subs->sender.client)) == NULL)
subs             1516 sound/core/seq/seq_clientmgr.c 	if ((sport = snd_seq_port_use_ptr(sender, subs->sender.port)) == NULL)
subs             1518 sound/core/seq/seq_clientmgr.c 	if ((dport = snd_seq_port_use_ptr(receiver, subs->dest.port)) == NULL)
subs             1521 sound/core/seq/seq_clientmgr.c 	result = check_subscription_permission(client, sport, dport, subs);
subs             1525 sound/core/seq/seq_clientmgr.c 	result = snd_seq_port_disconnect(client, sender, sport, receiver, dport, subs);
subs             1528 sound/core/seq/seq_clientmgr.c 						   subs, SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED);
subs             1924 sound/core/seq/seq_clientmgr.c 	struct snd_seq_port_subscribe *subs = arg;
subs             1930 sound/core/seq/seq_clientmgr.c 	if ((sender = snd_seq_client_use_ptr(subs->sender.client)) == NULL)
subs             1932 sound/core/seq/seq_clientmgr.c 	if ((sport = snd_seq_port_use_ptr(sender, subs->sender.port)) == NULL)
subs             1934 sound/core/seq/seq_clientmgr.c 	result = snd_seq_port_get_subscription(&sport->c_src, &subs->dest,
subs             1935 sound/core/seq/seq_clientmgr.c 					       subs);
subs             1951 sound/core/seq/seq_clientmgr.c 	struct snd_seq_query_subs *subs = arg;
subs             1959 sound/core/seq/seq_clientmgr.c 	if ((cptr = snd_seq_client_use_ptr(subs->root.client)) == NULL)
subs             1961 sound/core/seq/seq_clientmgr.c 	if ((port = snd_seq_port_use_ptr(cptr, subs->root.port)) == NULL)
subs             1964 sound/core/seq/seq_clientmgr.c 	switch (subs->type) {
subs             1977 sound/core/seq/seq_clientmgr.c 	subs->num_subs = group->count;
subs             1981 sound/core/seq/seq_clientmgr.c 		if (i++ == subs->index) {
subs             1984 sound/core/seq/seq_clientmgr.c 			if (subs->type == SNDRV_SEQ_QUERY_SUBS_READ) {
subs             1986 sound/core/seq/seq_clientmgr.c 				subs->addr = s->info.dest;
subs             1989 sound/core/seq/seq_clientmgr.c 				subs->addr = s->info.sender;
subs             1991 sound/core/seq/seq_clientmgr.c 			subs->flags = s->info.flags;
subs             1992 sound/core/seq/seq_clientmgr.c 			subs->queue = s->info.queue;
subs              191 sound/core/seq/seq_ports.c 					struct snd_seq_subscribers *subs,
subs              215 sound/core/seq/seq_ports.c 		struct snd_seq_subscribers *subs;
subs              219 sound/core/seq/seq_ports.c 		subs = get_subscriber(p, is_src);
subs              221 sound/core/seq/seq_ports.c 			aport = get_client_port(&subs->info.dest, &c);
subs              223 sound/core/seq/seq_ports.c 			aport = get_client_port(&subs->info.sender, &c);
subs              224 sound/core/seq/seq_ports.c 		delete_and_unsubscribe_port(client, port, subs, is_src, false);
subs              231 sound/core/seq/seq_ports.c 			if (atomic_dec_and_test(&subs->ref_count))
subs              232 sound/core/seq/seq_ports.c 				kfree(subs);
subs              237 sound/core/seq/seq_ports.c 		delete_and_unsubscribe_port(c, aport, subs, !is_src, true);
subs              238 sound/core/seq/seq_ports.c 		kfree(subs);
subs              470 sound/core/seq/seq_ports.c 				    struct snd_seq_subscribers *subs,
subs              490 sound/core/seq/seq_ports.c 			if (match_subs_info(&subs->info, &s->info))
subs              495 sound/core/seq/seq_ports.c 	err = subscribe_port(client, port, grp, &subs->info, ack);
subs              504 sound/core/seq/seq_ports.c 		list_add_tail(&subs->src_list, &grp->list_head);
subs              506 sound/core/seq/seq_ports.c 		list_add_tail(&subs->dest_list, &grp->list_head);
subs              508 sound/core/seq/seq_ports.c 	atomic_inc(&subs->ref_count);
subs              519 sound/core/seq/seq_ports.c 					struct snd_seq_subscribers *subs,
subs              527 sound/core/seq/seq_ports.c 	list = is_src ? &subs->src_list : &subs->dest_list;
subs              537 sound/core/seq/seq_ports.c 		unsubscribe_port(client, port, grp, &subs->info, ack);
subs              549 sound/core/seq/seq_ports.c 	struct snd_seq_subscribers *subs;
subs              553 sound/core/seq/seq_ports.c 	subs = kzalloc(sizeof(*subs), GFP_KERNEL);
subs              554 sound/core/seq/seq_ports.c 	if (!subs)
subs              557 sound/core/seq/seq_ports.c 	subs->info = *info;
subs              558 sound/core/seq/seq_ports.c 	atomic_set(&subs->ref_count, 0);
subs              559 sound/core/seq/seq_ports.c 	INIT_LIST_HEAD(&subs->src_list);
subs              560 sound/core/seq/seq_ports.c 	INIT_LIST_HEAD(&subs->dest_list);
subs              564 sound/core/seq/seq_ports.c 	err = check_and_subscribe_port(src_client, src_port, subs, true,
subs              569 sound/core/seq/seq_ports.c 	err = check_and_subscribe_port(dest_client, dest_port, subs, false,
subs              578 sound/core/seq/seq_ports.c 	delete_and_unsubscribe_port(src_client, src_port, subs, true,
subs              581 sound/core/seq/seq_ports.c 	kfree(subs);
subs              594 sound/core/seq/seq_ports.c 	struct snd_seq_subscribers *subs;
subs              599 sound/core/seq/seq_ports.c 	list_for_each_entry(subs, &src->list_head, src_list) {
subs              600 sound/core/seq/seq_ports.c 		if (match_subs_info(info, &subs->info)) {
subs              601 sound/core/seq/seq_ports.c 			atomic_dec(&subs->ref_count); /* mark as not ready */
subs              610 sound/core/seq/seq_ports.c 	delete_and_unsubscribe_port(src_client, src_port, subs, true,
subs              612 sound/core/seq/seq_ports.c 	delete_and_unsubscribe_port(dest_client, dest_port, subs, false,
subs              614 sound/core/seq/seq_ports.c 	kfree(subs);
subs              622 sound/core/seq/seq_ports.c 				  struct snd_seq_port_subscribe *subs)
subs              630 sound/core/seq/seq_ports.c 			*subs = s->info;
subs              125 sound/core/seq/seq_ports.h 				  struct snd_seq_port_subscribe *subs);
subs              511 sound/drivers/vx/vx_pcm.c static int vx_pcm_playback_open(struct snd_pcm_substream *subs)
subs              513 sound/drivers/vx/vx_pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              514 sound/drivers/vx/vx_pcm.c 	struct vx_core *chip = snd_pcm_substream_chip(subs);
subs              522 sound/drivers/vx/vx_pcm.c 	audio = subs->pcm->device * 2;
subs              538 sound/drivers/vx/vx_pcm.c 	pipe->substream = subs;
subs              555 sound/drivers/vx/vx_pcm.c static int vx_pcm_playback_close(struct snd_pcm_substream *subs)
subs              557 sound/drivers/vx/vx_pcm.c 	struct vx_core *chip = snd_pcm_substream_chip(subs);
subs              560 sound/drivers/vx/vx_pcm.c 	if (! subs->runtime->private_data)
subs              563 sound/drivers/vx/vx_pcm.c 	pipe = subs->runtime->private_data;
subs              676 sound/drivers/vx/vx_pcm.c 				     struct snd_pcm_substream *subs,
subs              680 sound/drivers/vx/vx_pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              696 sound/drivers/vx/vx_pcm.c 				   struct snd_pcm_substream *subs,
subs              700 sound/drivers/vx/vx_pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              707 sound/drivers/vx/vx_pcm.c 			snd_pcm_period_elapsed(subs);
subs              715 sound/drivers/vx/vx_pcm.c static int vx_pcm_trigger(struct snd_pcm_substream *subs, int cmd)
subs              717 sound/drivers/vx/vx_pcm.c 	struct vx_core *chip = snd_pcm_substream_chip(subs);
subs              718 sound/drivers/vx/vx_pcm.c 	struct vx_pipe *pipe = subs->runtime->private_data;
subs              728 sound/drivers/vx/vx_pcm.c 			vx_pcm_playback_transfer(chip, subs, pipe, 2);
subs              768 sound/drivers/vx/vx_pcm.c static snd_pcm_uframes_t vx_pcm_playback_pointer(struct snd_pcm_substream *subs)
subs              770 sound/drivers/vx/vx_pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              778 sound/drivers/vx/vx_pcm.c static int vx_pcm_hw_params(struct snd_pcm_substream *subs,
subs              782 sound/drivers/vx/vx_pcm.c 					(subs, params_buffer_bytes(hw_params));
subs              788 sound/drivers/vx/vx_pcm.c static int vx_pcm_hw_free(struct snd_pcm_substream *subs)
subs              790 sound/drivers/vx/vx_pcm.c 	return snd_pcm_lib_free_vmalloc_buffer(subs);
subs              796 sound/drivers/vx/vx_pcm.c static int vx_pcm_prepare(struct snd_pcm_substream *subs)
subs              798 sound/drivers/vx/vx_pcm.c 	struct vx_core *chip = snd_pcm_substream_chip(subs);
subs              799 sound/drivers/vx/vx_pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              901 sound/drivers/vx/vx_pcm.c static int vx_pcm_capture_open(struct snd_pcm_substream *subs)
subs              903 sound/drivers/vx/vx_pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              904 sound/drivers/vx/vx_pcm.c 	struct vx_core *chip = snd_pcm_substream_chip(subs);
subs              913 sound/drivers/vx/vx_pcm.c 	audio = subs->pcm->device * 2;
subs              919 sound/drivers/vx/vx_pcm.c 	pipe->substream = subs;
subs              960 sound/drivers/vx/vx_pcm.c static int vx_pcm_capture_close(struct snd_pcm_substream *subs)
subs              962 sound/drivers/vx/vx_pcm.c 	struct vx_core *chip = snd_pcm_substream_chip(subs);
subs              966 sound/drivers/vx/vx_pcm.c 	if (! subs->runtime->private_data)
subs              968 sound/drivers/vx/vx_pcm.c 	pipe = subs->runtime->private_data;
subs              996 sound/drivers/vx/vx_pcm.c static void vx_pcm_capture_update(struct vx_core *chip, struct snd_pcm_substream *subs,
subs             1000 sound/drivers/vx/vx_pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs             1059 sound/drivers/vx/vx_pcm.c 		snd_pcm_period_elapsed(subs);
subs             1072 sound/drivers/vx/vx_pcm.c static snd_pcm_uframes_t vx_pcm_capture_pointer(struct snd_pcm_substream *subs)
subs             1074 sound/drivers/vx/vx_pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs               84 sound/firewire/bebob/bebob_midi.c 	struct snd_rawmidi_substream *subs;
subs               86 sound/firewire/bebob/bebob_midi.c 	list_for_each_entry(subs, &str->substreams, list) {
subs               87 sound/firewire/bebob/bebob_midi.c 		snprintf(subs->name, sizeof(subs->name),
subs               89 sound/firewire/bebob/bebob_midi.c 			 bebob->card->shortname, subs->number + 1);
subs               88 sound/firewire/dice/dice-midi.c 	struct snd_rawmidi_substream *subs;
subs               90 sound/firewire/dice/dice-midi.c 	list_for_each_entry(subs, &str->substreams, list) {
subs               91 sound/firewire/dice/dice-midi.c 		snprintf(subs->name, sizeof(subs->name),
subs               92 sound/firewire/dice/dice-midi.c 			 "%s MIDI %d", dice->card->shortname, subs->number + 1);
subs               94 sound/firewire/digi00x/digi00x-midi.c 	struct snd_rawmidi_substream *subs;
subs              101 sound/firewire/digi00x/digi00x-midi.c 		list_for_each_entry(subs, &str->substreams, list) {
subs              103 sound/firewire/digi00x/digi00x-midi.c 				snprintf(subs->name, sizeof(subs->name),
subs              106 sound/firewire/digi00x/digi00x-midi.c 					 subs->number + 1);
subs              108 sound/firewire/digi00x/digi00x-midi.c 				snprintf(subs->name, sizeof(subs->name),
subs               84 sound/firewire/fireworks/fireworks_midi.c 	struct snd_rawmidi_substream *subs;
subs               86 sound/firewire/fireworks/fireworks_midi.c 	list_for_each_entry(subs, &str->substreams, list) {
subs               87 sound/firewire/fireworks/fireworks_midi.c 		snprintf(subs->name, sizeof(subs->name),
subs               88 sound/firewire/fireworks/fireworks_midi.c 			 "%s MIDI %d", efw->card->shortname, subs->number + 1);
subs               88 sound/firewire/motu/motu-midi.c 	struct snd_rawmidi_substream *subs;
subs               90 sound/firewire/motu/motu-midi.c 	list_for_each_entry(subs, &str->substreams, list) {
subs               91 sound/firewire/motu/motu-midi.c 		snprintf(subs->name, sizeof(subs->name),
subs               92 sound/firewire/motu/motu-midi.c 			 "%s MIDI %d", motu->card->shortname, subs->number + 1);
subs              129 sound/firewire/oxfw/oxfw-midi.c 	struct snd_rawmidi_substream *subs;
subs              131 sound/firewire/oxfw/oxfw-midi.c 	list_for_each_entry(subs, &str->substreams, list) {
subs              132 sound/firewire/oxfw/oxfw-midi.c 		snprintf(subs->name, sizeof(subs->name),
subs              134 sound/firewire/oxfw/oxfw-midi.c 			 oxfw->card->shortname, subs->number + 1);
subs               87 sound/firewire/tascam/tascam-midi.c 	struct snd_rawmidi_substream *subs;
subs              107 sound/firewire/tascam/tascam-midi.c 	list_for_each_entry(subs, &stream->substreams, list) {
subs              109 sound/firewire/tascam/tascam-midi.c 		if (subs->number < tscm->spec->midi_capture_ports) {
subs              111 sound/firewire/tascam/tascam-midi.c 			snprintf(subs->name, sizeof(subs->name),
subs              113 sound/firewire/tascam/tascam-midi.c 				 tscm->card->shortname, subs->number + 1);
subs              123 sound/firewire/tascam/tascam-midi.c 	list_for_each_entry(subs, &stream->substreams, list) {
subs              124 sound/firewire/tascam/tascam-midi.c 		if (subs->number < tscm->spec->midi_playback_ports) {
subs              126 sound/firewire/tascam/tascam-midi.c 			snprintf(subs->name, sizeof(subs->name),
subs              128 sound/firewire/tascam/tascam-midi.c 				 tscm->card->shortname, subs->number + 1);
subs              216 sound/isa/sb/emu8000_pcm.c static int emu8k_pcm_open(struct snd_pcm_substream *subs)
subs              218 sound/isa/sb/emu8000_pcm.c 	struct snd_emu8000 *emu = snd_pcm_substream_chip(subs);
subs              220 sound/isa/sb/emu8000_pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              227 sound/isa/sb/emu8000_pcm.c 	rec->substream = subs;
subs              244 sound/isa/sb/emu8000_pcm.c static int emu8k_pcm_close(struct snd_pcm_substream *subs)
subs              246 sound/isa/sb/emu8000_pcm.c 	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
subs              248 sound/isa/sb/emu8000_pcm.c 	subs->runtime->private_data = NULL;
subs              373 sound/isa/sb/emu8000_pcm.c static int emu8k_pcm_trigger(struct snd_pcm_substream *subs, int cmd)
subs              375 sound/isa/sb/emu8000_pcm.c 	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
subs              451 sound/isa/sb/emu8000_pcm.c static int emu8k_pcm_copy(struct snd_pcm_substream *subs,
subs              455 sound/isa/sb/emu8000_pcm.c 	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
subs              464 sound/isa/sb/emu8000_pcm.c static int emu8k_pcm_copy_kernel(struct snd_pcm_substream *subs,
subs              468 sound/isa/sb/emu8000_pcm.c 	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
subs              478 sound/isa/sb/emu8000_pcm.c static int emu8k_pcm_silence(struct snd_pcm_substream *subs,
subs              481 sound/isa/sb/emu8000_pcm.c 	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
subs              519 sound/isa/sb/emu8000_pcm.c static int emu8k_pcm_copy(struct snd_pcm_substream *subs,
subs              523 sound/isa/sb/emu8000_pcm.c 	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
subs              526 sound/isa/sb/emu8000_pcm.c 	pos = bytes_to_frames(subs->runtime, pos);
subs              527 sound/isa/sb/emu8000_pcm.c 	count = bytes_to_frames(subs->runtime, count);
subs              532 sound/isa/sb/emu8000_pcm.c static int emu8k_pcm_copy_kernel(struct snd_pcm_substream *subs,
subs              536 sound/isa/sb/emu8000_pcm.c 	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
subs              539 sound/isa/sb/emu8000_pcm.c 	pos = bytes_to_frames(subs->runtime, pos);
subs              540 sound/isa/sb/emu8000_pcm.c 	count = bytes_to_frames(subs->runtime, count);
subs              545 sound/isa/sb/emu8000_pcm.c static int emu8k_pcm_silence(struct snd_pcm_substream *subs,
subs              548 sound/isa/sb/emu8000_pcm.c 	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
subs              551 sound/isa/sb/emu8000_pcm.c 	pos = bytes_to_frames(subs->runtime, pos);
subs              552 sound/isa/sb/emu8000_pcm.c 	count = bytes_to_frames(subs->runtime, count);
subs              562 sound/isa/sb/emu8000_pcm.c static int emu8k_pcm_hw_params(struct snd_pcm_substream *subs,
subs              565 sound/isa/sb/emu8000_pcm.c 	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
subs              579 sound/isa/sb/emu8000_pcm.c 	subs->dma_buffer.bytes = params_buffer_bytes(hw_params);
subs              587 sound/isa/sb/emu8000_pcm.c static int emu8k_pcm_hw_free(struct snd_pcm_substream *subs)
subs              589 sound/isa/sb/emu8000_pcm.c 	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
subs              605 sound/isa/sb/emu8000_pcm.c static int emu8k_pcm_prepare(struct snd_pcm_substream *subs)
subs              607 sound/isa/sb/emu8000_pcm.c 	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
subs              609 sound/isa/sb/emu8000_pcm.c 	rec->pitch = 0xe000 + calc_rate_offset(subs->runtime->rate);
subs              613 sound/isa/sb/emu8000_pcm.c 	rec->buf_size = subs->runtime->buffer_size;
subs              614 sound/isa/sb/emu8000_pcm.c 	rec->period_size = subs->runtime->period_size;
subs              615 sound/isa/sb/emu8000_pcm.c 	rec->voices = subs->runtime->channels;
subs              651 sound/isa/sb/emu8000_pcm.c static snd_pcm_uframes_t emu8k_pcm_pointer(struct snd_pcm_substream *subs)
subs              653 sound/isa/sb/emu8000_pcm.c 	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
subs             1190 sound/pci/cmipci.c static void setup_ac3(struct cmipci *cm, struct snd_pcm_substream *subs, int do_ac3, int rate)
subs             1222 sound/pci/cmipci.c 			if (snd_pcm_format_width(subs->runtime->format) > 16) {
subs             1237 sound/pci/cmipci.c static int setup_spdif_playback(struct cmipci *cm, struct snd_pcm_substream *subs, int up, int do_ac3)
subs             1241 sound/pci/cmipci.c 	rate = subs->runtime->rate;
subs             1255 sound/pci/cmipci.c 		setup_ac3(cm, subs, do_ac3, rate);
subs             1271 sound/pci/cmipci.c 		setup_ac3(cm, subs, 0, 0);
subs             1414 sound/pci/cmipci.c static int snd_cmipci_capture_spdif_hw_free(struct snd_pcm_substream *subs)
subs             1416 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(subs);
subs             1423 sound/pci/cmipci.c 	return snd_cmipci_hw_free(subs);
subs             1598 sound/pci/cmipci.c static int open_device_check(struct cmipci *cm, int mode, struct snd_pcm_substream *subs)
subs             1613 sound/pci/cmipci.c 	cm->channel[ch].substream = subs;
subs             1854 sound/pci/es1968.c 	struct snd_pcm_substream *subs = es->substream;
subs             1856 sound/pci/es1968.c 	if (subs == NULL || !es->running)
subs             1869 sound/pci/es1968.c 		snd_pcm_period_elapsed(subs);
subs             2673 sound/pci/intel8x0.c 	struct snd_pcm_substream *subs;
subs             2684 sound/pci/intel8x0.c 	subs = chip->pcm[0]->streams[0].substream;
subs             2685 sound/pci/intel8x0.c 	if (! subs || subs->dma_buffer.bytes < INTEL8X0_TESTBUF_SIZE) {
subs             2691 sound/pci/intel8x0.c 	ichdev->physbuf = subs->dma_buffer.addr;
subs             1046 sound/pci/maestro3.c 			    struct snd_pcm_substream *subs)
subs             1048 sound/pci/maestro3.c 	if (! s || ! subs)
subs             1052 sound/pci/maestro3.c 	switch (subs->stream) {
subs             1073 sound/pci/maestro3.c 			   struct snd_pcm_substream *subs)
subs             1075 sound/pci/maestro3.c 	if (! s || ! subs)
subs             1081 sound/pci/maestro3.c 	switch (subs->stream) {
subs             1097 sound/pci/maestro3.c snd_m3_pcm_trigger(struct snd_pcm_substream *subs, int cmd)
subs             1099 sound/pci/maestro3.c 	struct snd_m3 *chip = snd_pcm_substream_chip(subs);
subs             1100 sound/pci/maestro3.c 	struct m3_dma *s = subs->runtime->private_data;
subs             1114 sound/pci/maestro3.c 			err = snd_m3_pcm_start(chip, s, subs);
subs             1123 sound/pci/maestro3.c 			err = snd_m3_pcm_stop(chip, s, subs);
subs             1135 sound/pci/maestro3.c snd_m3_pcm_setup1(struct snd_m3 *chip, struct m3_dma *s, struct snd_pcm_substream *subs)
subs             1138 sound/pci/maestro3.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs             1140 sound/pci/maestro3.c 	if (subs->stream == SNDRV_PCM_STREAM_PLAYBACK) {
subs             1288 sound/pci/maestro3.c 		      struct snd_pcm_substream *subs)
subs             1307 sound/pci/maestro3.c 			  subs->runtime->rate > 45000 ? 0xff : 0);
subs             1354 sound/pci/maestro3.c snd_m3_capture_setup(struct snd_m3 *chip, struct m3_dma *s, struct snd_pcm_substream *subs)
subs             1410 sound/pci/maestro3.c snd_m3_pcm_prepare(struct snd_pcm_substream *subs)
subs             1412 sound/pci/maestro3.c 	struct snd_m3 *chip = snd_pcm_substream_chip(subs);
subs             1413 sound/pci/maestro3.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs             1428 sound/pci/maestro3.c 	snd_m3_pcm_setup1(chip, s, subs);
subs             1430 sound/pci/maestro3.c 	if (subs->stream == SNDRV_PCM_STREAM_PLAYBACK)
subs             1431 sound/pci/maestro3.c 		snd_m3_playback_setup(chip, s, subs);
subs             1433 sound/pci/maestro3.c 		snd_m3_capture_setup(chip, s, subs);
subs             1446 sound/pci/maestro3.c snd_m3_get_pointer(struct snd_m3 *chip, struct m3_dma *s, struct snd_pcm_substream *subs)
subs             1471 sound/pci/maestro3.c snd_m3_pcm_pointer(struct snd_pcm_substream *subs)
subs             1473 sound/pci/maestro3.c 	struct snd_m3 *chip = snd_pcm_substream_chip(subs);
subs             1475 sound/pci/maestro3.c 	struct m3_dma *s = subs->runtime->private_data;
subs             1481 sound/pci/maestro3.c 	ptr = snd_m3_get_pointer(chip, s, subs);
subs             1483 sound/pci/maestro3.c 	return bytes_to_frames(subs->runtime, ptr);
subs             1491 sound/pci/maestro3.c 	struct snd_pcm_substream *subs = s->substream;
subs             1498 sound/pci/maestro3.c 	hwptr = snd_m3_get_pointer(chip, s, subs);
subs             1519 sound/pci/maestro3.c 		snd_pcm_period_elapsed(subs);
subs             1716 sound/pci/maestro3.c snd_m3_substream_open(struct snd_m3 *chip, struct snd_pcm_substream *subs)
subs             1734 sound/pci/maestro3.c 	subs->runtime->private_data = s;
subs             1735 sound/pci/maestro3.c 	s->substream = subs;
subs             1738 sound/pci/maestro3.c 	if (subs->stream == SNDRV_PCM_STREAM_PLAYBACK) {
subs             1749 sound/pci/maestro3.c snd_m3_substream_close(struct snd_m3 *chip, struct snd_pcm_substream *subs)
subs             1751 sound/pci/maestro3.c 	struct m3_dma *s = subs->runtime->private_data;
subs             1771 sound/pci/maestro3.c snd_m3_playback_open(struct snd_pcm_substream *subs)
subs             1773 sound/pci/maestro3.c 	struct snd_m3 *chip = snd_pcm_substream_chip(subs);
subs             1774 sound/pci/maestro3.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs             1777 sound/pci/maestro3.c 	if ((err = snd_m3_substream_open(chip, subs)) < 0)
subs             1786 sound/pci/maestro3.c snd_m3_playback_close(struct snd_pcm_substream *subs)
subs             1788 sound/pci/maestro3.c 	struct snd_m3 *chip = snd_pcm_substream_chip(subs);
subs             1790 sound/pci/maestro3.c 	snd_m3_substream_close(chip, subs);
subs             1795 sound/pci/maestro3.c snd_m3_capture_open(struct snd_pcm_substream *subs)
subs             1797 sound/pci/maestro3.c 	struct snd_m3 *chip = snd_pcm_substream_chip(subs);
subs             1798 sound/pci/maestro3.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs             1801 sound/pci/maestro3.c 	if ((err = snd_m3_substream_open(chip, subs)) < 0)
subs             1810 sound/pci/maestro3.c snd_m3_capture_close(struct snd_pcm_substream *subs)
subs             1812 sound/pci/maestro3.c 	struct snd_m3 *chip = snd_pcm_substream_chip(subs);
subs             1814 sound/pci/maestro3.c 	snd_m3_substream_close(chip, subs);
subs              417 sound/pci/mixart/mixart.c static int snd_mixart_trigger(struct snd_pcm_substream *subs, int cmd)
subs              419 sound/pci/mixart/mixart.c 	struct mixart_stream *stream = subs->runtime->private_data;
subs              424 sound/pci/mixart/mixart.c 		dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_TRIGGER_START\n");
subs              441 sound/pci/mixart/mixart.c 		dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_TRIGGER_STOP\n");
subs              448 sound/pci/mixart/mixart.c 		dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_PAUSE_PUSH\n");
subs              453 sound/pci/mixart/mixart.c 		dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_PAUSE_RELEASE\n");
subs              478 sound/pci/mixart/mixart.c static int snd_mixart_prepare(struct snd_pcm_substream *subs)
subs              480 sound/pci/mixart/mixart.c 	struct snd_mixart *chip = snd_pcm_substream_chip(subs);
subs              481 sound/pci/mixart/mixart.c 	struct mixart_stream *stream = subs->runtime->private_data;
subs              492 sound/pci/mixart/mixart.c 		chip->mgr->sample_rate = subs->runtime->rate;
subs              496 sound/pci/mixart/mixart.c 		if( mixart_set_clock(chip->mgr, stream->pipe, subs->runtime->rate) )
subs              591 sound/pci/mixart/mixart.c static int snd_mixart_hw_params(struct snd_pcm_substream *subs,
subs              594 sound/pci/mixart/mixart.c 	struct snd_mixart *chip = snd_pcm_substream_chip(subs);
subs              596 sound/pci/mixart/mixart.c 	struct mixart_stream *stream = subs->runtime->private_data;
subs              612 sound/pci/mixart/mixart.c 		if( subs->stream == SNDRV_PCM_STREAM_PLAYBACK )
subs              613 sound/pci/mixart/mixart.c 			mixart_update_playback_stream_level(chip, is_aes, subs->number);
subs              628 sound/pci/mixart/mixart.c 	err = snd_pcm_lib_malloc_pages(subs, params_buffer_bytes(hw));
subs              632 sound/pci/mixart/mixart.c 		int i = (chip->chip_idx * MIXART_MAX_STREAM_PER_CARD) + (stream->pcm_number * (MIXART_PLAYBACK_STREAMS+MIXART_CAPTURE_STREAMS)) + subs->number;
subs              633 sound/pci/mixart/mixart.c 		if( subs->stream == SNDRV_PCM_STREAM_CAPTURE ) {
subs              638 sound/pci/mixart/mixart.c 		bufferinfo[i].buffer_address = subs->runtime->dma_addr;
subs              639 sound/pci/mixart/mixart.c 		bufferinfo[i].available_length = subs->runtime->dma_bytes;
subs              646 sound/pci/mixart/mixart.c 				subs->number);
subs              653 sound/pci/mixart/mixart.c static int snd_mixart_hw_free(struct snd_pcm_substream *subs)
subs              655 sound/pci/mixart/mixart.c 	struct snd_mixart *chip = snd_pcm_substream_chip(subs);
subs              656 sound/pci/mixart/mixart.c 	snd_pcm_lib_free_pages(subs);
subs              709 sound/pci/mixart/mixart.c static int snd_mixart_playback_open(struct snd_pcm_substream *subs)
subs              711 sound/pci/mixart/mixart.c 	struct snd_mixart            *chip = snd_pcm_substream_chip(subs);
subs              713 sound/pci/mixart/mixart.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              714 sound/pci/mixart/mixart.c 	struct snd_pcm *pcm = subs->pcm;
subs              732 sound/pci/mixart/mixart.c 		chip->chip_idx, pcm_number, subs->number);
subs              735 sound/pci/mixart/mixart.c 	stream = &(chip->playback_stream[pcm_number][subs->number]);
subs              741 sound/pci/mixart/mixart.c 			chip->chip_idx, pcm_number, subs->number);
subs              766 sound/pci/mixart/mixart.c 	stream->substream   = subs;
subs              788 sound/pci/mixart/mixart.c static int snd_mixart_capture_open(struct snd_pcm_substream *subs)
subs              790 sound/pci/mixart/mixart.c 	struct snd_mixart            *chip = snd_pcm_substream_chip(subs);
subs              792 sound/pci/mixart/mixart.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              793 sound/pci/mixart/mixart.c 	struct snd_pcm *pcm = subs->pcm;
subs              813 sound/pci/mixart/mixart.c 		chip->chip_idx, pcm_number, subs->number);
subs              822 sound/pci/mixart/mixart.c 			chip->chip_idx, pcm_number, subs->number);
subs              847 sound/pci/mixart/mixart.c 	stream->substream   = subs;
subs              870 sound/pci/mixart/mixart.c static int snd_mixart_close(struct snd_pcm_substream *subs)
subs              872 sound/pci/mixart/mixart.c 	struct snd_mixart *chip = snd_pcm_substream_chip(subs);
subs              874 sound/pci/mixart/mixart.c 	struct mixart_stream *stream = subs->runtime->private_data;
subs              879 sound/pci/mixart/mixart.c 		chip->chip_idx, stream->pcm_number, subs->number);
subs              903 sound/pci/mixart/mixart.c static snd_pcm_uframes_t snd_mixart_stream_pointer(struct snd_pcm_substream *subs)
subs              905 sound/pci/mixart/mixart.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              938 sound/pci/mixart/mixart.c 	struct snd_pcm_substream *subs;
subs              943 sound/pci/mixart/mixart.c 		for (subs = pcm->streams[stream].substream; subs; subs = subs->next, idx++)
subs              945 sound/pci/mixart/mixart.c 			subs->dma_device.id = subs->pcm->device << 16 |
subs              946 sound/pci/mixart/mixart.c 				subs->stream << 8 | (subs->number + 1) |
subs              627 sound/pci/pcxhr/pcxhr.c 	struct snd_pcm_substream *subs = stream->substream;
subs              628 sound/pci/pcxhr/pcxhr.c 	struct snd_pcxhr *chip = snd_pcm_substream_chip(subs);
subs              630 sound/pci/pcxhr/pcxhr.c 	is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE);
subs              631 sound/pci/pcxhr/pcxhr.c 	stream_num = is_capture ? 0 : subs->number;
subs              636 sound/pci/pcxhr/pcxhr.c 		chip->chip_idx, (void *)(long)subs->runtime->dma_addr,
subs              637 sound/pci/pcxhr/pcxhr.c 		subs->runtime->dma_bytes, subs->number);
subs              644 sound/pci/pcxhr/pcxhr.c 	snd_BUG_ON(subs->runtime->dma_bytes >= 0x200000);
subs              646 sound/pci/pcxhr/pcxhr.c 	rmh.cmd[1] = subs->runtime->dma_bytes * 8;
subs              648 sound/pci/pcxhr/pcxhr.c 	rmh.cmd[2] = subs->runtime->dma_addr >> 24;
subs              652 sound/pci/pcxhr/pcxhr.c 	rmh.cmd[3] = subs->runtime->dma_addr & MASK_DSP_WORD;
subs              825 sound/pci/pcxhr/pcxhr.c static int pcxhr_trigger(struct snd_pcm_substream *subs, int cmd)
subs              829 sound/pci/pcxhr/pcxhr.c 	struct snd_pcxhr *chip = snd_pcm_substream_chip(subs);
subs              834 sound/pci/pcxhr/pcxhr.c 		if (snd_pcm_stream_linked(subs)) {
subs              835 sound/pci/pcxhr/pcxhr.c 			snd_pcm_group_for_each_entry(s, subs) {
subs              841 sound/pci/pcxhr/pcxhr.c 				snd_pcm_trigger_done(s, subs);
subs              845 sound/pci/pcxhr/pcxhr.c 			stream = subs->runtime->private_data;
subs              862 sound/pci/pcxhr/pcxhr.c 		snd_pcm_group_for_each_entry(s, subs) {
subs              867 sound/pci/pcxhr/pcxhr.c 			snd_pcm_trigger_done(s, subs);
subs              901 sound/pci/pcxhr/pcxhr.c static int pcxhr_prepare(struct snd_pcm_substream *subs)
subs              903 sound/pci/pcxhr/pcxhr.c 	struct snd_pcxhr *chip = snd_pcm_substream_chip(subs);
subs              909 sound/pci/pcxhr/pcxhr.c 		    subs->runtime->period_size, subs->runtime->periods,
subs              910 sound/pci/pcxhr/pcxhr.c 		    subs->runtime->buffer_size);
subs              917 sound/pci/pcxhr/pcxhr.c 		if (mgr->sample_rate != subs->runtime->rate) {
subs              918 sound/pci/pcxhr/pcxhr.c 			err = pcxhr_set_clock(mgr, subs->runtime->rate);
subs              924 sound/pci/pcxhr/pcxhr.c 			mgr->sample_rate = subs->runtime->rate;
subs              937 sound/pci/pcxhr/pcxhr.c static int pcxhr_hw_params(struct snd_pcm_substream *subs,
subs              940 sound/pci/pcxhr/pcxhr.c 	struct snd_pcxhr *chip = snd_pcm_substream_chip(subs);
subs              942 sound/pci/pcxhr/pcxhr.c 	struct pcxhr_stream *stream = subs->runtime->private_data;
subs              959 sound/pci/pcxhr/pcxhr.c 	err = snd_pcm_lib_malloc_pages(subs, params_buffer_bytes(hw));
subs              966 sound/pci/pcxhr/pcxhr.c static int pcxhr_hw_free(struct snd_pcm_substream *subs)
subs              968 sound/pci/pcxhr/pcxhr.c 	snd_pcm_lib_free_pages(subs);
subs             1003 sound/pci/pcxhr/pcxhr.c static int pcxhr_open(struct snd_pcm_substream *subs)
subs             1005 sound/pci/pcxhr/pcxhr.c 	struct snd_pcxhr       *chip = snd_pcm_substream_chip(subs);
subs             1007 sound/pci/pcxhr/pcxhr.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs             1016 sound/pci/pcxhr/pcxhr.c 	if( subs->stream == SNDRV_PCM_STREAM_PLAYBACK ) {
subs             1018 sound/pci/pcxhr/pcxhr.c 			    chip->chip_idx, subs->number);
subs             1019 sound/pci/pcxhr/pcxhr.c 		stream = &chip->playback_stream[subs->number];
subs             1022 sound/pci/pcxhr/pcxhr.c 			    chip->chip_idx, subs->number);
subs             1027 sound/pci/pcxhr/pcxhr.c 		stream = &chip->capture_stream[subs->number];
subs             1032 sound/pci/pcxhr/pcxhr.c 			   chip->chip_idx, subs->number);
subs             1070 sound/pci/pcxhr/pcxhr.c 	stream->substream   = subs;
subs             1080 sound/pci/pcxhr/pcxhr.c 	snd_pcm_set_sync(subs);
subs             1089 sound/pci/pcxhr/pcxhr.c static int pcxhr_close(struct snd_pcm_substream *subs)
subs             1091 sound/pci/pcxhr/pcxhr.c 	struct snd_pcxhr *chip = snd_pcm_substream_chip(subs);
subs             1093 sound/pci/pcxhr/pcxhr.c 	struct pcxhr_stream *stream = subs->runtime->private_data;
subs             1098 sound/pci/pcxhr/pcxhr.c 		    chip->chip_idx, subs->number);
subs             1115 sound/pci/pcxhr/pcxhr.c static snd_pcm_uframes_t pcxhr_stream_pointer(struct snd_pcm_substream *subs)
subs             1119 sound/pci/pcxhr/pcxhr.c 	struct snd_pcxhr *chip = snd_pcm_substream_chip(subs);
subs             1120 sound/pci/pcxhr/pcxhr.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              322 sound/pci/ymfpci/ymfpci_main.c 			unsigned int subs = ypcm->substream->number;
subs              328 sound/pci/ymfpci/ymfpci_main.c 			volume = cpu_to_le32(chip->pcm_mixer[subs].left << 15);
subs              334 sound/pci/ymfpci/ymfpci_main.c 			volume = cpu_to_le32(chip->pcm_mixer[subs].right << 15);
subs             1728 sound/pci/ymfpci/ymfpci_main.c 	unsigned int subs = kcontrol->id.subdevice;
subs             1730 sound/pci/ymfpci/ymfpci_main.c 	ucontrol->value.integer.value[0] = chip->pcm_mixer[subs].left;
subs             1731 sound/pci/ymfpci/ymfpci_main.c 	ucontrol->value.integer.value[1] = chip->pcm_mixer[subs].right;
subs             1739 sound/pci/ymfpci/ymfpci_main.c 	unsigned int subs = kcontrol->id.subdevice;
subs             1743 sound/pci/ymfpci/ymfpci_main.c 	if (ucontrol->value.integer.value[0] != chip->pcm_mixer[subs].left ||
subs             1744 sound/pci/ymfpci/ymfpci_main.c 	    ucontrol->value.integer.value[1] != chip->pcm_mixer[subs].right) {
subs             1745 sound/pci/ymfpci/ymfpci_main.c 		chip->pcm_mixer[subs].left = ucontrol->value.integer.value[0];
subs             1746 sound/pci/ymfpci/ymfpci_main.c 		chip->pcm_mixer[subs].right = ucontrol->value.integer.value[1];
subs             1747 sound/pci/ymfpci/ymfpci_main.c 		if (chip->pcm_mixer[subs].left > 0x8000)
subs             1748 sound/pci/ymfpci/ymfpci_main.c 			chip->pcm_mixer[subs].left = 0x8000;
subs             1749 sound/pci/ymfpci/ymfpci_main.c 		if (chip->pcm_mixer[subs].right > 0x8000)
subs             1750 sound/pci/ymfpci/ymfpci_main.c 			chip->pcm_mixer[subs].right = 0x8000;
subs               34 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c static int pdacf_pcm_trigger(struct snd_pcm_substream *subs, int cmd)
subs               36 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c 	struct snd_pdacf *chip = snd_pcm_substream_chip(subs);
subs               37 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs               89 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c static int pdacf_pcm_hw_params(struct snd_pcm_substream *subs,
subs               93 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c 					(subs, params_buffer_bytes(hw_params));
subs               99 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c static int pdacf_pcm_hw_free(struct snd_pcm_substream *subs)
subs              101 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c 	return snd_pcm_lib_free_vmalloc_buffer(subs);
subs              107 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c static int pdacf_pcm_prepare(struct snd_pcm_substream *subs)
subs              109 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c 	struct snd_pdacf *chip = snd_pcm_substream_chip(subs);
subs              110 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              214 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c static int pdacf_pcm_capture_open(struct snd_pcm_substream *subs)
subs              216 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              217 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c 	struct snd_pdacf *chip = snd_pcm_substream_chip(subs);
subs              224 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c 	chip->pcm_substream = subs;
subs              232 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c static int pdacf_pcm_capture_close(struct snd_pcm_substream *subs)
subs              234 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c 	struct snd_pdacf *chip = snd_pcm_substream_chip(subs);
subs              247 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c static snd_pcm_uframes_t pdacf_pcm_capture_pointer(struct snd_pcm_substream *subs)
subs              249 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c 	struct snd_pdacf *chip = snd_pcm_substream_chip(subs);
subs              113 sound/ppc/pmac.c static int snd_pmac_pcm_hw_params(struct snd_pcm_substream *subs,
subs              116 sound/ppc/pmac.c 	return snd_pcm_lib_malloc_pages(subs, params_buffer_bytes(hw_params));
subs              122 sound/ppc/pmac.c static int snd_pmac_pcm_hw_free(struct snd_pcm_substream *subs)
subs              124 sound/ppc/pmac.c 	snd_pcm_lib_free_pages(subs);
subs              197 sound/ppc/pmac.c static int snd_pmac_pcm_prepare(struct snd_pmac *chip, struct pmac_stream *rec, struct snd_pcm_substream *subs)
subs              201 sound/ppc/pmac.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              206 sound/ppc/pmac.c 	rec->dma_size = snd_pcm_lib_buffer_bytes(subs);
subs              207 sound/ppc/pmac.c 	rec->period_size = snd_pcm_lib_period_bytes(subs);
subs              262 sound/ppc/pmac.c 				struct snd_pcm_substream *subs, int cmd)
subs              272 sound/ppc/pmac.c 		command = (subs->stream == SNDRV_PCM_STREAM_PLAYBACK ?
subs              310 sound/ppc/pmac.c 					      struct snd_pcm_substream *subs)
subs              326 sound/ppc/pmac.c 	return bytes_to_frames(subs->runtime, count);
subs              333 sound/ppc/pmac.c static int snd_pmac_playback_prepare(struct snd_pcm_substream *subs)
subs              335 sound/ppc/pmac.c 	struct snd_pmac *chip = snd_pcm_substream_chip(subs);
subs              336 sound/ppc/pmac.c 	return snd_pmac_pcm_prepare(chip, &chip->playback, subs);
subs              339 sound/ppc/pmac.c static int snd_pmac_playback_trigger(struct snd_pcm_substream *subs,
subs              342 sound/ppc/pmac.c 	struct snd_pmac *chip = snd_pcm_substream_chip(subs);
subs              343 sound/ppc/pmac.c 	return snd_pmac_pcm_trigger(chip, &chip->playback, subs, cmd);
subs              346 sound/ppc/pmac.c static snd_pcm_uframes_t snd_pmac_playback_pointer(struct snd_pcm_substream *subs)
subs              348 sound/ppc/pmac.c 	struct snd_pmac *chip = snd_pcm_substream_chip(subs);
subs              349 sound/ppc/pmac.c 	return snd_pmac_pcm_pointer(chip, &chip->playback, subs);
subs              357 sound/ppc/pmac.c static int snd_pmac_capture_prepare(struct snd_pcm_substream *subs)
subs              359 sound/ppc/pmac.c 	struct snd_pmac *chip = snd_pcm_substream_chip(subs);
subs              360 sound/ppc/pmac.c 	return snd_pmac_pcm_prepare(chip, &chip->capture, subs);
subs              363 sound/ppc/pmac.c static int snd_pmac_capture_trigger(struct snd_pcm_substream *subs,
subs              366 sound/ppc/pmac.c 	struct snd_pmac *chip = snd_pcm_substream_chip(subs);
subs              367 sound/ppc/pmac.c 	return snd_pmac_pcm_trigger(chip, &chip->capture, subs, cmd);
subs              370 sound/ppc/pmac.c static snd_pcm_uframes_t snd_pmac_capture_pointer(struct snd_pcm_substream *subs)
subs              372 sound/ppc/pmac.c 	struct snd_pmac *chip = snd_pcm_substream_chip(subs);
subs              373 sound/ppc/pmac.c 	return snd_pmac_pcm_pointer(chip, &chip->capture, subs);
subs              572 sound/ppc/pmac.c 			     struct snd_pcm_substream *subs)
subs              574 sound/ppc/pmac.c 	struct snd_pcm_runtime *runtime = subs->runtime;
subs              604 sound/ppc/pmac.c 	rec->substream = subs;
subs              621 sound/ppc/pmac.c 			      struct snd_pcm_substream *subs)
subs              638 sound/ppc/pmac.c static int snd_pmac_playback_open(struct snd_pcm_substream *subs)
subs              640 sound/ppc/pmac.c 	struct snd_pmac *chip = snd_pcm_substream_chip(subs);
subs              642 sound/ppc/pmac.c 	subs->runtime->hw = snd_pmac_playback;
subs              643 sound/ppc/pmac.c 	return snd_pmac_pcm_open(chip, &chip->playback, subs);
subs              646 sound/ppc/pmac.c static int snd_pmac_capture_open(struct snd_pcm_substream *subs)
subs              648 sound/ppc/pmac.c 	struct snd_pmac *chip = snd_pcm_substream_chip(subs);
subs              650 sound/ppc/pmac.c 	subs->runtime->hw = snd_pmac_capture;
subs              651 sound/ppc/pmac.c 	return snd_pmac_pcm_open(chip, &chip->capture, subs);
subs              654 sound/ppc/pmac.c static int snd_pmac_playback_close(struct snd_pcm_substream *subs)
subs              656 sound/ppc/pmac.c 	struct snd_pmac *chip = snd_pcm_substream_chip(subs);
subs              658 sound/ppc/pmac.c 	return snd_pmac_pcm_close(chip, &chip->playback, subs);
subs              661 sound/ppc/pmac.c static int snd_pmac_capture_close(struct snd_pcm_substream *subs)
subs              663 sound/ppc/pmac.c 	struct snd_pmac *chip = snd_pcm_substream_chip(subs);
subs              665 sound/ppc/pmac.c 	return snd_pmac_pcm_close(chip, &chip->capture, subs);
subs               20 sound/soc/kirkwood/kirkwood-dma.c static struct kirkwood_dma_data *kirkwood_priv(struct snd_pcm_substream *subs)
subs               22 sound/soc/kirkwood/kirkwood-dma.c 	struct snd_soc_pcm_runtime *soc_runtime = subs->private_data;
subs               80 sound/usb/caiaq/audio.c all_substreams_zero(struct snd_pcm_substream **subs)
subs               84 sound/usb/caiaq/audio.c 		if (subs[i] != NULL)
subs              341 sound/usb/caiaq/audio.c 				      struct snd_pcm_substream **subs)
subs              347 sound/usb/caiaq/audio.c 		sub = subs[stream];
subs              116 sound/usb/card.c 	struct snd_usb_substream *subs;
subs              119 sound/usb/card.c 		subs = &as->substream[idx];
subs              120 sound/usb/card.c 		if (!subs->num_formats)
subs              122 sound/usb/card.c 		subs->interface = -1;
subs              123 sound/usb/card.c 		subs->data_endpoint = NULL;
subs              124 sound/usb/card.c 		subs->sync_endpoint = NULL;
subs               46 sound/usb/card.h 	struct snd_usb_substream *subs;
subs               62 sound/usb/card.h 	void (*prepare_data_urb) (struct snd_usb_substream *subs,
subs               64 sound/usb/card.h 	void (*retire_data_urb) (struct snd_usb_substream *subs,
subs               33 sound/usb/media.c int snd_media_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm,
subs               44 sound/usb/media.c 	mdev = subs->stream->chip->media_dev;
subs               48 sound/usb/media.c 	if (subs->media_ctl)
subs              103 sound/usb/media.c 	subs->media_ctl = mctl;
subs              117 sound/usb/media.c void snd_media_stream_delete(struct snd_usb_substream *subs)
subs              119 sound/usb/media.c 	struct media_ctl *mctl = subs->media_ctl;
subs              131 sound/usb/media.c 		subs->media_ctl = NULL;
subs              135 sound/usb/media.c int snd_media_start_pipeline(struct snd_usb_substream *subs)
subs              137 sound/usb/media.c 	struct media_ctl *mctl = subs->media_ctl;
subs              151 sound/usb/media.c void snd_media_stop_pipeline(struct snd_usb_substream *subs)
subs              153 sound/usb/media.c 	struct media_ctl *mctl = subs->media_ctl;
subs               56 sound/usb/media.h int snd_media_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm,
subs               58 sound/usb/media.h void snd_media_stream_delete(struct snd_usb_substream *subs);
subs               59 sound/usb/media.h int snd_media_start_pipeline(struct snd_usb_substream *subs);
subs               60 sound/usb/media.h void snd_media_stop_pipeline(struct snd_usb_substream *subs);
subs               66 sound/usb/media.h static inline int snd_media_stream_init(struct snd_usb_substream *subs,
subs               69 sound/usb/media.h static inline void snd_media_stream_delete(struct snd_usb_substream *subs) { }
subs               70 sound/usb/media.h static inline int snd_media_start_pipeline(struct snd_usb_substream *subs)
subs               72 sound/usb/media.h static inline void snd_media_stop_pipeline(struct snd_usb_substream *subs) { }
subs              869 sound/usb/misc/ua101.c static snd_pcm_uframes_t capture_pcm_pointer(struct snd_pcm_substream *subs)
subs              871 sound/usb/misc/ua101.c 	struct ua101 *ua = subs->private_data;
subs              876 sound/usb/misc/ua101.c static snd_pcm_uframes_t playback_pcm_pointer(struct snd_pcm_substream *subs)
subs              878 sound/usb/misc/ua101.c 	struct ua101 *ua = subs->private_data;
subs               32 sound/usb/pcm.c snd_pcm_uframes_t snd_usb_pcm_delay(struct snd_usb_substream *subs,
subs               39 sound/usb/pcm.c 	if (!subs->last_delay)
subs               42 sound/usb/pcm.c 	current_frame_number = usb_get_current_frame_number(subs->dev);
subs               48 sound/usb/pcm.c 	frame_diff = (current_frame_number - subs->last_frame_number) & 0xff;
subs               53 sound/usb/pcm.c 	if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK)
subs               54 sound/usb/pcm.c 		est_delay = subs->last_delay - est_delay;
subs               56 sound/usb/pcm.c 		est_delay = subs->last_delay + est_delay;
subs               68 sound/usb/pcm.c 	struct snd_usb_substream *subs = substream->runtime->private_data;
subs               71 sound/usb/pcm.c 	if (atomic_read(&subs->stream->chip->shutdown))
subs               73 sound/usb/pcm.c 	spin_lock(&subs->lock);
subs               74 sound/usb/pcm.c 	hwptr_done = subs->hwptr_done;
subs               75 sound/usb/pcm.c 	substream->runtime->delay = snd_usb_pcm_delay(subs,
subs               77 sound/usb/pcm.c 	spin_unlock(&subs->lock);
subs               84 sound/usb/pcm.c static struct audioformat *find_format(struct snd_usb_substream *subs)
subs               90 sound/usb/pcm.c 	list_for_each_entry(fp, &subs->fmt_list, list) {
subs               91 sound/usb/pcm.c 		if (!(fp->formats & pcm_format_to_bits(subs->pcm_format)))
subs               93 sound/usb/pcm.c 		if (fp->channels != subs->channels)
subs               95 sound/usb/pcm.c 		if (subs->cur_rate < fp->rate_min ||
subs               96 sound/usb/pcm.c 		    subs->cur_rate > fp->rate_max)
subs              101 sound/usb/pcm.c 				if (fp->rate_table[i] == subs->cur_rate)
subs              119 sound/usb/pcm.c 			     subs->direction == SNDRV_PCM_STREAM_PLAYBACK) ||
subs              121 sound/usb/pcm.c 			     subs->direction == SNDRV_PCM_STREAM_CAPTURE))
subs              124 sound/usb/pcm.c 			     subs->direction == SNDRV_PCM_STREAM_PLAYBACK) ||
subs              126 sound/usb/pcm.c 			     subs->direction == SNDRV_PCM_STREAM_CAPTURE)) {
subs              211 sound/usb/pcm.c static int start_endpoints(struct snd_usb_substream *subs)
subs              215 sound/usb/pcm.c 	if (!subs->data_endpoint)
subs              218 sound/usb/pcm.c 	if (!test_and_set_bit(SUBSTREAM_FLAG_DATA_EP_STARTED, &subs->flags)) {
subs              219 sound/usb/pcm.c 		struct snd_usb_endpoint *ep = subs->data_endpoint;
subs              221 sound/usb/pcm.c 		dev_dbg(&subs->dev->dev, "Starting data EP @%p\n", ep);
subs              223 sound/usb/pcm.c 		ep->data_subs = subs;
subs              226 sound/usb/pcm.c 			clear_bit(SUBSTREAM_FLAG_DATA_EP_STARTED, &subs->flags);
subs              231 sound/usb/pcm.c 	if (subs->sync_endpoint &&
subs              232 sound/usb/pcm.c 	    !test_and_set_bit(SUBSTREAM_FLAG_SYNC_EP_STARTED, &subs->flags)) {
subs              233 sound/usb/pcm.c 		struct snd_usb_endpoint *ep = subs->sync_endpoint;
subs              235 sound/usb/pcm.c 		if (subs->data_endpoint->iface != subs->sync_endpoint->iface ||
subs              236 sound/usb/pcm.c 		    subs->data_endpoint->altsetting != subs->sync_endpoint->altsetting) {
subs              237 sound/usb/pcm.c 			err = usb_set_interface(subs->dev,
subs              238 sound/usb/pcm.c 						subs->sync_endpoint->iface,
subs              239 sound/usb/pcm.c 						subs->sync_endpoint->altsetting);
subs              241 sound/usb/pcm.c 				clear_bit(SUBSTREAM_FLAG_SYNC_EP_STARTED, &subs->flags);
subs              242 sound/usb/pcm.c 				dev_err(&subs->dev->dev,
subs              244 sound/usb/pcm.c 					   subs->sync_endpoint->iface,
subs              245 sound/usb/pcm.c 					   subs->sync_endpoint->altsetting, err);
subs              250 sound/usb/pcm.c 		dev_dbg(&subs->dev->dev, "Starting sync EP @%p\n", ep);
subs              252 sound/usb/pcm.c 		ep->sync_slave = subs->data_endpoint;
subs              255 sound/usb/pcm.c 			clear_bit(SUBSTREAM_FLAG_SYNC_EP_STARTED, &subs->flags);
subs              263 sound/usb/pcm.c static void stop_endpoints(struct snd_usb_substream *subs, bool wait)
subs              265 sound/usb/pcm.c 	if (test_and_clear_bit(SUBSTREAM_FLAG_SYNC_EP_STARTED, &subs->flags))
subs              266 sound/usb/pcm.c 		snd_usb_endpoint_stop(subs->sync_endpoint);
subs              268 sound/usb/pcm.c 	if (test_and_clear_bit(SUBSTREAM_FLAG_DATA_EP_STARTED, &subs->flags))
subs              269 sound/usb/pcm.c 		snd_usb_endpoint_stop(subs->data_endpoint);
subs              272 sound/usb/pcm.c 		snd_usb_endpoint_sync_pending_stop(subs->sync_endpoint);
subs              273 sound/usb/pcm.c 		snd_usb_endpoint_sync_pending_stop(subs->data_endpoint);
subs              309 sound/usb/pcm.c static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs,
subs              320 sound/usb/pcm.c 	if (subs->direction != SNDRV_PCM_STREAM_PLAYBACK)
subs              323 sound/usb/pcm.c 	switch (subs->stream->chip->usb_id) {
subs              364 sound/usb/pcm.c 	    USB_ID_VENDOR(subs->stream->chip->usb_id) == 0x0582 /* Roland */ &&
subs              383 sound/usb/pcm.c 	subs->sync_endpoint = snd_usb_add_endpoint(subs->stream->chip,
subs              384 sound/usb/pcm.c 						   alts, ep, !subs->direction,
subs              386 sound/usb/pcm.c 	if (!subs->sync_endpoint)
subs              389 sound/usb/pcm.c 	subs->data_endpoint->sync_master = subs->sync_endpoint;
subs              394 sound/usb/pcm.c static int set_sync_endpoint(struct snd_usb_substream *subs,
subs              400 sound/usb/pcm.c 	int is_playback = subs->direction == SNDRV_PCM_STREAM_PLAYBACK;
subs              422 sound/usb/pcm.c 		subs->sync_endpoint = NULL;
subs              423 sound/usb/pcm.c 		subs->data_endpoint->sync_master = NULL;
subs              426 sound/usb/pcm.c 	err = set_sync_ep_implicit_fb_quirk(subs, dev, altsd, attr);
subs              482 sound/usb/pcm.c 	subs->sync_endpoint = snd_usb_add_endpoint(subs->stream->chip,
subs              483 sound/usb/pcm.c 						   alts, ep, !subs->direction,
subs              487 sound/usb/pcm.c 	if (!subs->sync_endpoint) {
subs              493 sound/usb/pcm.c 	subs->data_endpoint->sync_master = subs->sync_endpoint;
subs              501 sound/usb/pcm.c static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
subs              503 sound/usb/pcm.c 	struct usb_device *dev = subs->dev;
subs              517 sound/usb/pcm.c 	if (fmt == subs->cur_audiofmt && !subs->need_setup_fmt)
subs              521 sound/usb/pcm.c 	if (subs->interface >= 0 && (subs->interface != fmt->iface || subs->need_setup_fmt)) {
subs              522 sound/usb/pcm.c 		if (!subs->stream->chip->keep_iface) {
subs              523 sound/usb/pcm.c 			err = usb_set_interface(subs->dev, subs->interface, 0);
subs              531 sound/usb/pcm.c 		subs->interface = -1;
subs              532 sound/usb/pcm.c 		subs->altset_idx = 0;
subs              535 sound/usb/pcm.c 	if (subs->need_setup_fmt)
subs              536 sound/usb/pcm.c 		subs->need_setup_fmt = false;
subs              540 sound/usb/pcm.c 		err = snd_usb_select_mode_quirk(subs, fmt);
subs              556 sound/usb/pcm.c 	subs->interface = fmt->iface;
subs              557 sound/usb/pcm.c 	subs->altset_idx = fmt->altset_idx;
subs              558 sound/usb/pcm.c 	subs->data_endpoint = snd_usb_add_endpoint(subs->stream->chip,
subs              559 sound/usb/pcm.c 						   alts, fmt->endpoint, subs->direction,
subs              562 sound/usb/pcm.c 	if (!subs->data_endpoint)
subs              565 sound/usb/pcm.c 	err = set_sync_endpoint(subs, fmt, dev, alts, altsd);
subs              569 sound/usb/pcm.c 	err = snd_usb_init_pitch(subs->stream->chip, fmt->iface, alts, fmt);
subs              573 sound/usb/pcm.c 	subs->cur_audiofmt = fmt;
subs              575 sound/usb/pcm.c 	snd_usb_set_format_quirk(subs, fmt);
subs              587 sound/usb/pcm.c static int match_endpoint_audioformats(struct snd_usb_substream *subs,
subs              596 sound/usb/pcm.c 		dev_dbg(&subs->dev->dev,
subs              602 sound/usb/pcm.c 		dev_dbg(&subs->dev->dev,
subs              615 sound/usb/pcm.c 		dev_dbg(&subs->dev->dev,
subs              624 sound/usb/pcm.c 	dev_dbg(&subs->dev->dev,
subs              633 sound/usb/pcm.c static int configure_sync_endpoint(struct snd_usb_substream *subs)
subs              639 sound/usb/pcm.c 	int sync_period_bytes = subs->period_bytes;
subs              641 sound/usb/pcm.c 		&subs->stream->substream[subs->direction ^ 1];
subs              643 sound/usb/pcm.c 	if (subs->sync_endpoint->type != SND_USB_ENDPOINT_TYPE_DATA ||
subs              644 sound/usb/pcm.c 	    !subs->stream)
subs              645 sound/usb/pcm.c 		return snd_usb_endpoint_set_params(subs->sync_endpoint,
subs              646 sound/usb/pcm.c 						   subs->pcm_format,
subs              647 sound/usb/pcm.c 						   subs->channels,
subs              648 sound/usb/pcm.c 						   subs->period_bytes,
subs              650 sound/usb/pcm.c 						   subs->cur_rate,
subs              651 sound/usb/pcm.c 						   subs->cur_audiofmt,
subs              656 sound/usb/pcm.c 		int score = match_endpoint_audioformats(subs,
subs              657 sound/usb/pcm.c 							fp, subs->cur_audiofmt,
subs              658 sound/usb/pcm.c 			subs->cur_rate, subs->pcm_format);
subs              667 sound/usb/pcm.c 		dev_err(&subs->dev->dev,
subs              677 sound/usb/pcm.c 	if (sync_fp->channels != subs->channels) {
subs              678 sound/usb/pcm.c 		sync_period_bytes = (subs->period_bytes / subs->channels) *
subs              680 sound/usb/pcm.c 		dev_dbg(&subs->dev->dev,
subs              682 sound/usb/pcm.c 			__func__, subs->period_bytes, sync_period_bytes);
subs              685 sound/usb/pcm.c 	ret = snd_usb_endpoint_set_params(subs->sync_endpoint,
subs              686 sound/usb/pcm.c 					  subs->pcm_format,
subs              690 sound/usb/pcm.c 					  subs->cur_rate,
subs              702 sound/usb/pcm.c static int configure_endpoint(struct snd_usb_substream *subs)
subs              707 sound/usb/pcm.c 	stop_endpoints(subs, true);
subs              708 sound/usb/pcm.c 	ret = snd_usb_endpoint_set_params(subs->data_endpoint,
subs              709 sound/usb/pcm.c 					  subs->pcm_format,
subs              710 sound/usb/pcm.c 					  subs->channels,
subs              711 sound/usb/pcm.c 					  subs->period_bytes,
subs              712 sound/usb/pcm.c 					  subs->period_frames,
subs              713 sound/usb/pcm.c 					  subs->buffer_periods,
subs              714 sound/usb/pcm.c 					  subs->cur_rate,
subs              715 sound/usb/pcm.c 					  subs->cur_audiofmt,
subs              716 sound/usb/pcm.c 					  subs->sync_endpoint);
subs              720 sound/usb/pcm.c 	if (subs->sync_endpoint)
subs              721 sound/usb/pcm.c 		ret = configure_sync_endpoint(subs);
subs              726 sound/usb/pcm.c static int snd_usb_pcm_change_state(struct snd_usb_substream *subs, int state)
subs              730 sound/usb/pcm.c 	if (!subs->str_pd)
subs              733 sound/usb/pcm.c 	ret = snd_usb_power_domain_set(subs->stream->chip, subs->str_pd, state);
subs              735 sound/usb/pcm.c 		dev_err(&subs->dev->dev,
subs              737 sound/usb/pcm.c 			subs->str_pd->pd_id, state, ret);
subs              787 sound/usb/pcm.c 	struct snd_usb_substream *subs = substream->runtime->private_data;
subs              791 sound/usb/pcm.c 	ret = snd_media_start_pipeline(subs);
subs              804 sound/usb/pcm.c 	subs->pcm_format = params_format(hw_params);
subs              805 sound/usb/pcm.c 	subs->period_bytes = params_period_bytes(hw_params);
subs              806 sound/usb/pcm.c 	subs->period_frames = params_period_size(hw_params);
subs              807 sound/usb/pcm.c 	subs->buffer_periods = params_periods(hw_params);
subs              808 sound/usb/pcm.c 	subs->channels = params_channels(hw_params);
subs              809 sound/usb/pcm.c 	subs->cur_rate = params_rate(hw_params);
subs              811 sound/usb/pcm.c 	fmt = find_format(subs);
subs              813 sound/usb/pcm.c 		dev_dbg(&subs->dev->dev,
subs              815 sound/usb/pcm.c 			   subs->pcm_format, subs->cur_rate, subs->channels);
subs              820 sound/usb/pcm.c 	ret = snd_usb_lock_shutdown(subs->stream->chip);
subs              824 sound/usb/pcm.c 	ret = snd_usb_pcm_change_state(subs, UAC3_PD_STATE_D0);
subs              828 sound/usb/pcm.c 	ret = set_format(subs, fmt);
subs              832 sound/usb/pcm.c 	subs->interface = fmt->iface;
subs              833 sound/usb/pcm.c 	subs->altset_idx = fmt->altset_idx;
subs              834 sound/usb/pcm.c 	subs->need_setup_ep = true;
subs              837 sound/usb/pcm.c 	snd_usb_unlock_shutdown(subs->stream->chip);
subs              843 sound/usb/pcm.c 	snd_media_stop_pipeline(subs);
subs              854 sound/usb/pcm.c 	struct snd_usb_substream *subs = substream->runtime->private_data;
subs              856 sound/usb/pcm.c 	snd_media_stop_pipeline(subs);
subs              857 sound/usb/pcm.c 	subs->cur_audiofmt = NULL;
subs              858 sound/usb/pcm.c 	subs->cur_rate = 0;
subs              859 sound/usb/pcm.c 	subs->period_bytes = 0;
subs              860 sound/usb/pcm.c 	if (!snd_usb_lock_shutdown(subs->stream->chip)) {
subs              861 sound/usb/pcm.c 		stop_endpoints(subs, true);
subs              862 sound/usb/pcm.c 		snd_usb_endpoint_deactivate(subs->sync_endpoint);
subs              863 sound/usb/pcm.c 		snd_usb_endpoint_deactivate(subs->data_endpoint);
subs              864 sound/usb/pcm.c 		snd_usb_unlock_shutdown(subs->stream->chip);
subs              881 sound/usb/pcm.c 	struct snd_usb_substream *subs = runtime->private_data;
subs              886 sound/usb/pcm.c 	if (! subs->cur_audiofmt) {
subs              887 sound/usb/pcm.c 		dev_err(&subs->dev->dev, "no format is specified!\n");
subs              891 sound/usb/pcm.c 	ret = snd_usb_lock_shutdown(subs->stream->chip);
subs              894 sound/usb/pcm.c 	if (snd_BUG_ON(!subs->data_endpoint)) {
subs              899 sound/usb/pcm.c 	snd_usb_endpoint_sync_pending_stop(subs->sync_endpoint);
subs              900 sound/usb/pcm.c 	snd_usb_endpoint_sync_pending_stop(subs->data_endpoint);
subs              902 sound/usb/pcm.c 	ret = snd_usb_pcm_change_state(subs, UAC3_PD_STATE_D0);
subs              906 sound/usb/pcm.c 	ret = set_format(subs, subs->cur_audiofmt);
subs              910 sound/usb/pcm.c 	if (subs->need_setup_ep) {
subs              912 sound/usb/pcm.c 		iface = usb_ifnum_to_if(subs->dev, subs->cur_audiofmt->iface);
subs              913 sound/usb/pcm.c 		alts = &iface->altsetting[subs->cur_audiofmt->altset_idx];
subs              914 sound/usb/pcm.c 		ret = snd_usb_init_sample_rate(subs->stream->chip,
subs              915 sound/usb/pcm.c 					       subs->cur_audiofmt->iface,
subs              917 sound/usb/pcm.c 					       subs->cur_audiofmt,
subs              918 sound/usb/pcm.c 					       subs->cur_rate);
subs              922 sound/usb/pcm.c 		ret = configure_endpoint(subs);
subs              925 sound/usb/pcm.c 		subs->need_setup_ep = false;
subs              929 sound/usb/pcm.c 	subs->data_endpoint->maxframesize =
subs              930 sound/usb/pcm.c 		bytes_to_frames(runtime, subs->data_endpoint->maxpacksize);
subs              931 sound/usb/pcm.c 	subs->data_endpoint->curframesize =
subs              932 sound/usb/pcm.c 		bytes_to_frames(runtime, subs->data_endpoint->curpacksize);
subs              935 sound/usb/pcm.c 	subs->hwptr_done = 0;
subs              936 sound/usb/pcm.c 	subs->transfer_done = 0;
subs              937 sound/usb/pcm.c 	subs->last_delay = 0;
subs              938 sound/usb/pcm.c 	subs->last_frame_number = 0;
subs              943 sound/usb/pcm.c 	if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK)
subs              944 sound/usb/pcm.c 		ret = start_endpoints(subs);
subs              947 sound/usb/pcm.c 	snd_usb_unlock_shutdown(subs->stream->chip);
subs              966 sound/usb/pcm.c static int hw_check_valid_format(struct snd_usb_substream *subs,
subs             1001 sound/usb/pcm.c 	if (subs->speed != USB_SPEED_FULL) {
subs             1014 sound/usb/pcm.c 	struct snd_usb_substream *subs = rule->private;
subs             1023 sound/usb/pcm.c 	list_for_each_entry(fp, &subs->fmt_list, list) {
subs             1024 sound/usb/pcm.c 		if (!hw_check_valid_format(subs, params, fp))
subs             1066 sound/usb/pcm.c 	struct snd_usb_substream *subs = rule->private;
subs             1075 sound/usb/pcm.c 	list_for_each_entry(fp, &subs->fmt_list, list) {
subs             1076 sound/usb/pcm.c 		if (!hw_check_valid_format(subs, params, fp))
subs             1117 sound/usb/pcm.c 	struct snd_usb_substream *subs = rule->private;
subs             1126 sound/usb/pcm.c 	list_for_each_entry(fp, &subs->fmt_list, list) {
subs             1127 sound/usb/pcm.c 		if (!hw_check_valid_format(subs, params, fp))
subs             1148 sound/usb/pcm.c 	struct snd_usb_substream *subs = rule->private;
subs             1158 sound/usb/pcm.c 	list_for_each_entry(fp, &subs->fmt_list, list) {
subs             1159 sound/usb/pcm.c 		if (!hw_check_valid_format(subs, params, fp))
subs             1187 sound/usb/pcm.c 				  struct snd_usb_substream *subs)
subs             1194 sound/usb/pcm.c 	kfree(subs->rate_list.list);
subs             1195 sound/usb/pcm.c 	subs->rate_list.list = NULL;
subs             1197 sound/usb/pcm.c 	list_for_each_entry(fp, &subs->fmt_list, list) {
subs             1207 sound/usb/pcm.c 	subs->rate_list.list = rate_list =
subs             1209 sound/usb/pcm.c 	if (!subs->rate_list.list)
subs             1211 sound/usb/pcm.c 	subs->rate_list.count = count;
subs             1212 sound/usb/pcm.c 	subs->rate_list.mask = 0;
subs             1214 sound/usb/pcm.c 	list_for_each_entry(fp, &subs->fmt_list, list) {
subs             1220 sound/usb/pcm.c 					 &subs->rate_list);
subs             1232 sound/usb/pcm.c static int setup_hw_info(struct snd_pcm_runtime *runtime, struct snd_usb_substream *subs)
subs             1239 sound/usb/pcm.c 	runtime->hw.formats = subs->formats;
subs             1248 sound/usb/pcm.c 	list_for_each_entry(fp, &subs->fmt_list, list) {
subs             1268 sound/usb/pcm.c 	if (subs->speed == USB_SPEED_FULL)
subs             1282 sound/usb/pcm.c 				  hw_rule_rate, subs,
subs             1290 sound/usb/pcm.c 				  hw_rule_channels, subs,
subs             1298 sound/usb/pcm.c 				  hw_rule_format, subs,
subs             1308 sound/usb/pcm.c 					  hw_rule_period_time, subs,
subs             1316 sound/usb/pcm.c 	err = snd_usb_pcm_check_knot(runtime, subs);
subs             1320 sound/usb/pcm.c 	return snd_usb_autoresume(subs->stream->chip);
subs             1328 sound/usb/pcm.c 	struct snd_usb_substream *subs = &as->substream[direction];
subs             1331 sound/usb/pcm.c 	subs->interface = -1;
subs             1332 sound/usb/pcm.c 	subs->altset_idx = 0;
subs             1334 sound/usb/pcm.c 	runtime->private_data = subs;
subs             1335 sound/usb/pcm.c 	subs->pcm_substream = substream;
subs             1339 sound/usb/pcm.c 	subs->dsd_dop.byte_idx = 0;
subs             1340 sound/usb/pcm.c 	subs->dsd_dop.channel = 0;
subs             1341 sound/usb/pcm.c 	subs->dsd_dop.marker = 1;
subs             1343 sound/usb/pcm.c 	ret = setup_hw_info(runtime, subs);
subs             1345 sound/usb/pcm.c 		ret = snd_media_stream_init(subs, as->pcm, direction);
subs             1347 sound/usb/pcm.c 			snd_usb_autosuspend(subs->stream->chip);
subs             1356 sound/usb/pcm.c 	struct snd_usb_substream *subs = &as->substream[direction];
subs             1359 sound/usb/pcm.c 	stop_endpoints(subs, true);
subs             1360 sound/usb/pcm.c 	snd_media_stop_pipeline(subs);
subs             1363 sound/usb/pcm.c 	    subs->interface >= 0 &&
subs             1364 sound/usb/pcm.c 	    !snd_usb_lock_shutdown(subs->stream->chip)) {
subs             1365 sound/usb/pcm.c 		usb_set_interface(subs->dev, subs->interface, 0);
subs             1366 sound/usb/pcm.c 		subs->interface = -1;
subs             1367 sound/usb/pcm.c 		ret = snd_usb_pcm_change_state(subs, UAC3_PD_STATE_D1);
subs             1368 sound/usb/pcm.c 		snd_usb_unlock_shutdown(subs->stream->chip);
subs             1373 sound/usb/pcm.c 	subs->pcm_substream = NULL;
subs             1374 sound/usb/pcm.c 	snd_usb_autosuspend(subs->stream->chip);
subs             1384 sound/usb/pcm.c static void retire_capture_urb(struct snd_usb_substream *subs,
subs             1387 sound/usb/pcm.c 	struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime;
subs             1395 sound/usb/pcm.c 	current_frame_number = usb_get_current_frame_number(subs->dev);
subs             1400 sound/usb/pcm.c 		cp = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset + subs->pkt_offset_adj;
subs             1402 sound/usb/pcm.c 			dev_dbg(&subs->dev->dev, "frame %d active: %d\n",
subs             1408 sound/usb/pcm.c 		if (!subs->txfr_quirk)
subs             1413 sound/usb/pcm.c 			dev_warn_ratelimited(&subs->dev->dev,
subs             1418 sound/usb/pcm.c 		spin_lock_irqsave(&subs->lock, flags);
subs             1419 sound/usb/pcm.c 		oldptr = subs->hwptr_done;
subs             1420 sound/usb/pcm.c 		subs->hwptr_done += bytes;
subs             1421 sound/usb/pcm.c 		if (subs->hwptr_done >= runtime->buffer_size * stride)
subs             1422 sound/usb/pcm.c 			subs->hwptr_done -= runtime->buffer_size * stride;
subs             1424 sound/usb/pcm.c 		subs->transfer_done += frames;
subs             1425 sound/usb/pcm.c 		if (subs->transfer_done >= runtime->period_size) {
subs             1426 sound/usb/pcm.c 			subs->transfer_done -= runtime->period_size;
subs             1432 sound/usb/pcm.c 		runtime->delay = subs->last_delay = 0;
subs             1435 sound/usb/pcm.c 		subs->last_frame_number = current_frame_number;
subs             1436 sound/usb/pcm.c 		subs->last_frame_number &= 0xFF; /* keep 8 LSBs */
subs             1438 sound/usb/pcm.c 		spin_unlock_irqrestore(&subs->lock, flags);
subs             1451 sound/usb/pcm.c 		snd_pcm_period_elapsed(subs->pcm_substream);
subs             1454 sound/usb/pcm.c static inline void fill_playback_urb_dsd_dop(struct snd_usb_substream *subs,
subs             1457 sound/usb/pcm.c 	struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime;
subs             1460 sound/usb/pcm.c 	unsigned int src_idx = subs->hwptr_done;
subs             1483 sound/usb/pcm.c 		if (++subs->dsd_dop.byte_idx == 3) {
subs             1485 sound/usb/pcm.c 			dst[dst_idx++] = marker[subs->dsd_dop.marker];
subs             1487 sound/usb/pcm.c 			subs->dsd_dop.byte_idx = 0;
subs             1489 sound/usb/pcm.c 			if (++subs->dsd_dop.channel % runtime->channels == 0) {
subs             1491 sound/usb/pcm.c 				subs->dsd_dop.marker++;
subs             1492 sound/usb/pcm.c 				subs->dsd_dop.marker %= ARRAY_SIZE(marker);
subs             1493 sound/usb/pcm.c 				subs->dsd_dop.channel = 0;
subs             1497 sound/usb/pcm.c 			int idx = (src_idx + subs->dsd_dop.byte_idx - 1) % wrap;
subs             1499 sound/usb/pcm.c 			if (subs->cur_audiofmt->dsd_bitrev)
subs             1504 sound/usb/pcm.c 			subs->hwptr_done++;
subs             1507 sound/usb/pcm.c 	if (subs->hwptr_done >= runtime->buffer_size * stride)
subs             1508 sound/usb/pcm.c 		subs->hwptr_done -= runtime->buffer_size * stride;
subs             1511 sound/usb/pcm.c static void copy_to_urb(struct snd_usb_substream *subs, struct urb *urb,
subs             1514 sound/usb/pcm.c 	struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime;
subs             1516 sound/usb/pcm.c 	if (subs->hwptr_done + bytes > runtime->buffer_size * stride) {
subs             1519 sound/usb/pcm.c 			runtime->buffer_size * stride - subs->hwptr_done;
subs             1521 sound/usb/pcm.c 		       runtime->dma_area + subs->hwptr_done, bytes1);
subs             1526 sound/usb/pcm.c 		       runtime->dma_area + subs->hwptr_done, bytes);
subs             1528 sound/usb/pcm.c 	subs->hwptr_done += bytes;
subs             1529 sound/usb/pcm.c 	if (subs->hwptr_done >= runtime->buffer_size * stride)
subs             1530 sound/usb/pcm.c 		subs->hwptr_done -= runtime->buffer_size * stride;
subs             1533 sound/usb/pcm.c static unsigned int copy_to_urb_quirk(struct snd_usb_substream *subs,
subs             1551 sound/usb/pcm.c 		copy_to_urb(subs, urb, offset + sizeof(packet_length),
subs             1559 sound/usb/pcm.c static void prepare_playback_urb(struct snd_usb_substream *subs,
subs             1562 sound/usb/pcm.c 	struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime;
subs             1563 sound/usb/pcm.c 	struct snd_usb_endpoint *ep = subs->data_endpoint;
subs             1573 sound/usb/pcm.c 	spin_lock_irqsave(&subs->lock, flags);
subs             1574 sound/usb/pcm.c 	subs->frame_limit += ep->max_urb_frames;
subs             1586 sound/usb/pcm.c 		subs->transfer_done += counts;
subs             1587 sound/usb/pcm.c 		if (subs->transfer_done >= runtime->period_size) {
subs             1588 sound/usb/pcm.c 			subs->transfer_done -= runtime->period_size;
subs             1589 sound/usb/pcm.c 			subs->frame_limit = 0;
subs             1591 sound/usb/pcm.c 			if (subs->fmt_type == UAC_FORMAT_TYPE_II) {
subs             1592 sound/usb/pcm.c 				if (subs->transfer_done > 0) {
subs             1595 sound/usb/pcm.c 					frames -= subs->transfer_done;
subs             1596 sound/usb/pcm.c 					counts -= subs->transfer_done;
subs             1599 sound/usb/pcm.c 					subs->transfer_done = 0;
subs             1614 sound/usb/pcm.c 				subs->transfer_done >= subs->frame_limit) &&
subs             1620 sound/usb/pcm.c 	if (unlikely(subs->pcm_format == SNDRV_PCM_FORMAT_DSD_U16_LE &&
subs             1621 sound/usb/pcm.c 		     subs->cur_audiofmt->dsd_dop)) {
subs             1622 sound/usb/pcm.c 		fill_playback_urb_dsd_dop(subs, urb, bytes);
subs             1623 sound/usb/pcm.c 	} else if (unlikely(subs->pcm_format == SNDRV_PCM_FORMAT_DSD_U8 &&
subs             1624 sound/usb/pcm.c 			   subs->cur_audiofmt->dsd_bitrev)) {
subs             1628 sound/usb/pcm.c 			int idx = (subs->hwptr_done + i)
subs             1633 sound/usb/pcm.c 		subs->hwptr_done += bytes;
subs             1634 sound/usb/pcm.c 		if (subs->hwptr_done >= runtime->buffer_size * stride)
subs             1635 sound/usb/pcm.c 			subs->hwptr_done -= runtime->buffer_size * stride;
subs             1638 sound/usb/pcm.c 		if (!subs->tx_length_quirk)
subs             1639 sound/usb/pcm.c 			copy_to_urb(subs, urb, 0, stride, bytes);
subs             1641 sound/usb/pcm.c 			bytes = copy_to_urb_quirk(subs, urb, stride, bytes);
subs             1646 sound/usb/pcm.c 	runtime->delay = subs->last_delay;
subs             1648 sound/usb/pcm.c 	subs->last_delay = runtime->delay;
subs             1651 sound/usb/pcm.c 	subs->last_frame_number = usb_get_current_frame_number(subs->dev);
subs             1652 sound/usb/pcm.c 	subs->last_frame_number &= 0xFF; /* keep 8 LSBs */
subs             1654 sound/usb/pcm.c 	if (subs->trigger_tstamp_pending_update) {
subs             1659 sound/usb/pcm.c 		subs->trigger_tstamp_pending_update = false;
subs             1662 sound/usb/pcm.c 	spin_unlock_irqrestore(&subs->lock, flags);
subs             1665 sound/usb/pcm.c 		snd_pcm_period_elapsed(subs->pcm_substream);
subs             1672 sound/usb/pcm.c static void retire_playback_urb(struct snd_usb_substream *subs,
subs             1676 sound/usb/pcm.c 	struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime;
subs             1677 sound/usb/pcm.c 	struct snd_usb_endpoint *ep = subs->data_endpoint;
subs             1687 sound/usb/pcm.c 	spin_lock_irqsave(&subs->lock, flags);
subs             1688 sound/usb/pcm.c 	if (!subs->last_delay)
subs             1691 sound/usb/pcm.c 	est_delay = snd_usb_pcm_delay(subs, runtime->rate);
subs             1693 sound/usb/pcm.c 	if (processed > subs->last_delay)
subs             1694 sound/usb/pcm.c 		subs->last_delay = 0;
subs             1696 sound/usb/pcm.c 		subs->last_delay -= processed;
subs             1697 sound/usb/pcm.c 	runtime->delay = subs->last_delay;
subs             1704 sound/usb/pcm.c 	if (abs(est_delay - subs->last_delay) * 1000 > runtime->rate * 2)
subs             1705 sound/usb/pcm.c 		dev_dbg_ratelimited(&subs->dev->dev,
subs             1707 sound/usb/pcm.c 			est_delay, subs->last_delay);
subs             1709 sound/usb/pcm.c 	if (!subs->running) {
subs             1713 sound/usb/pcm.c 		subs->last_frame_number =
subs             1714 sound/usb/pcm.c 			usb_get_current_frame_number(subs->dev) & 0xff;
subs             1718 sound/usb/pcm.c 	spin_unlock_irqrestore(&subs->lock, flags);
subs             1724 sound/usb/pcm.c 	struct snd_usb_substream *subs = substream->runtime->private_data;
subs             1728 sound/usb/pcm.c 		subs->trigger_tstamp_pending_update = true;
subs             1731 sound/usb/pcm.c 		subs->data_endpoint->prepare_data_urb = prepare_playback_urb;
subs             1732 sound/usb/pcm.c 		subs->data_endpoint->retire_data_urb = retire_playback_urb;
subs             1733 sound/usb/pcm.c 		subs->running = 1;
subs             1736 sound/usb/pcm.c 		stop_endpoints(subs, false);
subs             1737 sound/usb/pcm.c 		subs->running = 0;
subs             1740 sound/usb/pcm.c 		subs->data_endpoint->prepare_data_urb = NULL;
subs             1742 sound/usb/pcm.c 		subs->data_endpoint->retire_data_urb = retire_playback_urb;
subs             1743 sound/usb/pcm.c 		subs->running = 0;
subs             1746 sound/usb/pcm.c 		if (subs->stream->chip->setup_fmt_after_resume_quirk) {
subs             1747 sound/usb/pcm.c 			stop_endpoints(subs, true);
subs             1748 sound/usb/pcm.c 			subs->need_setup_fmt = true;
subs             1761 sound/usb/pcm.c 	struct snd_usb_substream *subs = substream->runtime->private_data;
subs             1765 sound/usb/pcm.c 		err = start_endpoints(subs);
subs             1769 sound/usb/pcm.c 		subs->data_endpoint->retire_data_urb = retire_capture_urb;
subs             1770 sound/usb/pcm.c 		subs->running = 1;
subs             1773 sound/usb/pcm.c 		stop_endpoints(subs, false);
subs             1774 sound/usb/pcm.c 		subs->running = 0;
subs             1777 sound/usb/pcm.c 		subs->data_endpoint->retire_data_urb = NULL;
subs             1778 sound/usb/pcm.c 		subs->running = 0;
subs             1781 sound/usb/pcm.c 		subs->data_endpoint->retire_data_urb = retire_capture_urb;
subs             1782 sound/usb/pcm.c 		subs->running = 1;
subs             1785 sound/usb/pcm.c 		if (subs->stream->chip->setup_fmt_after_resume_quirk) {
subs             1786 sound/usb/pcm.c 			stop_endpoints(subs, true);
subs             1787 sound/usb/pcm.c 			subs->need_setup_fmt = true;
subs             1857 sound/usb/pcm.c void snd_usb_preallocate_buffer(struct snd_usb_substream *subs)
subs             1859 sound/usb/pcm.c 	struct snd_pcm *pcm = subs->stream->pcm;
subs             1860 sound/usb/pcm.c 	struct snd_pcm_substream *s = pcm->streams[subs->direction].substream;
subs             1861 sound/usb/pcm.c 	struct device *dev = subs->dev->bus->controller;
subs                5 sound/usb/pcm.h snd_pcm_uframes_t snd_usb_pcm_delay(struct snd_usb_substream *subs,
subs               15 sound/usb/pcm.h void snd_usb_preallocate_buffer(struct snd_usb_substream *subs);
subs               60 sound/usb/proc.c static void proc_dump_substream_formats(struct snd_usb_substream *subs, struct snd_info_buffer *buffer)
subs               67 sound/usb/proc.c 	list_for_each_entry(fp, &subs->fmt_list, list) {
subs               96 sound/usb/proc.c 		if (subs->speed != USB_SPEED_FULL)
subs              105 sound/usb/proc.c static void proc_dump_ep_status(struct snd_usb_substream *subs,
subs              114 sound/usb/proc.c 		    subs->speed == USB_SPEED_FULL
subs              125 sound/usb/proc.c static void proc_dump_substream_status(struct snd_usb_substream *subs, struct snd_info_buffer *buffer)
subs              127 sound/usb/proc.c 	if (subs->running) {
subs              129 sound/usb/proc.c 		snd_iprintf(buffer, "    Interface = %d\n", subs->interface);
subs              130 sound/usb/proc.c 		snd_iprintf(buffer, "    Altset = %d\n", subs->altset_idx);
subs              131 sound/usb/proc.c 		proc_dump_ep_status(subs, subs->data_endpoint, subs->sync_endpoint, buffer);
subs             1379 sound/usb/quirks.c static void set_format_emu_quirk(struct snd_usb_substream *subs,
subs             1388 sound/usb/quirks.c 	if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK) {
subs             1389 sound/usb/quirks.c 		if (subs->stream->substream[SNDRV_PCM_STREAM_CAPTURE].interface != -1)
subs             1413 sound/usb/quirks.c 	snd_emuusb_set_samplerate(subs->stream->chip, emu_samplerate_id);
subs             1414 sound/usb/quirks.c 	subs->pkt_offset_adj = (emu_samplerate_id >= EMU_QUIRK_SR_176400HZ) ? 4 : 0;
subs             1417 sound/usb/quirks.c void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
subs             1420 sound/usb/quirks.c 	switch (subs->stream->chip->usb_id) {
subs             1425 sound/usb/quirks.c 		set_format_emu_quirk(subs, fmt);
subs             1476 sound/usb/quirks.c int snd_usb_select_mode_quirk(struct snd_usb_substream *subs,
subs             1479 sound/usb/quirks.c 	struct usb_device *dev = subs->dev;
subs             1482 sound/usb/quirks.c 	if (is_itf_usb_dsd_dac(subs->stream->chip->usb_id)) {
subs               28 sound/usb/quirks.h void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
subs               43 sound/usb/quirks.h int snd_usb_select_mode_quirk(struct snd_usb_substream *subs,
subs               42 sound/usb/stream.c static void free_substream(struct snd_usb_substream *subs)
subs               46 sound/usb/stream.c 	if (!subs->num_formats)
subs               48 sound/usb/stream.c 	list_for_each_entry_safe(fp, n, &subs->fmt_list, list)
subs               50 sound/usb/stream.c 	kfree(subs->rate_list.list);
subs               51 sound/usb/stream.c 	kfree(subs->str_pd);
subs               52 sound/usb/stream.c 	snd_media_stream_delete(subs);
subs               85 sound/usb/stream.c 	struct snd_usb_substream *subs = &as->substream[stream];
subs               87 sound/usb/stream.c 	INIT_LIST_HEAD(&subs->fmt_list);
subs               88 sound/usb/stream.c 	spin_lock_init(&subs->lock);
subs               90 sound/usb/stream.c 	subs->stream = as;
subs               91 sound/usb/stream.c 	subs->direction = stream;
subs               92 sound/usb/stream.c 	subs->dev = as->chip->dev;
subs               93 sound/usb/stream.c 	subs->txfr_quirk = as->chip->txfr_quirk;
subs               94 sound/usb/stream.c 	subs->tx_length_quirk = as->chip->tx_length_quirk;
subs               95 sound/usb/stream.c 	subs->speed = snd_usb_get_speed(subs->dev);
subs               96 sound/usb/stream.c 	subs->pkt_offset_adj = 0;
subs              100 sound/usb/stream.c 	list_add_tail(&fp->list, &subs->fmt_list);
subs              101 sound/usb/stream.c 	subs->formats |= fp->formats;
subs              102 sound/usb/stream.c 	subs->num_formats++;
subs              103 sound/usb/stream.c 	subs->fmt_type = fp->fmt_type;
subs              104 sound/usb/stream.c 	subs->ep_num = fp->endpoint;
subs              105 sound/usb/stream.c 	if (fp->channels > subs->channels_max)
subs              106 sound/usb/stream.c 		subs->channels_max = fp->channels;
subs              109 sound/usb/stream.c 		subs->str_pd = pd;
subs              111 sound/usb/stream.c 		snd_usb_power_domain_set(subs->stream->chip, pd,
subs              115 sound/usb/stream.c 	snd_usb_preallocate_buffer(subs);
subs              123 sound/usb/stream.c 	struct snd_usb_substream *subs = info->private_data;
subs              126 sound/usb/stream.c 	uinfo->count = subs->channels_max;
subs              133 sound/usb/stream.c static bool have_dup_chmap(struct snd_usb_substream *subs,
subs              138 sound/usb/stream.c 	list_for_each_entry_continue_reverse(prev, &subs->fmt_list, list) {
subs              150 sound/usb/stream.c 	struct snd_usb_substream *subs = info->private_data;
subs              161 sound/usb/stream.c 	list_for_each_entry(fp, &subs->fmt_list, list) {
subs              166 sound/usb/stream.c 		if (have_dup_chmap(subs, fp))
subs              193 sound/usb/stream.c 	struct snd_usb_substream *subs = info->private_data;
subs              199 sound/usb/stream.c 	if (subs->cur_audiofmt)
subs              200 sound/usb/stream.c 		chmap = subs->cur_audiofmt->chmap;
subs              210 sound/usb/stream.c 		     struct snd_usb_substream *subs)
subs              217 sound/usb/stream.c 	list_for_each_entry(fp, &subs->fmt_list, list)
subs              229 sound/usb/stream.c 	chmap->private_data = subs;
subs              483 sound/usb/stream.c 	struct snd_usb_substream *subs;
subs              490 sound/usb/stream.c 		subs = &as->substream[stream];
subs              491 sound/usb/stream.c 		if (subs->ep_num == fp->endpoint) {
subs              492 sound/usb/stream.c 			list_add_tail(&fp->list, &subs->fmt_list);
subs              493 sound/usb/stream.c 			subs->num_formats++;
subs              494 sound/usb/stream.c 			subs->formats |= fp->formats;
subs              502 sound/usb/stream.c 		subs = &as->substream[stream];
subs              503 sound/usb/stream.c 		if (subs->ep_num)
subs              509 sound/usb/stream.c 		return add_chmap(as->pcm, stream, subs);
subs               45 sound/usb/usx2y/usbusx2y.h 	struct snd_usX2Y_substream	*subs[4];
subs               57 sound/usb/usx2y/usbusx2yaudio.c static int usX2Y_urb_capt_retire(struct snd_usX2Y_substream *subs)
subs               59 sound/usb/usx2y/usbusx2yaudio.c 	struct urb	*urb = subs->completed_urb;
subs               60 sound/usb/usx2y/usbusx2yaudio.c 	struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime;
subs               62 sound/usb/usx2y/usbusx2yaudio.c 	int 		i, len, lens = 0, hwptr_done = subs->hwptr_done;
subs               63 sound/usb/usx2y/usbusx2yaudio.c 	struct usX2Ydev	*usX2Y = subs->usX2Y;
subs               94 sound/usb/usx2y/usbusx2yaudio.c 	subs->hwptr_done = hwptr_done;
subs               95 sound/usb/usx2y/usbusx2yaudio.c 	subs->transfer_done += lens;
subs               97 sound/usb/usx2y/usbusx2yaudio.c 	if (subs->transfer_done >= runtime->period_size) {
subs               98 sound/usb/usx2y/usbusx2yaudio.c 		subs->transfer_done -= runtime->period_size;
subs               99 sound/usb/usx2y/usbusx2yaudio.c 		snd_pcm_period_elapsed(subs->pcm_substream);
subs              113 sound/usb/usx2y/usbusx2yaudio.c static int usX2Y_urb_play_prepare(struct snd_usX2Y_substream *subs,
subs              118 sound/usb/usx2y/usbusx2yaudio.c 	struct usX2Ydev *usX2Y = subs->usX2Y;
subs              119 sound/usb/usx2y/usbusx2yaudio.c 	struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime;
subs              137 sound/usb/usx2y/usbusx2yaudio.c 	if (atomic_read(&subs->state) >= state_PRERUNNING)
subs              138 sound/usb/usx2y/usbusx2yaudio.c 		if (subs->hwptr + count > runtime->buffer_size) {
subs              143 sound/usb/usx2y/usbusx2yaudio.c 			len = runtime->buffer_size - subs->hwptr;
subs              144 sound/usb/usx2y/usbusx2yaudio.c 			urb->transfer_buffer = subs->tmpbuf;
subs              145 sound/usb/usx2y/usbusx2yaudio.c 			memcpy(subs->tmpbuf, runtime->dma_area +
subs              146 sound/usb/usx2y/usbusx2yaudio.c 			       subs->hwptr * usX2Y->stride, len * usX2Y->stride);
subs              147 sound/usb/usx2y/usbusx2yaudio.c 			memcpy(subs->tmpbuf + len * usX2Y->stride,
subs              149 sound/usb/usx2y/usbusx2yaudio.c 			subs->hwptr += count;
subs              150 sound/usb/usx2y/usbusx2yaudio.c 			subs->hwptr -= runtime->buffer_size;
subs              153 sound/usb/usx2y/usbusx2yaudio.c 			urb->transfer_buffer = runtime->dma_area + subs->hwptr * usX2Y->stride;
subs              154 sound/usb/usx2y/usbusx2yaudio.c 			if ((subs->hwptr += count) >= runtime->buffer_size)
subs              155 sound/usb/usx2y/usbusx2yaudio.c 				subs->hwptr -= runtime->buffer_size;
subs              158 sound/usb/usx2y/usbusx2yaudio.c 		urb->transfer_buffer = subs->tmpbuf;
subs              168 sound/usb/usx2y/usbusx2yaudio.c static void usX2Y_urb_play_retire(struct snd_usX2Y_substream *subs, struct urb *urb)
subs              170 sound/usb/usx2y/usbusx2yaudio.c 	struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime;
subs              171 sound/usb/usx2y/usbusx2yaudio.c 	int		len = urb->actual_length / subs->usX2Y->stride;
subs              173 sound/usb/usx2y/usbusx2yaudio.c 	subs->transfer_done += len;
subs              174 sound/usb/usx2y/usbusx2yaudio.c 	subs->hwptr_done +=  len;
subs              175 sound/usb/usx2y/usbusx2yaudio.c 	if (subs->hwptr_done >= runtime->buffer_size)
subs              176 sound/usb/usx2y/usbusx2yaudio.c 		subs->hwptr_done -= runtime->buffer_size;
subs              177 sound/usb/usx2y/usbusx2yaudio.c 	if (subs->transfer_done >= runtime->period_size) {
subs              178 sound/usb/usx2y/usbusx2yaudio.c 		subs->transfer_done -= runtime->period_size;
subs              179 sound/usb/usx2y/usbusx2yaudio.c 		snd_pcm_period_elapsed(subs->pcm_substream);
subs              183 sound/usb/usx2y/usbusx2yaudio.c static int usX2Y_urb_submit(struct snd_usX2Y_substream *subs, struct urb *urb, int frame)
subs              190 sound/usb/usx2y/usbusx2yaudio.c 	urb->dev = subs->usX2Y->dev; /* we need to set this at each time */
subs              252 sound/usb/usx2y/usbusx2yaudio.c 		struct snd_usX2Y_substream *subs = usX2Y->subs[s];
subs              253 sound/usb/usx2y/usbusx2yaudio.c 		if (subs) {
subs              254 sound/usb/usx2y/usbusx2yaudio.c 			snd_printdd("%i %p state=%i\n", s, subs, atomic_read(&subs->state));
subs              255 sound/usb/usx2y/usbusx2yaudio.c 			atomic_set(&subs->state, state_STOPPED);
subs              259 sound/usb/usx2y/usbusx2yaudio.c 		struct snd_usX2Y_substream *subs = usX2Y->subs[s];
subs              260 sound/usb/usx2y/usbusx2yaudio.c 		if (subs) {
subs              261 sound/usb/usx2y/usbusx2yaudio.c 			if (atomic_read(&subs->state) >= state_PRERUNNING)
subs              262 sound/usb/usx2y/usbusx2yaudio.c 				snd_pcm_stop_xrun(subs->pcm_substream);
subs              264 sound/usb/usx2y/usbusx2yaudio.c 				struct urb *urb = subs->urb[u];
subs              276 sound/usb/usx2y/usbusx2yaudio.c 				   struct snd_usX2Y_substream *subs, struct urb *urb)
subs              278 sound/usb/usx2y/usbusx2yaudio.c 	snd_printk(KERN_ERR "ep=%i stalled with status=%i\n", subs->endpoint, urb->status);
subs              285 sound/usb/usx2y/usbusx2yaudio.c 	struct snd_usX2Y_substream *subs = urb->context;
subs              286 sound/usb/usx2y/usbusx2yaudio.c 	struct usX2Ydev *usX2Y = subs->usX2Y;
subs              288 sound/usb/usx2y/usbusx2yaudio.c 	if (unlikely(atomic_read(&subs->state) < state_PREPARED)) {
subs              291 sound/usb/usx2y/usbusx2yaudio.c 			    subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out",
subs              296 sound/usb/usx2y/usbusx2yaudio.c 		usX2Y_error_urb_status(usX2Y, subs, urb);
subs              300 sound/usb/usx2y/usbusx2yaudio.c 	subs->completed_urb = urb;
subs              303 sound/usb/usx2y/usbusx2yaudio.c 		struct snd_usX2Y_substream *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE],
subs              304 sound/usb/usx2y/usbusx2yaudio.c 			*playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
subs              324 sound/usb/usx2y/usbusx2yaudio.c 		struct snd_usX2Y_substream *subs = usX2Y->subs[s];
subs              325 sound/usb/usx2y/usbusx2yaudio.c 		if (NULL != subs)
subs              327 sound/usb/usx2y/usbusx2yaudio.c 				struct urb * urb = subs->urb[u];
subs              342 sound/usb/usx2y/usbusx2yaudio.c 	struct snd_usX2Y_substream *subs = urb->context;
subs              343 sound/usb/usx2y/usbusx2yaudio.c 	struct usX2Ydev *usX2Y = subs->usX2Y;
subs              355 sound/usb/usx2y/usbusx2yaudio.c static void usX2Y_subs_prepare(struct snd_usX2Y_substream *subs)
subs              358 sound/usb/usx2y/usbusx2yaudio.c 		    subs, subs->endpoint, subs->urb[0], subs->urb[1]);
subs              360 sound/usb/usx2y/usbusx2yaudio.c 	subs->hwptr = 0;
subs              361 sound/usb/usx2y/usbusx2yaudio.c 	subs->hwptr_done = 0;
subs              362 sound/usb/usx2y/usbusx2yaudio.c 	subs->transfer_done = 0;
subs              379 sound/usb/usx2y/usbusx2yaudio.c static void usX2Y_urbs_release(struct snd_usX2Y_substream *subs)
subs              382 sound/usb/usx2y/usbusx2yaudio.c 	snd_printdd("usX2Y_urbs_release() %i\n", subs->endpoint);
subs              384 sound/usb/usx2y/usbusx2yaudio.c 		usX2Y_urb_release(subs->urb + i,
subs              385 sound/usb/usx2y/usbusx2yaudio.c 				  subs != subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]);
subs              387 sound/usb/usx2y/usbusx2yaudio.c 	kfree(subs->tmpbuf);
subs              388 sound/usb/usx2y/usbusx2yaudio.c 	subs->tmpbuf = NULL;
subs              393 sound/usb/usx2y/usbusx2yaudio.c static int usX2Y_urbs_allocate(struct snd_usX2Y_substream *subs)
subs              397 sound/usb/usx2y/usbusx2yaudio.c 	int is_playback = subs == subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
subs              398 sound/usb/usx2y/usbusx2yaudio.c 	struct usb_device *dev = subs->usX2Y->dev;
subs              400 sound/usb/usx2y/usbusx2yaudio.c 	pipe = is_playback ? usb_sndisocpipe(dev, subs->endpoint) :
subs              401 sound/usb/usx2y/usbusx2yaudio.c 			usb_rcvisocpipe(dev, subs->endpoint);
subs              402 sound/usb/usx2y/usbusx2yaudio.c 	subs->maxpacksize = usb_maxpacket(dev, pipe, is_playback);
subs              403 sound/usb/usx2y/usbusx2yaudio.c 	if (!subs->maxpacksize)
subs              406 sound/usb/usx2y/usbusx2yaudio.c 	if (is_playback && NULL == subs->tmpbuf) {	/* allocate a temporary buffer for playback */
subs              407 sound/usb/usx2y/usbusx2yaudio.c 		subs->tmpbuf = kcalloc(nr_of_packs(), subs->maxpacksize, GFP_KERNEL);
subs              408 sound/usb/usx2y/usbusx2yaudio.c 		if (!subs->tmpbuf)
subs              413 sound/usb/usx2y/usbusx2yaudio.c 		struct urb **purb = subs->urb + i;
subs              420 sound/usb/usx2y/usbusx2yaudio.c 			usX2Y_urbs_release(subs);
subs              426 sound/usb/usx2y/usbusx2yaudio.c 				kmalloc_array(subs->maxpacksize,
subs              429 sound/usb/usx2y/usbusx2yaudio.c 				usX2Y_urbs_release(subs);
subs              436 sound/usb/usx2y/usbusx2yaudio.c 		(*purb)->context = subs;
subs              443 sound/usb/usx2y/usbusx2yaudio.c static void usX2Y_subs_startup(struct snd_usX2Y_substream *subs)
subs              445 sound/usb/usx2y/usbusx2yaudio.c 	struct usX2Ydev *usX2Y = subs->usX2Y;
subs              446 sound/usb/usx2y/usbusx2yaudio.c 	usX2Y->prepare_subs = subs;
subs              447 sound/usb/usx2y/usbusx2yaudio.c 	subs->urb[0]->start_frame = -1;
subs              452 sound/usb/usx2y/usbusx2yaudio.c static int usX2Y_urbs_start(struct snd_usX2Y_substream *subs)
subs              455 sound/usb/usx2y/usbusx2yaudio.c 	struct usX2Ydev *usX2Y = subs->usX2Y;
subs              457 sound/usb/usx2y/usbusx2yaudio.c 	if ((err = usX2Y_urbs_allocate(subs)) < 0)
subs              459 sound/usb/usx2y/usbusx2yaudio.c 	subs->completed_urb = NULL;
subs              461 sound/usb/usx2y/usbusx2yaudio.c 		struct snd_usX2Y_substream *subs = usX2Y->subs[i];
subs              462 sound/usb/usx2y/usbusx2yaudio.c 		if (subs != NULL && atomic_read(&subs->state) >= state_PREPARED)
subs              467 sound/usb/usx2y/usbusx2yaudio.c 	usX2Y_subs_startup(subs);
subs              469 sound/usb/usx2y/usbusx2yaudio.c 		struct urb *urb = subs->urb[i];
subs              473 sound/usb/usx2y/usbusx2yaudio.c 				atomic_set(&subs->state, state_STARTING3);
subs              476 sound/usb/usx2y/usbusx2yaudio.c 				urb->iso_frame_desc[pack].offset = subs->maxpacksize * pack;
subs              477 sound/usb/usx2y/usbusx2yaudio.c 				urb->iso_frame_desc[pack].length = subs->maxpacksize;
subs              479 sound/usb/usx2y/usbusx2yaudio.c 			urb->transfer_buffer_length = subs->maxpacksize * nr_of_packs(); 
subs              489 sound/usb/usx2y/usbusx2yaudio.c 			atomic_set(&subs->state, state_STARTING1);
subs              495 sound/usb/usx2y/usbusx2yaudio.c 	if (atomic_read(&subs->state) != state_PREPARED)
subs              511 sound/usb/usx2y/usbusx2yaudio.c 	struct snd_usX2Y_substream *subs = substream->runtime->private_data;
subs              512 sound/usb/usx2y/usbusx2yaudio.c 	return subs->hwptr_done;
subs              519 sound/usb/usx2y/usbusx2yaudio.c 	struct snd_usX2Y_substream *subs = substream->runtime->private_data;
subs              524 sound/usb/usx2y/usbusx2yaudio.c 		if (atomic_read(&subs->state) == state_PREPARED &&
subs              525 sound/usb/usx2y/usbusx2yaudio.c 		    atomic_read(&subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]->state) >= state_PREPARED) {
subs              526 sound/usb/usx2y/usbusx2yaudio.c 			atomic_set(&subs->state, state_PRERUNNING);
subs              534 sound/usb/usx2y/usbusx2yaudio.c 		if (atomic_read(&subs->state) >= state_PRERUNNING)
subs              535 sound/usb/usx2y/usbusx2yaudio.c 			atomic_set(&subs->state, state_PREPARED);
subs              751 sound/usb/usx2y/usbusx2yaudio.c 		struct snd_usX2Y_substream *subs = dev->subs[i];
subs              754 sound/usb/usx2y/usbusx2yaudio.c 		if (!subs)
subs              756 sound/usb/usx2y/usbusx2yaudio.c 		test_substream = subs->pcm_substream;
subs              788 sound/usb/usx2y/usbusx2yaudio.c 	struct snd_usX2Y_substream *subs = runtime->private_data;
subs              789 sound/usb/usx2y/usbusx2yaudio.c 	mutex_lock(&subs->usX2Y->pcm_mutex);
subs              793 sound/usb/usx2y/usbusx2yaudio.c 		struct snd_usX2Y_substream *cap_subs = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE];
subs              794 sound/usb/usx2y/usbusx2yaudio.c 		atomic_set(&subs->state, state_STOPPED);
subs              795 sound/usb/usx2y/usbusx2yaudio.c 		usX2Y_urbs_release(subs);
subs              804 sound/usb/usx2y/usbusx2yaudio.c 		struct snd_usX2Y_substream *playback_subs = subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
subs              806 sound/usb/usx2y/usbusx2yaudio.c 			atomic_set(&subs->state, state_STOPPED);
subs              807 sound/usb/usx2y/usbusx2yaudio.c 			usX2Y_urbs_release(subs);
subs              810 sound/usb/usx2y/usbusx2yaudio.c 	mutex_unlock(&subs->usX2Y->pcm_mutex);
subs              821 sound/usb/usx2y/usbusx2yaudio.c 	struct snd_usX2Y_substream *subs = runtime->private_data;
subs              822 sound/usb/usx2y/usbusx2yaudio.c 	struct usX2Ydev *usX2Y = subs->usX2Y;
subs              823 sound/usb/usx2y/usbusx2yaudio.c 	struct snd_usX2Y_substream *capsubs = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE];
subs              828 sound/usb/usx2y/usbusx2yaudio.c 	usX2Y_subs_prepare(subs);
subs              838 sound/usb/usx2y/usbusx2yaudio.c 		snd_printdd("starting capture pipe for %s\n", subs == capsubs ? "self" : "playpipe");
subs              843 sound/usb/usx2y/usbusx2yaudio.c 	if (subs != capsubs && atomic_read(&subs->state) < state_PREPARED)
subs              844 sound/usb/usx2y/usbusx2yaudio.c 		err = usX2Y_urbs_start(subs);
subs              875 sound/usb/usx2y/usbusx2yaudio.c 	struct snd_usX2Y_substream	*subs = ((struct snd_usX2Y_substream **)
subs              879 sound/usb/usx2y/usbusx2yaudio.c 	if (subs->usX2Y->chip_status & USX2Y_STAT_CHIP_MMAP_PCM_URBS)
subs              883 sound/usb/usx2y/usbusx2yaudio.c 	runtime->private_data = subs;
subs              884 sound/usb/usx2y/usbusx2yaudio.c 	subs->pcm_substream = substream;
subs              894 sound/usb/usx2y/usbusx2yaudio.c 	struct snd_usX2Y_substream *subs = runtime->private_data;
subs              896 sound/usb/usx2y/usbusx2yaudio.c 	subs->pcm_substream = NULL;
subs              939 sound/usb/usx2y/usbusx2yaudio.c 		usX2Y(card)->subs + 2 * usX2Y(card)->pcm_devs;
subs               50 sound/usb/usx2y/usx2yhwdeppcm.c static int usX2Y_usbpcm_urb_capt_retire(struct snd_usX2Y_substream *subs)
subs               52 sound/usb/usx2y/usx2yhwdeppcm.c 	struct urb	*urb = subs->completed_urb;
subs               53 sound/usb/usx2y/usx2yhwdeppcm.c 	struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime;
subs               54 sound/usb/usx2y/usx2yhwdeppcm.c 	int 		i, lens = 0, hwptr_done = subs->hwptr_done;
subs               55 sound/usb/usx2y/usx2yhwdeppcm.c 	struct usX2Ydev	*usX2Y = subs->usX2Y;
subs               72 sound/usb/usx2y/usx2yhwdeppcm.c 	subs->hwptr_done = hwptr_done;
subs               73 sound/usb/usx2y/usx2yhwdeppcm.c 	subs->transfer_done += lens;
subs               75 sound/usb/usx2y/usx2yhwdeppcm.c 	if (subs->transfer_done >= runtime->period_size) {
subs               76 sound/usb/usx2y/usx2yhwdeppcm.c 		subs->transfer_done -= runtime->period_size;
subs               77 sound/usb/usx2y/usx2yhwdeppcm.c 		snd_pcm_period_elapsed(subs->pcm_substream);
subs               98 sound/usb/usx2y/usx2yhwdeppcm.c static int usX2Y_hwdep_urb_play_prepare(struct snd_usX2Y_substream *subs,
subs              102 sound/usb/usx2y/usx2yhwdeppcm.c 	struct usX2Ydev *usX2Y = subs->usX2Y;
subs              104 sound/usb/usx2y/usx2yhwdeppcm.c 	struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime;
subs              125 sound/usb/usx2y/usx2yhwdeppcm.c 		if (atomic_read(&subs->state) != state_RUNNING)
subs              137 sound/usb/usx2y/usx2yhwdeppcm.c static inline void usX2Y_usbpcm_urb_capt_iso_advance(struct snd_usX2Y_substream *subs,
subs              143 sound/usb/usx2y/usx2yhwdeppcm.c 		if (NULL != subs) {
subs              144 sound/usb/usx2y/usx2yhwdeppcm.c 			struct snd_usX2Y_hwdep_pcm_shm *shm = subs->usX2Y->hwdep_pcm_shm;
subs              220 sound/usb/usx2y/usx2yhwdeppcm.c 	struct snd_usX2Y_substream *subs = urb->context;
subs              221 sound/usb/usx2y/usx2yhwdeppcm.c 	struct usX2Ydev *usX2Y = subs->usX2Y;
subs              224 sound/usb/usx2y/usx2yhwdeppcm.c 	if (unlikely(atomic_read(&subs->state) < state_PREPARED)) {
subs              227 sound/usb/usx2y/usx2yhwdeppcm.c 			    subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out",
subs              232 sound/usb/usx2y/usx2yhwdeppcm.c 		usX2Y_error_urb_status(usX2Y, subs, urb);
subs              236 sound/usb/usx2y/usx2yhwdeppcm.c 	subs->completed_urb = urb;
subs              237 sound/usb/usx2y/usx2yhwdeppcm.c 	capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE];
subs              238 sound/usb/usx2y/usx2yhwdeppcm.c 	capsubs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2];
subs              239 sound/usb/usx2y/usx2yhwdeppcm.c 	playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
subs              263 sound/usb/usx2y/usx2yhwdeppcm.c static void usX2Y_usbpcm_urbs_release(struct snd_usX2Y_substream *subs)
subs              266 sound/usb/usx2y/usx2yhwdeppcm.c 	snd_printdd("snd_usX2Y_urbs_release() %i\n", subs->endpoint);
subs              268 sound/usb/usx2y/usx2yhwdeppcm.c 		usX2Y_hwdep_urb_release(subs->urb + i);
subs              279 sound/usb/usx2y/usx2yhwdeppcm.c 	struct snd_usX2Y_substream *subs = urb->context;
subs              280 sound/usb/usx2y/usx2yhwdeppcm.c 	struct usX2Ydev *usX2Y = subs->usX2Y;
subs              285 sound/usb/usx2y/usx2yhwdeppcm.c 		if (prepare_subs == usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]) {
subs              286 sound/usb/usx2y/usx2yhwdeppcm.c 			struct snd_usX2Y_substream *cap_subs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2];
subs              300 sound/usb/usx2y/usx2yhwdeppcm.c static int usX2Y_usbpcm_urbs_allocate(struct snd_usX2Y_substream *subs)
subs              304 sound/usb/usx2y/usx2yhwdeppcm.c 	int is_playback = subs == subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
subs              305 sound/usb/usx2y/usx2yhwdeppcm.c 	struct usb_device *dev = subs->usX2Y->dev;
subs              307 sound/usb/usx2y/usx2yhwdeppcm.c 	pipe = is_playback ? usb_sndisocpipe(dev, subs->endpoint) :
subs              308 sound/usb/usx2y/usx2yhwdeppcm.c 			usb_rcvisocpipe(dev, subs->endpoint);
subs              309 sound/usb/usx2y/usx2yhwdeppcm.c 	subs->maxpacksize = usb_maxpacket(dev, pipe, is_playback);
subs              310 sound/usb/usx2y/usx2yhwdeppcm.c 	if (!subs->maxpacksize)
subs              315 sound/usb/usx2y/usx2yhwdeppcm.c 		struct urb **purb = subs->urb + i;
subs              322 sound/usb/usx2y/usx2yhwdeppcm.c 			usX2Y_usbpcm_urbs_release(subs);
subs              326 sound/usb/usx2y/usx2yhwdeppcm.c 			subs->usX2Y->hwdep_pcm_shm->playback : (
subs              327 sound/usb/usx2y/usx2yhwdeppcm.c 				subs->endpoint == 0x8 ?
subs              328 sound/usb/usx2y/usx2yhwdeppcm.c 				subs->usX2Y->hwdep_pcm_shm->capture0x8 :
subs              329 sound/usb/usx2y/usx2yhwdeppcm.c 				subs->usX2Y->hwdep_pcm_shm->capture0xA);
subs              334 sound/usb/usx2y/usx2yhwdeppcm.c 		(*purb)->context = subs;
subs              347 sound/usb/usx2y/usx2yhwdeppcm.c 	struct snd_usX2Y_substream *subs = runtime->private_data,
subs              348 sound/usb/usx2y/usx2yhwdeppcm.c 		*cap_subs2 = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2];
subs              349 sound/usb/usx2y/usx2yhwdeppcm.c 	mutex_lock(&subs->usX2Y->pcm_mutex);
subs              353 sound/usb/usx2y/usx2yhwdeppcm.c 		struct snd_usX2Y_substream *cap_subs = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE];
subs              354 sound/usb/usx2y/usx2yhwdeppcm.c 		atomic_set(&subs->state, state_STOPPED);
subs              355 sound/usb/usx2y/usx2yhwdeppcm.c 		usX2Y_usbpcm_urbs_release(subs);
subs              368 sound/usb/usx2y/usx2yhwdeppcm.c 		struct snd_usX2Y_substream *playback_subs = subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
subs              370 sound/usb/usx2y/usx2yhwdeppcm.c 			atomic_set(&subs->state, state_STOPPED);
subs              373 sound/usb/usx2y/usx2yhwdeppcm.c 			usX2Y_usbpcm_urbs_release(subs);
subs              378 sound/usb/usx2y/usx2yhwdeppcm.c 	mutex_unlock(&subs->usX2Y->pcm_mutex);
subs              382 sound/usb/usx2y/usx2yhwdeppcm.c static void usX2Y_usbpcm_subs_startup(struct snd_usX2Y_substream *subs)
subs              384 sound/usb/usx2y/usx2yhwdeppcm.c 	struct usX2Ydev * usX2Y = subs->usX2Y;
subs              385 sound/usb/usx2y/usx2yhwdeppcm.c 	usX2Y->prepare_subs = subs;
subs              386 sound/usb/usx2y/usx2yhwdeppcm.c 	subs->urb[0]->start_frame = -1;
subs              391 sound/usb/usx2y/usx2yhwdeppcm.c static int usX2Y_usbpcm_urbs_start(struct snd_usX2Y_substream *subs)
subs              394 sound/usb/usx2y/usx2yhwdeppcm.c 		stream = subs->pcm_substream->stream;
subs              395 sound/usb/usx2y/usx2yhwdeppcm.c 	struct usX2Ydev *usX2Y = subs->usX2Y;
subs              403 sound/usb/usx2y/usx2yhwdeppcm.c 		struct snd_usX2Y_substream *subs = usX2Y->subs[stream + p];
subs              404 sound/usb/usx2y/usx2yhwdeppcm.c 		if (subs != NULL) {
subs              405 sound/usb/usx2y/usx2yhwdeppcm.c 			if ((err = usX2Y_usbpcm_urbs_allocate(subs)) < 0)
subs              407 sound/usb/usx2y/usx2yhwdeppcm.c 			subs->completed_urb = NULL;
subs              412 sound/usb/usx2y/usx2yhwdeppcm.c 		struct snd_usX2Y_substream *subs = usX2Y->subs[p];
subs              413 sound/usb/usx2y/usx2yhwdeppcm.c 		if (subs != NULL && atomic_read(&subs->state) >= state_PREPARED)
subs              418 sound/usb/usx2y/usx2yhwdeppcm.c 	usX2Y_usbpcm_subs_startup(subs);
subs              421 sound/usb/usx2y/usx2yhwdeppcm.c 			struct snd_usX2Y_substream *subs = usX2Y->subs[stream + p];
subs              422 sound/usb/usx2y/usx2yhwdeppcm.c 			if (subs != NULL) {
subs              423 sound/usb/usx2y/usx2yhwdeppcm.c 				struct urb *urb = subs->urb[u];
subs              427 sound/usb/usx2y/usx2yhwdeppcm.c 						atomic_set(&subs->state, state_STARTING3);
subs              430 sound/usb/usx2y/usx2yhwdeppcm.c 						urb->iso_frame_desc[pack].offset = subs->maxpacksize * (pack + u * nr_of_packs());
subs              431 sound/usb/usx2y/usx2yhwdeppcm.c 						urb->iso_frame_desc[pack].length = subs->maxpacksize;
subs              433 sound/usb/usx2y/usx2yhwdeppcm.c 					urb->transfer_buffer_length = subs->maxpacksize * nr_of_packs(); 
subs              445 sound/usb/usx2y/usx2yhwdeppcm.c 					atomic_set(&subs->state, state_STARTING1);
subs              453 sound/usb/usx2y/usx2yhwdeppcm.c 	if (atomic_read(&subs->state) != state_PREPARED)
subs              472 sound/usb/usx2y/usx2yhwdeppcm.c 	struct snd_usX2Y_substream *subs = runtime->private_data;
subs              473 sound/usb/usx2y/usx2yhwdeppcm.c 	struct usX2Ydev *usX2Y = subs->usX2Y;
subs              474 sound/usb/usx2y/usx2yhwdeppcm.c 	struct snd_usX2Y_substream *capsubs = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE];
subs              487 sound/usb/usx2y/usx2yhwdeppcm.c 	usX2Y_subs_prepare(subs);
subs              497 sound/usb/usx2y/usx2yhwdeppcm.c 		snd_printdd("starting capture pipe for %s\n", subs == capsubs ?
subs              503 sound/usb/usx2y/usx2yhwdeppcm.c 	if (subs != capsubs) {
subs              505 sound/usb/usx2y/usx2yhwdeppcm.c 		if (atomic_read(&subs->state) < state_PREPARED) {
subs              517 sound/usb/usx2y/usx2yhwdeppcm.c 			if (0 > (err = usX2Y_usbpcm_urbs_start(subs)))
subs              554 sound/usb/usx2y/usx2yhwdeppcm.c 	struct snd_usX2Y_substream	*subs = ((struct snd_usX2Y_substream **)
subs              558 sound/usb/usx2y/usx2yhwdeppcm.c 	if (!(subs->usX2Y->chip_status & USX2Y_STAT_CHIP_MMAP_PCM_URBS))
subs              562 sound/usb/usx2y/usx2yhwdeppcm.c 		(subs->usX2Y->subs[3] ? snd_usX2Y_4c : snd_usX2Y_2c);
subs              563 sound/usb/usx2y/usx2yhwdeppcm.c 	runtime->private_data = subs;
subs              564 sound/usb/usx2y/usx2yhwdeppcm.c 	subs->pcm_substream = substream;
subs              573 sound/usb/usx2y/usx2yhwdeppcm.c 	struct snd_usX2Y_substream *subs = runtime->private_data;
subs              575 sound/usb/usx2y/usx2yhwdeppcm.c 	subs->pcm_substream = NULL;
subs              599 sound/usb/usx2y/usx2yhwdeppcm.c 		struct snd_usX2Y_substream *subs = dev->subs[i];
subs              600 sound/usb/usx2y/usx2yhwdeppcm.c 		if (subs && subs->pcm_substream &&
subs              601 sound/usb/usx2y/usx2yhwdeppcm.c 		    SUBSTREAM_BUSY(subs->pcm_substream))
subs              725 sound/usb/usx2y/usx2yhwdeppcm.c 	pcm->private_data = usX2Y(card)->subs;