Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68da4fa5 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: au88xx: Add fall-through annotations



As a preparatory patch for the upcoming -Wimplicit-fallthrough
compiler checks, add the "fall through" annotation in au88xx driver.

Although the usages in both both functions vortex_adbdma_setbuffers()
and vortex_wtdma_setbuffers() look a bit suspicious, we keep the
behavior as before, just to be safer.  If it were broken, we should
have already received bug reports.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 74ce5a46
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -1115,6 +1115,7 @@ vortex_adbdma_setbuffers(vortex_t * vortex, int adbdma,
		hwwrite(vortex->mmio,
		hwwrite(vortex->mmio,
			VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0xc,
			VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0xc,
			snd_pcm_sgbuf_get_addr(dma->substream, psize * 3));
			snd_pcm_sgbuf_get_addr(dma->substream, psize * 3));
		/* fall through */
		/* 3 pages */
		/* 3 pages */
	case 3:
	case 3:
		dma->cfg0 |= 0x12000000;
		dma->cfg0 |= 0x12000000;
@@ -1122,12 +1123,14 @@ vortex_adbdma_setbuffers(vortex_t * vortex, int adbdma,
		hwwrite(vortex->mmio,
		hwwrite(vortex->mmio,
			VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0x8,
			VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0x8,
			snd_pcm_sgbuf_get_addr(dma->substream, psize * 2));
			snd_pcm_sgbuf_get_addr(dma->substream, psize * 2));
		/* fall through */
		/* 2 pages */
		/* 2 pages */
	case 2:
	case 2:
		dma->cfg0 |= 0x88000000 | 0x44000000 | 0x10000000 | (psize - 1);
		dma->cfg0 |= 0x88000000 | 0x44000000 | 0x10000000 | (psize - 1);
		hwwrite(vortex->mmio,
		hwwrite(vortex->mmio,
			VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0x4,
			VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0x4,
			snd_pcm_sgbuf_get_addr(dma->substream, psize));
			snd_pcm_sgbuf_get_addr(dma->substream, psize));
		/* fall through */
		/* 1 page */
		/* 1 page */
	case 1:
	case 1:
		dma->cfg0 |= 0x80000000 | 0x40000000 | ((psize - 1) << 0xc);
		dma->cfg0 |= 0x80000000 | 0x40000000 | ((psize - 1) << 0xc);
@@ -1390,17 +1393,20 @@ vortex_wtdma_setbuffers(vortex_t * vortex, int wtdma,
		dma->cfg1 |= 0x88000000 | 0x44000000 | 0x30000000 | (psize-1);
		dma->cfg1 |= 0x88000000 | 0x44000000 | 0x30000000 | (psize-1);
		hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0xc,
		hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0xc,
			snd_pcm_sgbuf_get_addr(dma->substream, psize * 3));
			snd_pcm_sgbuf_get_addr(dma->substream, psize * 3));
		/* fall through */
		/* 3 pages */
		/* 3 pages */
	case 3:
	case 3:
		dma->cfg0 |= 0x12000000;
		dma->cfg0 |= 0x12000000;
		dma->cfg1 |= 0x80000000 | 0x40000000 | ((psize-1) << 0xc);
		dma->cfg1 |= 0x80000000 | 0x40000000 | ((psize-1) << 0xc);
		hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4)  + 0x8,
		hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4)  + 0x8,
			snd_pcm_sgbuf_get_addr(dma->substream, psize * 2));
			snd_pcm_sgbuf_get_addr(dma->substream, psize * 2));
		/* fall through */
		/* 2 pages */
		/* 2 pages */
	case 2:
	case 2:
		dma->cfg0 |= 0x88000000 | 0x44000000 | 0x10000000 | (psize-1);
		dma->cfg0 |= 0x88000000 | 0x44000000 | 0x10000000 | (psize-1);
		hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0x4,
		hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0x4,
			snd_pcm_sgbuf_get_addr(dma->substream, psize));
			snd_pcm_sgbuf_get_addr(dma->substream, psize));
		/* fall through */
		/* 1 page */
		/* 1 page */
	case 1:
	case 1:
		dma->cfg0 |= 0x80000000 | 0x40000000 | ((psize-1) << 0xc);
		dma->cfg0 |= 0x80000000 | 0x40000000 | ((psize-1) << 0xc);