azx_dev           368 sound/pci/hda/hda_intel.c 	struct azx_dev *azx_dev;
azx_dev           797 sound/pci/hda/hda_intel.c 		struct azx_dev *azx_dev = &chip->azx_dev[i];
azx_dev           798 sound/pci/hda/hda_intel.c 		azx_sd_writeb(azx_dev, SD_CTL,
azx_dev           799 sound/pci/hda/hda_intel.c 			      azx_sd_readb(azx_dev, SD_CTL) & ~SD_INT_MASK);
azx_dev           817 sound/pci/hda/hda_intel.c 		struct azx_dev *azx_dev = &chip->azx_dev[i];
azx_dev           818 sound/pci/hda/hda_intel.c 		azx_sd_writeb(azx_dev, SD_STS, SD_INT_MASK);
azx_dev           837 sound/pci/hda/hda_intel.c 	azx_dev->insufficient = 1;
azx_dev           841 sound/pci/hda/hda_intel.c 		   azx_readb(chip, INTCTL) | (1 << azx_dev->index));
azx_dev           843 sound/pci/hda/hda_intel.c 	azx_sd_writeb(azx_dev, SD_CTL, azx_sd_readb(azx_dev, SD_CTL) |
azx_dev           851 sound/pci/hda/hda_intel.c 	azx_sd_writeb(azx_dev, SD_CTL, azx_sd_readb(azx_dev, SD_CTL) &
azx_dev           853 sound/pci/hda/hda_intel.c 	azx_sd_writeb(azx_dev, SD_STS, SD_INT_MASK); /* to be sure */
azx_dev           856 sound/pci/hda/hda_intel.c 		   azx_readb(chip, INTCTL) & ~(1 << azx_dev->index));
azx_dev           956 sound/pci/hda/hda_intel.c 	struct azx_dev *azx_dev;
azx_dev           969 sound/pci/hda/hda_intel.c 		azx_dev = &chip->azx_dev[i];
azx_dev           970 sound/pci/hda/hda_intel.c 		if (status & azx_dev->sd_int_sta_mask) {
azx_dev           971 sound/pci/hda/hda_intel.c 			azx_sd_writeb(azx_dev, SD_STS, SD_INT_MASK);
azx_dev           972 sound/pci/hda/hda_intel.c 			if (!azx_dev->substream || !azx_dev->running)
azx_dev           975 sound/pci/hda/hda_intel.c 			if (azx_dev->irq_ignore) {
azx_dev           976 sound/pci/hda/hda_intel.c 				azx_dev->irq_ignore = 0;
azx_dev           980 sound/pci/hda/hda_intel.c 			if (azx_position_ok(chip, azx_dev)) {
azx_dev           981 sound/pci/hda/hda_intel.c 				azx_dev->irq_pending = 0;
azx_dev           983 sound/pci/hda/hda_intel.c 				snd_pcm_period_elapsed(azx_dev->substream);
azx_dev           987 sound/pci/hda/hda_intel.c 				azx_dev->irq_pending = 1;
azx_dev          1025 sound/pci/hda/hda_intel.c 		if (azx_dev->frags >= AZX_MAX_BDL_ENTRIES)
azx_dev          1041 sound/pci/hda/hda_intel.c 		azx_dev->frags++;
azx_dev          1060 sound/pci/hda/hda_intel.c 	azx_sd_writel(azx_dev, SD_BDLPL, 0);
azx_dev          1061 sound/pci/hda/hda_intel.c 	azx_sd_writel(azx_dev, SD_BDLPU, 0);
azx_dev          1064 sound/pci/hda/hda_intel.c 	azx_dev->period_bytes = period_bytes;
azx_dev          1065 sound/pci/hda/hda_intel.c 	periods = azx_dev->bufsize / period_bytes;
azx_dev          1068 sound/pci/hda/hda_intel.c 	bdl = (u32 *)azx_dev->bdl.area;
azx_dev          1070 sound/pci/hda/hda_intel.c 	azx_dev->frags = 0;
azx_dev          1071 sound/pci/hda/hda_intel.c 	azx_dev->irq_ignore = 0;
azx_dev          1088 sound/pci/hda/hda_intel.c 			ofs = setup_bdle(substream, azx_dev,
azx_dev          1092 sound/pci/hda/hda_intel.c 			azx_dev->irq_ignore = 1;
azx_dev          1098 sound/pci/hda/hda_intel.c 			ofs = setup_bdle(substream, azx_dev, &bdl, ofs,
azx_dev          1101 sound/pci/hda/hda_intel.c 			ofs = setup_bdle(substream, azx_dev, &bdl, ofs,
azx_dev          1110 sound/pci/hda/hda_intel.c 		   azx_dev->bufsize, period_bytes);
azx_dev          1112 sound/pci/hda/hda_intel.c 	azx_sd_writel(azx_dev, SD_BDLPL, 0);
azx_dev          1113 sound/pci/hda/hda_intel.c 	azx_sd_writel(azx_dev, SD_BDLPU, 0);
azx_dev          1126 sound/pci/hda/hda_intel.c 	azx_sd_writeb(azx_dev, SD_CTL, azx_sd_readb(azx_dev, SD_CTL) &
azx_dev          1129 sound/pci/hda/hda_intel.c 	azx_sd_writeb(azx_dev, SD_CTL, azx_sd_readb(azx_dev, SD_CTL) |
azx_dev          1133 sound/pci/hda/hda_intel.c 	while (!((val = azx_sd_readb(azx_dev, SD_CTL)) & SD_CTL_STREAM_RESET) &&
azx_dev          1137 sound/pci/hda/hda_intel.c 	azx_sd_writeb(azx_dev, SD_CTL, val);
azx_dev          1142 sound/pci/hda/hda_intel.c 	while (((val = azx_sd_readb(azx_dev, SD_CTL)) & SD_CTL_STREAM_RESET) &&
azx_dev          1147 sound/pci/hda/hda_intel.c 	azx_sd_writel(azx_dev, SD_CTL,
azx_dev          1148 sound/pci/hda/hda_intel.c 		      (azx_sd_readl(azx_dev, SD_CTL) & ~SD_CTL_STREAM_TAG_MASK)|
azx_dev          1149 sound/pci/hda/hda_intel.c 		      (azx_dev->stream_tag << SD_CTL_STREAM_TAG_SHIFT));
azx_dev          1152 sound/pci/hda/hda_intel.c 	azx_sd_writel(azx_dev, SD_CBL, azx_dev->bufsize);
azx_dev          1156 sound/pci/hda/hda_intel.c 	azx_sd_writew(azx_dev, SD_FORMAT, azx_dev->format_val);
azx_dev          1159 sound/pci/hda/hda_intel.c 	azx_sd_writew(azx_dev, SD_LVI, azx_dev->frags - 1);
azx_dev          1163 sound/pci/hda/hda_intel.c 	azx_sd_writel(azx_dev, SD_BDLPL, (u32)azx_dev->bdl.addr);
azx_dev          1165 sound/pci/hda/hda_intel.c 	azx_sd_writel(azx_dev, SD_BDLPU, upper_32_bits(azx_dev->bdl.addr));
azx_dev          1177 sound/pci/hda/hda_intel.c 	azx_sd_writel(azx_dev, SD_CTL,
azx_dev          1178 sound/pci/hda/hda_intel.c 		      azx_sd_readl(azx_dev, SD_CTL) | SD_INT_MASK);
azx_dev          1269 sound/pci/hda/hda_intel.c static inline struct azx_dev *azx_assign_device(struct azx *chip, int stream)
azx_dev          1280 sound/pci/hda/hda_intel.c 		if (!chip->azx_dev[dev].opened) {
azx_dev          1281 sound/pci/hda/hda_intel.c 			chip->azx_dev[dev].opened = 1;
azx_dev          1282 sound/pci/hda/hda_intel.c 			return &chip->azx_dev[dev];
azx_dev          1290 sound/pci/hda/hda_intel.c 	azx_dev->opened = 0;
azx_dev          1327 sound/pci/hda/hda_intel.c 	struct azx_dev *azx_dev;
azx_dev          1333 sound/pci/hda/hda_intel.c 	azx_dev = azx_assign_device(chip, substream->stream);
azx_dev          1334 sound/pci/hda/hda_intel.c 	if (azx_dev == NULL) {
azx_dev          1352 sound/pci/hda/hda_intel.c 		azx_release_device(azx_dev);
azx_dev          1358 sound/pci/hda/hda_intel.c 	azx_dev->substream = substream;
azx_dev          1359 sound/pci/hda/hda_intel.c 	azx_dev->running = 0;
azx_dev          1362 sound/pci/hda/hda_intel.c 	runtime->private_data = azx_dev;
azx_dev          1373 sound/pci/hda/hda_intel.c 	struct azx_dev *azx_dev = get_azx_dev(substream);
azx_dev          1378 sound/pci/hda/hda_intel.c 	azx_dev->substream = NULL;
azx_dev          1379 sound/pci/hda/hda_intel.c 	azx_dev->running = 0;
azx_dev          1381 sound/pci/hda/hda_intel.c 	azx_release_device(azx_dev);
azx_dev          1398 sound/pci/hda/hda_intel.c 	struct azx_dev *azx_dev = get_azx_dev(substream);
azx_dev          1402 sound/pci/hda/hda_intel.c 	azx_sd_writel(azx_dev, SD_BDLPL, 0);
azx_dev          1403 sound/pci/hda/hda_intel.c 	azx_sd_writel(azx_dev, SD_BDLPU, 0);
azx_dev          1404 sound/pci/hda/hda_intel.c 	azx_sd_writel(azx_dev, SD_CTL, 0);
azx_dev          1415 sound/pci/hda/hda_intel.c 	struct azx_dev *azx_dev = get_azx_dev(substream);
azx_dev          1419 sound/pci/hda/hda_intel.c 	azx_dev->bufsize = snd_pcm_lib_buffer_bytes(substream);
azx_dev          1420 sound/pci/hda/hda_intel.c 	azx_dev->format_val = snd_hda_calc_stream_format(runtime->rate,
azx_dev          1424 sound/pci/hda/hda_intel.c 	if (!azx_dev->format_val) {
azx_dev          1432 sound/pci/hda/hda_intel.c 		    azx_dev->bufsize, azx_dev->format_val);
azx_dev          1433 sound/pci/hda/hda_intel.c 	if (azx_setup_periods(chip, substream, azx_dev) < 0)
azx_dev          1435 sound/pci/hda/hda_intel.c 	azx_setup_controller(chip, azx_dev);
azx_dev          1437 sound/pci/hda/hda_intel.c 		azx_dev->fifo_size = azx_sd_readw(azx_dev, SD_FIFOSIZE) + 1;
azx_dev          1439 sound/pci/hda/hda_intel.c 		azx_dev->fifo_size = 0;
azx_dev          1441 sound/pci/hda/hda_intel.c 	return hinfo->ops.prepare(hinfo, apcm->codec, azx_dev->stream_tag,
azx_dev          1442 sound/pci/hda/hda_intel.c 				  azx_dev->format_val, substream);
azx_dev          1449 sound/pci/hda/hda_intel.c 	struct azx_dev *azx_dev;
azx_dev          1472 sound/pci/hda/hda_intel.c 		azx_dev = get_azx_dev(s);
azx_dev          1473 sound/pci/hda/hda_intel.c 		sbits |= 1 << azx_dev->index;
azx_dev          1486 sound/pci/hda/hda_intel.c 		azx_dev = get_azx_dev(s);
azx_dev          1488 sound/pci/hda/hda_intel.c 			azx_stream_start(chip, azx_dev);
azx_dev          1490 sound/pci/hda/hda_intel.c 			azx_stream_stop(chip, azx_dev);
azx_dev          1491 sound/pci/hda/hda_intel.c 		azx_dev->running = start;
azx_dev          1503 sound/pci/hda/hda_intel.c 				azx_dev = get_azx_dev(s);
azx_dev          1504 sound/pci/hda/hda_intel.c 				if (!(azx_sd_readb(azx_dev, SD_STS) &
azx_dev          1519 sound/pci/hda/hda_intel.c 				azx_dev = get_azx_dev(s);
azx_dev          1520 sound/pci/hda/hda_intel.c 				if (azx_sd_readb(azx_dev, SD_CTL) &
azx_dev          1546 sound/pci/hda/hda_intel.c 	link_pos = azx_sd_readl(azx_dev, SD_LPIB);
azx_dev          1547 sound/pci/hda/hda_intel.c 	if (azx_dev->index >= 4) {
azx_dev          1556 sound/pci/hda/hda_intel.c 	mod_dma_pos = le32_to_cpu(*azx_dev->posbuf);
azx_dev          1557 sound/pci/hda/hda_intel.c 	mod_dma_pos %= azx_dev->period_bytes;
azx_dev          1564 sound/pci/hda/hda_intel.c 	if (azx_dev->insufficient) {
azx_dev          1569 sound/pci/hda/hda_intel.c 		azx_dev->insufficient = 0;
azx_dev          1573 sound/pci/hda/hda_intel.c 		mini_pos = azx_dev->bufsize + link_pos - fifo_size;
azx_dev          1578 sound/pci/hda/hda_intel.c 	mod_mini_pos = mini_pos % azx_dev->period_bytes;
azx_dev          1579 sound/pci/hda/hda_intel.c 	mod_link_pos = link_pos % azx_dev->period_bytes;
azx_dev          1585 sound/pci/hda/hda_intel.c 		bound_pos = mini_pos - mod_mini_pos + azx_dev->period_bytes;
azx_dev          1586 sound/pci/hda/hda_intel.c 		if (bound_pos >= azx_dev->bufsize)
azx_dev          1600 sound/pci/hda/hda_intel.c 		pos = azx_via_get_position(chip, azx_dev);
azx_dev          1604 sound/pci/hda/hda_intel.c 		pos = le32_to_cpu(*azx_dev->posbuf);
azx_dev          1607 sound/pci/hda/hda_intel.c 		pos = azx_sd_readl(azx_dev, SD_LPIB);
azx_dev          1609 sound/pci/hda/hda_intel.c 	if (pos >= azx_dev->bufsize)
azx_dev          1618 sound/pci/hda/hda_intel.c 	struct azx_dev *azx_dev = get_azx_dev(substream);
azx_dev          1620 sound/pci/hda/hda_intel.c 			       azx_get_position(chip, azx_dev));
azx_dev          1636 sound/pci/hda/hda_intel.c 	pos = azx_get_position(chip, azx_dev);
azx_dev          1643 sound/pci/hda/hda_intel.c 			pos = azx_get_position(chip, azx_dev);
azx_dev          1650 sound/pci/hda/hda_intel.c 	if (pos % azx_dev->period_bytes > azx_dev->period_bytes / 2)
azx_dev          1675 sound/pci/hda/hda_intel.c 			struct azx_dev *azx_dev = &chip->azx_dev[i];
azx_dev          1676 sound/pci/hda/hda_intel.c 			if (!azx_dev->irq_pending ||
azx_dev          1677 sound/pci/hda/hda_intel.c 			    !azx_dev->substream ||
azx_dev          1678 sound/pci/hda/hda_intel.c 			    !azx_dev->running)
azx_dev          1680 sound/pci/hda/hda_intel.c 			if (azx_position_ok(chip, azx_dev)) {
azx_dev          1681 sound/pci/hda/hda_intel.c 				azx_dev->irq_pending = 0;
azx_dev          1683 sound/pci/hda/hda_intel.c 				snd_pcm_period_elapsed(azx_dev->substream);
azx_dev          1702 sound/pci/hda/hda_intel.c 		chip->azx_dev[i].irq_pending = 0;
azx_dev          1850 sound/pci/hda/hda_intel.c 		struct azx_dev *azx_dev = &chip->azx_dev[i];
azx_dev          1851 sound/pci/hda/hda_intel.c 		azx_dev->posbuf = (u32 __iomem *)(chip->posbuf.area + i * 8);
azx_dev          1853 sound/pci/hda/hda_intel.c 		azx_dev->sd_addr = chip->remap_addr + (0x20 * i + 0x80);
azx_dev          1855 sound/pci/hda/hda_intel.c 		azx_dev->sd_int_sta_mask = 1 << i;
azx_dev          1857 sound/pci/hda/hda_intel.c 		azx_dev->index = i;
azx_dev          1858 sound/pci/hda/hda_intel.c 		azx_dev->stream_tag = i + 1;
azx_dev          1991 sound/pci/hda/hda_intel.c 			azx_stream_stop(chip, &chip->azx_dev[i]);
azx_dev          2002 sound/pci/hda/hda_intel.c 	if (chip->azx_dev) {
azx_dev          2004 sound/pci/hda/hda_intel.c 			if (chip->azx_dev[i].bdl.area)
azx_dev          2005 sound/pci/hda/hda_intel.c 				snd_dma_free_pages(&chip->azx_dev[i].bdl);
azx_dev          2013 sound/pci/hda/hda_intel.c 	kfree(chip->azx_dev);
azx_dev          2213 sound/pci/hda/hda_intel.c 	chip->azx_dev = kcalloc(chip->num_streams, sizeof(*chip->azx_dev),
azx_dev          2215 sound/pci/hda/hda_intel.c 	if (!chip->azx_dev) {
azx_dev          2224 sound/pci/hda/hda_intel.c 					  BDL_SIZE, &chip->azx_dev[i].bdl);