Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Feb 2014 19:21:45 +0000 (UTC)
From:      Ruslan Bukin <br@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r261987 - head/sys/arm/freescale/vybrid
Message-ID:  <201402161921.s1GJLjjB099869@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: br
Date: Sun Feb 16 19:21:44 2014
New Revision: 261987
URL: http://svnweb.freebsd.org/changeset/base/261987

Log:
  - Decrease buffer size.
  - Handle eDMA interrupt on running channel only.

Modified:
  head/sys/arm/freescale/vybrid/vf_sai.c

Modified: head/sys/arm/freescale/vybrid/vf_sai.c
==============================================================================
--- head/sys/arm/freescale/vybrid/vf_sai.c	Sun Feb 16 19:20:13 2014	(r261986)
+++ head/sys/arm/freescale/vybrid/vf_sai.c	Sun Feb 16 19:21:44 2014	(r261987)
@@ -396,7 +396,8 @@ sai_dma_intr(void *arg, int chn)
 	if (sc->pos >= sc->dma_size)
 		sc->pos -= sc->dma_size;
 
-	chn_intr(ch->channel);
+	if (ch->run)
+		chn_intr(ch->channel);
 
 	return (0);
 }
@@ -492,7 +493,7 @@ setup_dma(struct sc_pcminfo *scp)
 	tcd->nbytes = 64;
 
 	tcd->nmajor = 512;
-	tcd->smod = 18;	/* dma_size range */
+	tcd->smod = 17;	/* dma_size range */
 	tcd->dmod = 0;
 	tcd->esg = 0;
 	tcd->soff = 0x4;
@@ -523,6 +524,7 @@ saichan_trigger(kobj_t obj, void *data, 
 #if 0
 		device_printf(scp->dev, "trigger start\n");
 #endif
+		ch->run = 1;
 		break;
 
 	case PCMTRIG_STOP:
@@ -530,6 +532,7 @@ saichan_trigger(kobj_t obj, void *data, 
 #if 0
 		device_printf(scp->dev, "trigger stop or abort\n");
 #endif
+		ch->run = 0;
 		break;
 	}
 
@@ -720,7 +723,7 @@ sai_attach(device_t dev)
 	scp->dev = dev;
 
 	/* DMA */
-	sc->dma_size = 262144;
+	sc->dma_size = 131072;
 
 	/*
 	 * Must use dma_size boundary as modulo feature required.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402161921.s1GJLjjB099869>