[media] ngene: Fixes for TS input over I2S
authorOliver Endriss <o.endriss@gmx.de>
Mon, 10 Jan 2011 09:36:12 +0000 (06:36 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 21 Mar 2011 23:31:44 +0000 (20:31 -0300)
Fix TS input over I2S.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/ngene/ngene-core.c
drivers/media/dvb/ngene/ngene-dvb.c

index cd5b1f3e902dfe4ecc664f4193f4fc5f6233b8e7..8764647e55f34d7e4841016a5c7a56a4e6ad3c7c 100644 (file)
@@ -143,7 +143,7 @@ static void demux_tasklet(unsigned long data)
                        }
                } else {
                        if (chan->HWState == HWSTATE_RUN) {
-                               u32 Flags = 0;
+                               u32 Flags = chan->DataFormatFlags;
                                IBufferExchange *exch1 = chan->pBufferExchange;
                                IBufferExchange *exch2 = chan->pBufferExchange2;
                                if (Cur->ngeneBuffer.SR.Flags & 0x01)
@@ -474,7 +474,7 @@ static u8 SPDIFConfiguration[10] = {
 
 /* Set NGENE I2S Config to transport stream compatible mode */
 
-static u8 TS_I2SConfiguration[4] = { 0x3E, 0x1A, 0x00, 0x00 }; /*3e 18 00 00 ?*/
+static u8 TS_I2SConfiguration[4] = { 0x3E, 0x18, 0x00, 0x00 };
 
 static u8 TS_I2SOutConfiguration[4] = { 0x80, 0x20, 0x00, 0x00 };
 
index 3832e5983c19104b92c29d273392dfdae53cc074..8bb159370c7009437af428527ef1bc5ad634a2a5 100644 (file)
@@ -65,8 +65,11 @@ void *tsin_exchange(void *priv, void *buf, u32 len, u32 clock, u32 flags)
        struct ngene_channel *chan = priv;
 
 
-       if (chan->users > 0)
+       if (chan->users > 0) {
+               if (flags & DF_SWAP32)
+                       swap_buffer(buf, len);
                dvb_dmx_swfilter(&chan->demux, buf, len);
+       }
        return NULL;
 }