dbri 571 sound/sparc/dbri.c #define DBRI_STREAM(dbri, substream) \ dbri 572 sound/sparc/dbri.c &dbri->stream_info[DBRI_STREAMNO(substream)] dbri 639 sound/sparc/dbri.c static void dbri_cmdwait(struct snd_dbri *dbri) dbri 645 sound/sparc/dbri.c spin_lock_irqsave(&dbri->lock, flags); dbri 646 sound/sparc/dbri.c while ((--maxloops) > 0 && (sbus_readl(dbri->regs + REG0) & D_P)) { dbri 647 sound/sparc/dbri.c spin_unlock_irqrestore(&dbri->lock, flags); dbri 649 sound/sparc/dbri.c spin_lock_irqsave(&dbri->lock, flags); dbri 651 sound/sparc/dbri.c spin_unlock_irqrestore(&dbri->lock, flags); dbri 663 sound/sparc/dbri.c static s32 *dbri_cmdlock(struct snd_dbri *dbri, int len) dbri 665 sound/sparc/dbri.c u32 dvma_addr = (u32)dbri->dma_dvma; dbri 669 sound/sparc/dbri.c spin_lock(&dbri->cmdlock); dbri 670 sound/sparc/dbri.c if (dbri->cmdptr - dbri->dma->cmd + len < DBRI_NO_CMDS - 2) dbri 671 sound/sparc/dbri.c return dbri->cmdptr + 2; dbri 672 sound/sparc/dbri.c else if (len < sbus_readl(dbri->regs + REG8) - dvma_addr) dbri 673 sound/sparc/dbri.c return dbri->dma->cmd; dbri 688 sound/sparc/dbri.c static void dbri_cmdsend(struct snd_dbri *dbri, s32 *cmd, int len) dbri 690 sound/sparc/dbri.c u32 dvma_addr = (u32)dbri->dma_dvma; dbri 700 sound/sparc/dbri.c addr = dvma_addr + (cmd - len - dbri->dma->cmd) * sizeof(s32); dbri 701 sound/sparc/dbri.c *(dbri->cmdptr+1) = addr; dbri 702 sound/sparc/dbri.c *(dbri->cmdptr) = DBRI_CMD(D_JUMP, 0, 0); dbri 705 sound/sparc/dbri.c if (cmd > dbri->cmdptr) { dbri 708 sound/sparc/dbri.c for (ptr = dbri->cmdptr; ptr < cmd+2; ptr++) dbri 712 sound/sparc/dbri.c s32 *ptr = dbri->cmdptr; dbri 717 sound/sparc/dbri.c for (ptr = dbri->dma->cmd; ptr < cmd+2; ptr++) dbri 724 sound/sparc/dbri.c tmp = sbus_readl(dbri->regs + REG0); dbri 726 sound/sparc/dbri.c sbus_writel(tmp, dbri->regs + REG0); dbri 728 sound/sparc/dbri.c dbri->cmdptr = cmd; dbri 729 sound/sparc/dbri.c spin_unlock(&dbri->cmdlock); dbri 733 sound/sparc/dbri.c static void dbri_reset(struct snd_dbri *dbri) dbri 739 sound/sparc/dbri.c sbus_readl(dbri->regs + REG0), dbri 740 sound/sparc/dbri.c sbus_readl(dbri->regs + REG2), dbri 741 sound/sparc/dbri.c sbus_readl(dbri->regs + REG8), sbus_readl(dbri->regs + REG9)); dbri 743 sound/sparc/dbri.c sbus_writel(D_R, dbri->regs + REG0); /* Soft Reset */ dbri 744 sound/sparc/dbri.c for (i = 0; (sbus_readl(dbri->regs + REG0) & D_R) && i < 64; i++) dbri 749 sound/sparc/dbri.c tmp = sbus_readl(dbri->regs + REG0); dbri 752 sound/sparc/dbri.c sbus_writel(tmp, dbri->regs + REG0); dbri 756 sound/sparc/dbri.c static void dbri_initialize(struct snd_dbri *dbri) dbri 758 sound/sparc/dbri.c u32 dvma_addr = (u32)dbri->dma_dvma; dbri 764 sound/sparc/dbri.c spin_lock_irqsave(&dbri->lock, flags); dbri 766 sound/sparc/dbri.c dbri_reset(dbri); dbri 770 sound/sparc/dbri.c dbri->pipes[n].desc = dbri->pipes[n].first_desc = -1; dbri 772 sound/sparc/dbri.c spin_lock_init(&dbri->cmdlock); dbri 777 sound/sparc/dbri.c dbri->dma->intr[0] = dma_addr; dbri 778 sound/sparc/dbri.c dbri->dbri_irqp = 1; dbri 782 sound/sparc/dbri.c spin_lock(&dbri->cmdlock); dbri 783 sound/sparc/dbri.c cmd = dbri->cmdptr = dbri->dma->cmd; dbri 787 sound/sparc/dbri.c dbri->cmdptr = cmd; dbri 791 sound/sparc/dbri.c sbus_writel(dma_addr, dbri->regs + REG8); dbri 792 sound/sparc/dbri.c spin_unlock(&dbri->cmdlock); dbri 794 sound/sparc/dbri.c spin_unlock_irqrestore(&dbri->lock, flags); dbri 795 sound/sparc/dbri.c dbri_cmdwait(dbri); dbri 812 sound/sparc/dbri.c static inline int pipe_active(struct snd_dbri *dbri, int pipe) dbri 814 sound/sparc/dbri.c return ((pipe >= 0) && (dbri->pipes[pipe].desc != -1)); dbri 822 sound/sparc/dbri.c static void reset_pipe(struct snd_dbri *dbri, int pipe) dbri 834 sound/sparc/dbri.c sdp = dbri->pipes[pipe].sdp; dbri 841 sound/sparc/dbri.c cmd = dbri_cmdlock(dbri, 3); dbri 845 sound/sparc/dbri.c dbri_cmdsend(dbri, cmd, 3); dbri 847 sound/sparc/dbri.c desc = dbri->pipes[pipe].first_desc; dbri 850 sound/sparc/dbri.c dbri->dma->desc[desc].ba = 0; dbri 851 sound/sparc/dbri.c dbri->dma->desc[desc].nda = 0; dbri 852 sound/sparc/dbri.c desc = dbri->next_desc[desc]; dbri 853 sound/sparc/dbri.c } while (desc != -1 && desc != dbri->pipes[pipe].first_desc); dbri 855 sound/sparc/dbri.c dbri->pipes[pipe].desc = -1; dbri 856 sound/sparc/dbri.c dbri->pipes[pipe].first_desc = -1; dbri 862 sound/sparc/dbri.c static void setup_pipe(struct snd_dbri *dbri, int pipe, int sdp) dbri 883 sound/sparc/dbri.c dbri->pipes[pipe].sdp = sdp; dbri 884 sound/sparc/dbri.c dbri->pipes[pipe].desc = -1; dbri 885 sound/sparc/dbri.c dbri->pipes[pipe].first_desc = -1; dbri 887 sound/sparc/dbri.c reset_pipe(dbri, pipe); dbri 893 sound/sparc/dbri.c static void link_time_slot(struct snd_dbri *dbri, int pipe, dbri 908 sound/sparc/dbri.c if (dbri->pipes[pipe].sdp == 0 dbri 909 sound/sparc/dbri.c || dbri->pipes[prevpipe].sdp == 0 dbri 910 sound/sparc/dbri.c || dbri->pipes[nextpipe].sdp == 0) { dbri 916 sound/sparc/dbri.c dbri->pipes[prevpipe].nextpipe = pipe; dbri 917 sound/sparc/dbri.c dbri->pipes[pipe].nextpipe = nextpipe; dbri 918 sound/sparc/dbri.c dbri->pipes[pipe].length = length; dbri 920 sound/sparc/dbri.c cmd = dbri_cmdlock(dbri, 4); dbri 922 sound/sparc/dbri.c if (dbri->pipes[pipe].sdp & D_SDP_TO_SER) { dbri 929 sound/sparc/dbri.c cycle = dbri->chi_bpf; dbri 945 sound/sparc/dbri.c dbri_cmdsend(dbri, cmd, 4); dbri 952 sound/sparc/dbri.c static void unlink_time_slot(struct snd_dbri *dbri, int pipe, dbri 967 sound/sparc/dbri.c cmd = dbri_cmdlock(dbri, 4); dbri 982 sound/sparc/dbri.c dbri_cmdsend(dbri, cmd, 4); dbri 1002 sound/sparc/dbri.c static void xmit_fixed(struct snd_dbri *dbri, int pipe, unsigned int data) dbri 1012 sound/sparc/dbri.c if (D_SDP_MODE(dbri->pipes[pipe].sdp) == 0) { dbri 1018 sound/sparc/dbri.c if (D_SDP_MODE(dbri->pipes[pipe].sdp) != D_SDP_FIXED) { dbri 1023 sound/sparc/dbri.c if (!(dbri->pipes[pipe].sdp & D_SDP_TO_SER)) { dbri 1031 sound/sparc/dbri.c if (dbri->pipes[pipe].sdp & D_SDP_MSB) dbri 1032 sound/sparc/dbri.c data = reverse_bytes(data, dbri->pipes[pipe].length); dbri 1034 sound/sparc/dbri.c cmd = dbri_cmdlock(dbri, 3); dbri 1040 sound/sparc/dbri.c spin_lock_irqsave(&dbri->lock, flags); dbri 1041 sound/sparc/dbri.c dbri_cmdsend(dbri, cmd, 3); dbri 1042 sound/sparc/dbri.c spin_unlock_irqrestore(&dbri->lock, flags); dbri 1043 sound/sparc/dbri.c dbri_cmdwait(dbri); dbri 1047 sound/sparc/dbri.c static void recv_fixed(struct snd_dbri *dbri, int pipe, volatile __u32 *ptr) dbri 1055 sound/sparc/dbri.c if (D_SDP_MODE(dbri->pipes[pipe].sdp) != D_SDP_FIXED) { dbri 1061 sound/sparc/dbri.c if (dbri->pipes[pipe].sdp & D_SDP_TO_SER) { dbri 1067 sound/sparc/dbri.c dbri->pipes[pipe].recv_fixed_ptr = ptr; dbri 1086 sound/sparc/dbri.c static int setup_descs(struct snd_dbri *dbri, int streamno, unsigned int period) dbri 1088 sound/sparc/dbri.c struct dbri_streaminfo *info = &dbri->stream_info[streamno]; dbri 1089 sound/sparc/dbri.c u32 dvma_addr = (u32)dbri->dma_dvma; dbri 1101 sound/sparc/dbri.c if (dbri->pipes[info->pipe].sdp == 0) { dbri 1111 sound/sparc/dbri.c if (!(dbri->pipes[info->pipe].sdp & D_SDP_TO_SER)) { dbri 1117 sound/sparc/dbri.c if (dbri->pipes[info->pipe].sdp & D_SDP_TO_SER) { dbri 1126 sound/sparc/dbri.c if (pipe_active(dbri, info->pipe)) { dbri 1137 sound/sparc/dbri.c desc = dbri->pipes[info->pipe].first_desc; dbri 1140 sound/sparc/dbri.c dbri->dma->desc[desc].ba = 0; dbri 1141 sound/sparc/dbri.c dbri->dma->desc[desc].nda = 0; dbri 1142 sound/sparc/dbri.c desc = dbri->next_desc[desc]; dbri 1144 sound/sparc/dbri.c desc != dbri->pipes[info->pipe].first_desc); dbri 1146 sound/sparc/dbri.c dbri->pipes[info->pipe].desc = -1; dbri 1147 sound/sparc/dbri.c dbri->pipes[info->pipe].first_desc = -1; dbri 1154 sound/sparc/dbri.c if (!dbri->dma->desc[desc].ba) dbri 1171 sound/sparc/dbri.c dbri->next_desc[desc] = -1; dbri 1172 sound/sparc/dbri.c dbri->dma->desc[desc].ba = dvma_buffer; dbri 1173 sound/sparc/dbri.c dbri->dma->desc[desc].nda = 0; dbri 1176 sound/sparc/dbri.c dbri->dma->desc[desc].word1 = DBRI_TD_CNT(mylen); dbri 1177 sound/sparc/dbri.c dbri->dma->desc[desc].word4 = 0; dbri 1178 sound/sparc/dbri.c dbri->dma->desc[desc].word1 |= DBRI_TD_F | DBRI_TD_B; dbri 1180 sound/sparc/dbri.c dbri->dma->desc[desc].word1 = 0; dbri 1181 sound/sparc/dbri.c dbri->dma->desc[desc].word4 = dbri 1188 sound/sparc/dbri.c dbri->next_desc[last_desc] = desc; dbri 1189 sound/sparc/dbri.c dbri->dma->desc[last_desc].nda = dbri 1204 sound/sparc/dbri.c dbri->dma->desc[last_desc].nda = dbri 1206 sound/sparc/dbri.c dbri->next_desc[last_desc] = first_desc; dbri 1207 sound/sparc/dbri.c dbri->pipes[info->pipe].first_desc = first_desc; dbri 1208 sound/sparc/dbri.c dbri->pipes[info->pipe].desc = first_desc; dbri 1214 sound/sparc/dbri.c dbri->dma->desc[desc].word1, dbri 1215 sound/sparc/dbri.c dbri->dma->desc[desc].ba, dbri 1216 sound/sparc/dbri.c dbri->dma->desc[desc].nda, dbri->dma->desc[desc].word4); dbri 1217 sound/sparc/dbri.c desc = dbri->next_desc[desc]; dbri 1241 sound/sparc/dbri.c static void reset_chi(struct snd_dbri *dbri, dbri 1250 sound/sparc/dbri.c cmd = dbri_cmdlock(dbri, 4); dbri 1257 sound/sparc/dbri.c dbri_cmdsend(dbri, cmd, 4); dbri 1259 sound/sparc/dbri.c dbri->pipes[16].sdp = 1; dbri 1260 sound/sparc/dbri.c dbri->pipes[16].nextpipe = 16; dbri 1262 sound/sparc/dbri.c cmd = dbri_cmdlock(dbri, 4); dbri 1290 sound/sparc/dbri.c dbri->chi_bpf = bits_per_frame; dbri 1304 sound/sparc/dbri.c dbri_cmdsend(dbri, cmd, 4); dbri 1318 sound/sparc/dbri.c static void cs4215_setup_pipes(struct snd_dbri *dbri) dbri 1322 sound/sparc/dbri.c spin_lock_irqsave(&dbri->lock, flags); dbri 1338 sound/sparc/dbri.c setup_pipe(dbri, 4, D_SDP_MEM | D_SDP_TO_SER | D_SDP_MSB); dbri 1339 sound/sparc/dbri.c setup_pipe(dbri, 20, D_SDP_FIXED | D_SDP_TO_SER | D_SDP_MSB); dbri 1340 sound/sparc/dbri.c setup_pipe(dbri, 6, D_SDP_MEM | D_SDP_FROM_SER | D_SDP_MSB); dbri 1341 sound/sparc/dbri.c setup_pipe(dbri, 21, D_SDP_FIXED | D_SDP_FROM_SER | D_SDP_MSB); dbri 1343 sound/sparc/dbri.c setup_pipe(dbri, 17, D_SDP_FIXED | D_SDP_TO_SER | D_SDP_MSB); dbri 1344 sound/sparc/dbri.c setup_pipe(dbri, 18, D_SDP_FIXED | D_SDP_FROM_SER | D_SDP_MSB); dbri 1345 sound/sparc/dbri.c setup_pipe(dbri, 19, D_SDP_FIXED | D_SDP_FROM_SER | D_SDP_MSB); dbri 1346 sound/sparc/dbri.c spin_unlock_irqrestore(&dbri->lock, flags); dbri 1348 sound/sparc/dbri.c dbri_cmdwait(dbri); dbri 1385 sound/sparc/dbri.c static void cs4215_setdata(struct snd_dbri *dbri, int muted) dbri 1388 sound/sparc/dbri.c dbri->mm.data[0] |= 63; dbri 1389 sound/sparc/dbri.c dbri->mm.data[1] |= 63; dbri 1390 sound/sparc/dbri.c dbri->mm.data[2] &= ~15; dbri 1391 sound/sparc/dbri.c dbri->mm.data[3] &= ~15; dbri 1394 sound/sparc/dbri.c struct dbri_streaminfo *info = &dbri->stream_info[DBRI_PLAY]; dbri 1398 sound/sparc/dbri.c dbri->mm.data[0] &= ~0x3f; /* Reset the volume bits */ dbri 1399 sound/sparc/dbri.c dbri->mm.data[1] &= ~0x3f; dbri 1400 sound/sparc/dbri.c dbri->mm.data[0] |= (DBRI_MAX_VOLUME - left_gain); dbri 1401 sound/sparc/dbri.c dbri->mm.data[1] |= (DBRI_MAX_VOLUME - right_gain); dbri 1404 sound/sparc/dbri.c info = &dbri->stream_info[DBRI_REC]; dbri 1407 sound/sparc/dbri.c dbri->mm.data[2] |= CS4215_LG(left_gain); dbri 1408 sound/sparc/dbri.c dbri->mm.data[3] |= CS4215_RG(right_gain); dbri 1411 sound/sparc/dbri.c xmit_fixed(dbri, 20, *(int *)dbri->mm.data); dbri 1417 sound/sparc/dbri.c static void cs4215_open(struct snd_dbri *dbri) dbri 1424 sound/sparc/dbri.c dbri->mm.channels, dbri->mm.precision); dbri 1430 sound/sparc/dbri.c cs4215_setdata(dbri, 1); dbri 1446 sound/sparc/dbri.c spin_lock_irqsave(&dbri->lock, flags); dbri 1447 sound/sparc/dbri.c tmp = sbus_readl(dbri->regs + REG0); dbri 1449 sound/sparc/dbri.c sbus_writel(tmp, dbri->regs + REG0); dbri 1453 sound/sparc/dbri.c (dbri->mm.onboard ? D_PIO0 : D_PIO2), dbri->regs + REG2); dbri 1455 sound/sparc/dbri.c reset_chi(dbri, CHIslave, 128); dbri 1463 sound/sparc/dbri.c data_width = dbri->mm.channels * dbri->mm.precision; dbri 1465 sound/sparc/dbri.c link_time_slot(dbri, 4, 16, 16, data_width, dbri->mm.offset); dbri 1466 sound/sparc/dbri.c link_time_slot(dbri, 20, 4, 16, 32, dbri->mm.offset + 32); dbri 1467 sound/sparc/dbri.c link_time_slot(dbri, 6, 16, 16, data_width, dbri->mm.offset); dbri 1468 sound/sparc/dbri.c link_time_slot(dbri, 21, 6, 16, 16, dbri->mm.offset + 40); dbri 1471 sound/sparc/dbri.c tmp = sbus_readl(dbri->regs + REG0); dbri 1473 sound/sparc/dbri.c sbus_writel(tmp, dbri->regs + REG0); dbri 1474 sound/sparc/dbri.c spin_unlock_irqrestore(&dbri->lock, flags); dbri 1476 sound/sparc/dbri.c cs4215_setdata(dbri, 0); dbri 1482 sound/sparc/dbri.c static int cs4215_setctrl(struct snd_dbri *dbri) dbri 1493 sound/sparc/dbri.c cs4215_setdata(dbri, 1); dbri 1500 sound/sparc/dbri.c val = D_ENPIO | D_PIO1 | (dbri->mm.onboard ? D_PIO0 : D_PIO2); dbri 1501 sound/sparc/dbri.c sbus_writel(val, dbri->regs + REG2); dbri 1523 sound/sparc/dbri.c spin_lock_irqsave(&dbri->lock, flags); dbri 1524 sound/sparc/dbri.c tmp = sbus_readl(dbri->regs + REG0); dbri 1526 sound/sparc/dbri.c sbus_writel(tmp, dbri->regs + REG0); dbri 1528 sound/sparc/dbri.c reset_chi(dbri, CHImaster, 128); dbri 1537 sound/sparc/dbri.c link_time_slot(dbri, 17, 16, 16, 32, dbri->mm.offset); dbri 1538 sound/sparc/dbri.c link_time_slot(dbri, 18, 16, 16, 8, dbri->mm.offset); dbri 1539 sound/sparc/dbri.c link_time_slot(dbri, 19, 18, 16, 8, dbri->mm.offset + 48); dbri 1540 sound/sparc/dbri.c spin_unlock_irqrestore(&dbri->lock, flags); dbri 1543 sound/sparc/dbri.c dbri->mm.ctrl[0] &= ~CS4215_CLB; dbri 1544 sound/sparc/dbri.c xmit_fixed(dbri, 17, *(int *)dbri->mm.ctrl); dbri 1546 sound/sparc/dbri.c spin_lock_irqsave(&dbri->lock, flags); dbri 1547 sound/sparc/dbri.c tmp = sbus_readl(dbri->regs + REG0); dbri 1549 sound/sparc/dbri.c sbus_writel(tmp, dbri->regs + REG0); dbri 1550 sound/sparc/dbri.c spin_unlock_irqrestore(&dbri->lock, flags); dbri 1552 sound/sparc/dbri.c for (i = 10; ((dbri->mm.status & 0xe4) != 0x20); --i) dbri 1557 sound/sparc/dbri.c dbri->mm.status); dbri 1564 sound/sparc/dbri.c recv_fixed(dbri, 19, NULL); dbri 1569 sound/sparc/dbri.c dbri->mm.ctrl[0] |= CS4215_CLB; dbri 1570 sound/sparc/dbri.c xmit_fixed(dbri, 17, *(int *)dbri->mm.ctrl); dbri 1575 sound/sparc/dbri.c cs4215_setdata(dbri, 0); dbri 1586 sound/sparc/dbri.c static int cs4215_prepare(struct snd_dbri *dbri, unsigned int rate, dbri 1604 sound/sparc/dbri.c dbri->mm.ctrl[1] = CS4215_DFR_ULAW; dbri 1605 sound/sparc/dbri.c dbri->mm.precision = 8; dbri 1608 sound/sparc/dbri.c dbri->mm.ctrl[1] = CS4215_DFR_ALAW; dbri 1609 sound/sparc/dbri.c dbri->mm.precision = 8; dbri 1612 sound/sparc/dbri.c dbri->mm.ctrl[1] = CS4215_DFR_LINEAR8; dbri 1613 sound/sparc/dbri.c dbri->mm.precision = 8; dbri 1616 sound/sparc/dbri.c dbri->mm.ctrl[1] = CS4215_DFR_LINEAR16; dbri 1617 sound/sparc/dbri.c dbri->mm.precision = 16; dbri 1625 sound/sparc/dbri.c dbri->mm.ctrl[1] |= CS4215_FREQ[freq_idx].csval; dbri 1626 sound/sparc/dbri.c dbri->mm.ctrl[2] = CS4215_XCLK | dbri 1629 sound/sparc/dbri.c dbri->mm.channels = channels; dbri 1631 sound/sparc/dbri.c dbri->mm.ctrl[1] |= CS4215_DFR_STEREO; dbri 1633 sound/sparc/dbri.c ret = cs4215_setctrl(dbri); dbri 1635 sound/sparc/dbri.c cs4215_open(dbri); /* set codec to data mode */ dbri 1643 sound/sparc/dbri.c static int cs4215_init(struct snd_dbri *dbri) dbri 1645 sound/sparc/dbri.c u32 reg2 = sbus_readl(dbri->regs + REG2); dbri 1651 sound/sparc/dbri.c dbri->mm.onboard = 1; dbri 1655 sound/sparc/dbri.c dbri->mm.onboard = 0; dbri 1660 sound/sparc/dbri.c sbus_writel(D_ENPIO2, dbri->regs + REG2); dbri 1669 sound/sparc/dbri.c cs4215_setup_pipes(dbri); dbri 1670 sound/sparc/dbri.c cs4215_init_data(&dbri->mm); dbri 1673 sound/sparc/dbri.c recv_fixed(dbri, 18, &dbri->mm.status); dbri 1674 sound/sparc/dbri.c recv_fixed(dbri, 19, &dbri->mm.version); dbri 1676 sound/sparc/dbri.c dbri->mm.offset = dbri->mm.onboard ? 0 : 8; dbri 1677 sound/sparc/dbri.c if (cs4215_setctrl(dbri) == -1 || dbri->mm.version == 0xff) { dbri 1679 sound/sparc/dbri.c dbri->mm.offset); dbri 1682 sound/sparc/dbri.c dprintk(D_MM, "Found CS4215 at offset %d\n", dbri->mm.offset); dbri 1707 sound/sparc/dbri.c static void xmit_descs(struct snd_dbri *dbri) dbri 1715 sound/sparc/dbri.c if (dbri == NULL) dbri 1718 sound/sparc/dbri.c dvma_addr = (u32)dbri->dma_dvma; dbri 1719 sound/sparc/dbri.c info = &dbri->stream_info[DBRI_REC]; dbri 1720 sound/sparc/dbri.c spin_lock_irqsave(&dbri->lock, flags); dbri 1723 sound/sparc/dbri.c first_td = dbri->pipes[info->pipe].first_desc; dbri 1729 sound/sparc/dbri.c cmd = dbri_cmdlock(dbri, 2); dbri 1731 sound/sparc/dbri.c dbri->pipes[info->pipe].sdp dbri 1735 sound/sparc/dbri.c dbri_cmdsend(dbri, cmd, 2); dbri 1738 sound/sparc/dbri.c dbri->pipes[info->pipe].desc = first_td; dbri 1742 sound/sparc/dbri.c info = &dbri->stream_info[DBRI_PLAY]; dbri 1745 sound/sparc/dbri.c first_td = dbri->pipes[info->pipe].first_desc; dbri 1751 sound/sparc/dbri.c cmd = dbri_cmdlock(dbri, 2); dbri 1753 sound/sparc/dbri.c dbri->pipes[info->pipe].sdp dbri 1757 sound/sparc/dbri.c dbri_cmdsend(dbri, cmd, 2); dbri 1760 sound/sparc/dbri.c dbri->pipes[info->pipe].desc = first_td; dbri 1764 sound/sparc/dbri.c spin_unlock_irqrestore(&dbri->lock, flags); dbri 1781 sound/sparc/dbri.c static void transmission_complete_intr(struct snd_dbri *dbri, int pipe) dbri 1783 sound/sparc/dbri.c struct dbri_streaminfo *info = &dbri->stream_info[DBRI_PLAY]; dbri 1784 sound/sparc/dbri.c int td = dbri->pipes[pipe].desc; dbri 1793 sound/sparc/dbri.c status = DBRI_TD_STATUS(dbri->dma->desc[td].word4); dbri 1799 sound/sparc/dbri.c dbri->dma->desc[td].word4 = 0; /* Reset it for next time. */ dbri 1800 sound/sparc/dbri.c info->offset += DBRI_RD_CNT(dbri->dma->desc[td].word1); dbri 1802 sound/sparc/dbri.c td = dbri->next_desc[td]; dbri 1803 sound/sparc/dbri.c dbri->pipes[pipe].desc = td; dbri 1807 sound/sparc/dbri.c spin_unlock(&dbri->lock); dbri 1809 sound/sparc/dbri.c spin_lock(&dbri->lock); dbri 1812 sound/sparc/dbri.c static void reception_complete_intr(struct snd_dbri *dbri, int pipe) dbri 1815 sound/sparc/dbri.c int rd = dbri->pipes[pipe].desc; dbri 1823 sound/sparc/dbri.c dbri->pipes[pipe].desc = dbri->next_desc[rd]; dbri 1824 sound/sparc/dbri.c status = dbri->dma->desc[rd].word1; dbri 1825 sound/sparc/dbri.c dbri->dma->desc[rd].word1 = 0; /* Reset it for next time. */ dbri 1827 sound/sparc/dbri.c info = &dbri->stream_info[DBRI_REC]; dbri 1836 sound/sparc/dbri.c spin_unlock(&dbri->lock); dbri 1838 sound/sparc/dbri.c spin_lock(&dbri->lock); dbri 1841 sound/sparc/dbri.c static void dbri_process_one_interrupt(struct snd_dbri *dbri, int x) dbri 1865 sound/sparc/dbri.c reception_complete_intr(dbri, channel); dbri 1869 sound/sparc/dbri.c transmission_complete_intr(dbri, channel); dbri 1881 sound/sparc/dbri.c int td = dbri->pipes[pipe].desc; dbri 1883 sound/sparc/dbri.c dbri->dma->desc[td].word4 = 0; dbri 1884 sound/sparc/dbri.c cmd = dbri_cmdlock(dbri, NoGetLock); dbri 1886 sound/sparc/dbri.c dbri->pipes[pipe].sdp dbri 1888 sound/sparc/dbri.c *(cmd++) = dbri->dma_dvma + dbri_dma_off(desc, td); dbri 1889 sound/sparc/dbri.c dbri_cmdsend(dbri, cmd); dbri 1895 sound/sparc/dbri.c if (dbri->pipes[channel].sdp & D_SDP_MSB) dbri 1896 sound/sparc/dbri.c val = reverse_bytes(val, dbri->pipes[channel].length); dbri 1898 sound/sparc/dbri.c if (dbri->pipes[channel].recv_fixed_ptr) dbri 1899 sound/sparc/dbri.c *(dbri->pipes[channel].recv_fixed_ptr) = val; dbri 1913 sound/sparc/dbri.c static void dbri_process_interrupt_buffer(struct snd_dbri *dbri) dbri 1917 sound/sparc/dbri.c while ((x = dbri->dma->intr[dbri->dbri_irqp]) != 0) { dbri 1918 sound/sparc/dbri.c dbri->dma->intr[dbri->dbri_irqp] = 0; dbri 1919 sound/sparc/dbri.c dbri->dbri_irqp++; dbri 1920 sound/sparc/dbri.c if (dbri->dbri_irqp == DBRI_INT_BLK) dbri 1921 sound/sparc/dbri.c dbri->dbri_irqp = 1; dbri 1923 sound/sparc/dbri.c dbri_process_one_interrupt(dbri, x); dbri 1929 sound/sparc/dbri.c struct snd_dbri *dbri = dev_id; dbri 1933 sound/sparc/dbri.c if (dbri == NULL) dbri 1935 sound/sparc/dbri.c spin_lock(&dbri->lock); dbri 1940 sound/sparc/dbri.c x = sbus_readl(dbri->regs + REG1); dbri 1970 sound/sparc/dbri.c dbri_reset(dbri); dbri 1972 sound/sparc/dbri.c tmp = sbus_readl(dbri->regs + REG0); dbri 1974 sound/sparc/dbri.c sbus_writel(tmp, dbri->regs + REG0); dbri 1978 sound/sparc/dbri.c dbri_process_interrupt_buffer(dbri); dbri 1980 sound/sparc/dbri.c spin_unlock(&dbri->lock); dbri 2046 sound/sparc/dbri.c struct snd_dbri *dbri = snd_pcm_substream_chip(substream); dbri 2048 sound/sparc/dbri.c struct dbri_streaminfo *info = DBRI_STREAM(dbri, substream); dbri 2054 sound/sparc/dbri.c spin_lock_irqsave(&dbri->lock, flags); dbri 2059 sound/sparc/dbri.c spin_unlock_irqrestore(&dbri->lock, flags); dbri 2069 sound/sparc/dbri.c cs4215_open(dbri); dbri 2076 sound/sparc/dbri.c struct snd_dbri *dbri = snd_pcm_substream_chip(substream); dbri 2077 sound/sparc/dbri.c struct dbri_streaminfo *info = DBRI_STREAM(dbri, substream); dbri 2090 sound/sparc/dbri.c struct snd_dbri *dbri = snd_pcm_substream_chip(substream); dbri 2091 sound/sparc/dbri.c struct dbri_streaminfo *info = DBRI_STREAM(dbri, substream); dbri 2096 sound/sparc/dbri.c ret = cs4215_prepare(dbri, params_rate(hw_params), dbri 2117 sound/sparc/dbri.c dma_map_single(&dbri->op->dev, dbri 2131 sound/sparc/dbri.c struct snd_dbri *dbri = snd_pcm_substream_chip(substream); dbri 2132 sound/sparc/dbri.c struct dbri_streaminfo *info = DBRI_STREAM(dbri, substream); dbri 2145 sound/sparc/dbri.c dma_unmap_single(&dbri->op->dev, info->dvma_buffer, dbri 2150 sound/sparc/dbri.c reset_pipe(dbri, info->pipe); dbri 2159 sound/sparc/dbri.c struct snd_dbri *dbri = snd_pcm_substream_chip(substream); dbri 2160 sound/sparc/dbri.c struct dbri_streaminfo *info = DBRI_STREAM(dbri, substream); dbri 2169 sound/sparc/dbri.c spin_lock_irq(&dbri->lock); dbri 2175 sound/sparc/dbri.c ret = setup_descs(dbri, DBRI_STREAMNO(substream), dbri 2178 sound/sparc/dbri.c spin_unlock_irq(&dbri->lock); dbri 2186 sound/sparc/dbri.c struct snd_dbri *dbri = snd_pcm_substream_chip(substream); dbri 2187 sound/sparc/dbri.c struct dbri_streaminfo *info = DBRI_STREAM(dbri, substream); dbri 2195 sound/sparc/dbri.c xmit_descs(dbri); dbri 2199 sound/sparc/dbri.c reset_pipe(dbri, info->pipe); dbri 2210 sound/sparc/dbri.c struct snd_dbri *dbri = snd_pcm_substream_chip(substream); dbri 2211 sound/sparc/dbri.c struct dbri_streaminfo *info = DBRI_STREAM(dbri, substream); dbri 2277 sound/sparc/dbri.c struct snd_dbri *dbri = snd_kcontrol_chip(kcontrol); dbri 2280 sound/sparc/dbri.c if (snd_BUG_ON(!dbri)) dbri 2282 sound/sparc/dbri.c info = &dbri->stream_info[kcontrol->private_value]; dbri 2292 sound/sparc/dbri.c struct snd_dbri *dbri = snd_kcontrol_chip(kcontrol); dbri 2294 sound/sparc/dbri.c &dbri->stream_info[kcontrol->private_value]; dbri 2320 sound/sparc/dbri.c cs4215_setdata(dbri, 1); dbri 2322 sound/sparc/dbri.c cs4215_setdata(dbri, 0); dbri 2343 sound/sparc/dbri.c struct snd_dbri *dbri = snd_kcontrol_chip(kcontrol); dbri 2349 sound/sparc/dbri.c if (snd_BUG_ON(!dbri)) dbri 2354 sound/sparc/dbri.c (dbri->mm.data[elem] >> shift) & mask; dbri 2357 sound/sparc/dbri.c (dbri->mm.ctrl[elem - 4] >> shift) & mask; dbri 2368 sound/sparc/dbri.c struct snd_dbri *dbri = snd_kcontrol_chip(kcontrol); dbri 2376 sound/sparc/dbri.c if (snd_BUG_ON(!dbri)) dbri 2385 sound/sparc/dbri.c dbri->mm.data[elem] = (dbri->mm.data[elem] & dbri 2387 sound/sparc/dbri.c changed = (val != dbri->mm.data[elem]); dbri 2389 sound/sparc/dbri.c dbri->mm.ctrl[elem - 4] = (dbri->mm.ctrl[elem - 4] & dbri 2391 sound/sparc/dbri.c changed = (val != dbri->mm.ctrl[elem - 4]); dbri 2397 sound/sparc/dbri.c dbri->mm.data[elem & 3]); dbri 2403 sound/sparc/dbri.c cs4215_setdata(dbri, 1); dbri 2405 sound/sparc/dbri.c cs4215_setdata(dbri, 0); dbri 2451 sound/sparc/dbri.c struct snd_dbri *dbri; dbri 2455 sound/sparc/dbri.c dbri = card->private_data; dbri 2461 sound/sparc/dbri.c snd_ctl_new1(&dbri_controls[idx], dbri)); dbri 2467 sound/sparc/dbri.c dbri->stream_info[idx].left_gain = 0; dbri 2468 sound/sparc/dbri.c dbri->stream_info[idx].right_gain = 0; dbri 2480 sound/sparc/dbri.c struct snd_dbri *dbri = entry->private_data; dbri 2482 sound/sparc/dbri.c snd_iprintf(buffer, "REG0: 0x%x\n", sbus_readl(dbri->regs + REG0)); dbri 2483 sound/sparc/dbri.c snd_iprintf(buffer, "REG2: 0x%x\n", sbus_readl(dbri->regs + REG2)); dbri 2484 sound/sparc/dbri.c snd_iprintf(buffer, "REG8: 0x%x\n", sbus_readl(dbri->regs + REG8)); dbri 2485 sound/sparc/dbri.c snd_iprintf(buffer, "REG9: 0x%x\n", sbus_readl(dbri->regs + REG9)); dbri 2492 sound/sparc/dbri.c struct snd_dbri *dbri = entry->private_data; dbri 2497 sound/sparc/dbri.c if (pipe_active(dbri, pipe)) { dbri 2498 sound/sparc/dbri.c struct dbri_pipe *pptr = &dbri->pipes[pipe]; dbri 2514 sound/sparc/dbri.c struct snd_dbri *dbri = card->private_data; dbri 2516 sound/sparc/dbri.c snd_card_ro_proc_new(card, "regs", dbri, dbri_regs_read); dbri 2518 sound/sparc/dbri.c snd_card_ro_proc_new(card, "debug", dbri, dbri_debug_read); dbri 2527 sound/sparc/dbri.c static void snd_dbri_free(struct snd_dbri *dbri); dbri 2533 sound/sparc/dbri.c struct snd_dbri *dbri = card->private_data; dbri 2536 sound/sparc/dbri.c spin_lock_init(&dbri->lock); dbri 2537 sound/sparc/dbri.c dbri->op = op; dbri 2538 sound/sparc/dbri.c dbri->irq = irq; dbri 2540 sound/sparc/dbri.c dbri->dma = dma_alloc_coherent(&op->dev, sizeof(struct dbri_dma), dbri 2541 sound/sparc/dbri.c &dbri->dma_dvma, GFP_KERNEL); dbri 2542 sound/sparc/dbri.c if (!dbri->dma) dbri 2546 sound/sparc/dbri.c dbri->dma, dbri->dma_dvma); dbri 2549 sound/sparc/dbri.c dbri->regs_size = resource_size(&op->resource[0]); dbri 2550 sound/sparc/dbri.c dbri->regs = of_ioremap(&op->resource[0], 0, dbri 2551 sound/sparc/dbri.c dbri->regs_size, "DBRI Registers"); dbri 2552 sound/sparc/dbri.c if (!dbri->regs) { dbri 2555 sound/sparc/dbri.c (void *)dbri->dma, dbri->dma_dvma); dbri 2559 sound/sparc/dbri.c err = request_irq(dbri->irq, snd_dbri_interrupt, IRQF_SHARED, dbri 2560 sound/sparc/dbri.c "DBRI audio", dbri); dbri 2562 sound/sparc/dbri.c printk(KERN_ERR "DBRI: Can't get irq %d\n", dbri->irq); dbri 2563 sound/sparc/dbri.c of_iounmap(&op->resource[0], dbri->regs, dbri->regs_size); dbri 2565 sound/sparc/dbri.c (void *)dbri->dma, dbri->dma_dvma); dbri 2570 sound/sparc/dbri.c dbri_initialize(dbri); dbri 2571 sound/sparc/dbri.c err = cs4215_init(dbri); dbri 2573 sound/sparc/dbri.c snd_dbri_free(dbri); dbri 2580 sound/sparc/dbri.c static void snd_dbri_free(struct snd_dbri *dbri) dbri 2583 sound/sparc/dbri.c dbri_reset(dbri); dbri 2585 sound/sparc/dbri.c if (dbri->irq) dbri 2586 sound/sparc/dbri.c free_irq(dbri->irq, dbri); dbri 2588 sound/sparc/dbri.c if (dbri->regs) dbri 2589 sound/sparc/dbri.c of_iounmap(&dbri->op->resource[0], dbri->regs, dbri->regs_size); dbri 2591 sound/sparc/dbri.c if (dbri->dma) dbri 2592 sound/sparc/dbri.c dma_free_coherent(&dbri->op->dev, dbri 2594 sound/sparc/dbri.c (void *)dbri->dma, dbri->dma_dvma); dbri 2599 sound/sparc/dbri.c struct snd_dbri *dbri; dbri 2637 sound/sparc/dbri.c dbri = card->private_data; dbri 2655 sound/sparc/dbri.c dev, dbri->regs, dbri 2656 sound/sparc/dbri.c dbri->irq, op->dev.of_node->name[9], dbri->mm.version); dbri 2662 sound/sparc/dbri.c snd_dbri_free(dbri);