From patchwork Mon Dec 14 05:03:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Lasnier X-Patchwork-Id: 12764 Received: from qw-out-2122.google.com ([74.125.92.24]) by mail.linuxtv.org with esmtp (Exim 4.69) (envelope-from ) id 1NK35P-00076N-RV for vdr@linuxtv.org; Mon, 14 Dec 2009 06:03:08 +0100 Received: by qw-out-2122.google.com with SMTP id 9so504314qwb.17 for ; Sun, 13 Dec 2009 21:03:03 -0800 (PST) Received: by 10.224.118.140 with SMTP id v12mr2599581qaq.360.1260766983259; Sun, 13 Dec 2009 21:03:03 -0800 (PST) Received: from ?192.168.0.103? (72-11-181-142.cpe.axion.ca [72.11.181.142]) by mx.google.com with ESMTPS id 8sm11271609qwj.33.2009.12.13.21.03.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 13 Dec 2009 21:03:01 -0800 (PST) Message-ID: <4B25C705.4090303@fepg.org> Date: Mon, 14 Dec 2009 00:03:01 -0500 From: Alex Lasnier User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: VDR Mailing List References: <4A4022C6.2070201@davis-family.info> <4A4105CA.5080305@fepg.org> <4A410629.1040609@davis-family.info> <4A70D5AC.30104@davis-family.info> <4A758F35.3040209@cadsoft.de> <4A75CB62.7030806@fepg.org> <4B1BD65C.1090100@tvdr.de> In-Reply-To: <4B1BD65C.1090100@tvdr.de> X-LSpam-Score: -2.4 (--) X-LSpam-Report: No, score=-2.4 required=5.0 tests=AWL=0.217, BAYES_00=-2.599 autolearn=ham Subject: Re: [vdr] No Audio on ATSC Qam256 or OTA.. X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2009 05:03:09 -0000 Status: O X-Status: X-Keywords: X-UID: 21790 Klaus Schmidinger wrote: > On 02.08.2009 19:22, Alex Lasnier wrote: >> Klaus Schmidinger wrote: >>> On 07/30/09 01:05, Rob Davis wrote: >>>> Stile wrote: >>>>> On Tue, Jun 23, 2009 at 12:43 PM, Rob Davis >>>>> wrote: >>>>> >>>>>> Alex Lasnier wrote: >>>>>> >>>>>>> Rob Davis wrote: >>>>>>> >>>>>>> >>>>>>>> I have it normally connected to Comcast cable which should pipe >>>>>>>> through >>>>>>>> a bunch of FTV channels using QAM256. These I can see and hear in >>>>>>>> kaffeine with AC97 audio. However, in VDR it appears to change the >>>>>>>> pids >>>>>>>> automatically so that the audio stops working. If I manually change >>>>>>>> VDR >>>>>>>> to not auto update and put the APID in then it squeeks rather than >>>>>>>> works. However, streaming to mplayer using streamdev seems to work. >>>>>>>> (It >>>>>>>> does the same this with OTA channels too - although I can only get 4 >>>>>>>> with a portable antenna.) >>>>>>>> >>>>>>>> >>>>>>> ATSC uses only AC-3 audio, so the Apid should be 0 and the Dpid >>>>>>> needs to >>>>>>> be set appropriately. Since the sound squeaks, whatever value you >>>>>>> have >>>>>>> set for the Apid should be the Dpid. >>>>>>> >>>>>>> For example, >>>>>>> >>>>>>> WIFR-Wx:495000:M256:C:0:1984:0;Dpid:0:0:2:0:0:0 >>>>>>> >>>>>>> >>>>>>> >>>>>> Perfect... Thanks >>>>>> >>>>>> Is there a way to keep auto update on, but stop Comcast from sending >>>>>> wrong pids? It keeps settings all audio options to 0 and some vpids >>>>>> too? >>>>>> >>>>>> >>>>> The streamtype for those AC3 PIDs is 0x81. Adding this to pat.c will >>>>> add the digital PIDs correctly. >>>>> >>>>> --- pat.c~ 2009-06-22 12:28:08.000000000 -0400 >>>>> +++ pat.c 2009-06-22 13:32:48.461538560 -0400 >>>>> @@ -432,6 +432,9 @@ >>>>> } >>>>> } >>>>> break; >>>>> + case 0x81: // AC3 DPIDs >>>>> + Dpids[NumDpids++] = stream.getPid(); >>>>> + break; >>>>> //default: printf("PID: %5d %5d %2d %3d %3d\n", >>>>> pmt.getServiceId(), stream.getPid(), stream.getStreamType(), >>>>> pmt.getVersionNumber(), Channel->Number());//XXX >>>>> } >>>>> for (SI::Loop::Iterator it; (d = >>>>> (SI::CaDescriptor*)stream.streamDescriptors.getNext(it, >>>>> SI::CaDescriptorTag)); ) { >>>>> >>>>> >>>> Perfect. I wonder if this could go in the atscepg patch? >>> Can you try if this also works if you insert the line >>> >>> case 0x81: // AC3 DPIDs >>> >>> after the line >>> >>> //XXX case 8: // STREAMTYPE_13818_DSMCC >>> >>> instead? I'm asking because I'd like to see whether there are >>> also language descriptors available... >>> >>> Klaus >> Yes, language descriptors are present. However, ATSC also uses 0x81 as >> the AC3 descriptor tag. So we need another >> >> case 0x81: >> >> after >> >> case SI::AC3DescriptorTag: > > In case this is still current, can you please send me a (tested) patch? > > Klaus > Sure, please see the attached patch. diff -ur vdr-1.7.10.orig/dvbdevice.c vdr-1.7.10/dvbdevice.c --- vdr-1.7.10.orig/dvbdevice.c 2009-06-06 07:17:20.000000000 -0400 +++ vdr-1.7.10/dvbdevice.c 2009-11-22 13:26:57.000000000 -0500 @@ -319,6 +319,16 @@ tuneTimeout = DVBT_TUNE_TIMEOUT; lockTimeout = DVBT_LOCK_TIMEOUT; } + else if (frontendType == SYS_ATSC) { + // ATSC + SETCMD(DTV_DELIVERY_SYSTEM, frontendType); + SETCMD(DTV_FREQUENCY, FrequencyToHz(channel.Frequency())); + SETCMD(DTV_INVERSION, channel.Inversion()); + SETCMD(DTV_MODULATION, channel.Modulation()); + + tuneTimeout = DVBT_TUNE_TIMEOUT; + lockTimeout = DVBT_LOCK_TIMEOUT; + } else { esyslog("ERROR: attempt to set channel with unknown DVB frontend type"); return false; @@ -904,7 +914,7 @@ return type == cSource::stNone || type == cSource::stCable && (frontendType == SYS_DVBC_ANNEX_AC || frontendType == SYS_DVBC_ANNEX_B) || type == cSource::stSat && (frontendType == SYS_DVBS || frontendType == SYS_DVBS2) - || type == cSource::stTerr && (frontendType == SYS_DVBT); + || type == cSource::stTerr && (frontendType == SYS_DVBT || frontendType == SYS_ATSC); } bool cDvbDevice::ProvidesTransponder(const cChannel *Channel) const diff -ur vdr-1.7.10.orig/pat.c vdr-1.7.10/pat.c --- vdr-1.7.10.orig/pat.c 2009-08-16 11:01:03.000000000 -0400 +++ vdr-1.7.10/pat.c 2009-11-22 13:31:37.000000000 -0500 @@ -389,6 +389,7 @@ break; case 5: // STREAMTYPE_13818_PRIVATE case 6: // STREAMTYPE_13818_PES_PRIVATE + case 0x81: // ATSC AC-3 //XXX case 8: // STREAMTYPE_13818_DSMCC { int dpid = 0; @@ -397,6 +398,7 @@ for (SI::Loop::Iterator it; (d = stream.streamDescriptors.getNext(it)); ) { switch (d->getDescriptorTag()) { case SI::AC3DescriptorTag: + case 0x81: // ATSC AC-3 descriptor tag dpid = esPid; break; case SI::SubtitlingDescriptorTag: diff -ur vdr-1.7.10.orig/remux.c vdr-1.7.10/remux.c --- vdr-1.7.10.orig/remux.c 2009-11-22 06:23:27.000000000 -0500 +++ vdr-1.7.10/remux.c 2009-11-22 13:31:28.000000000 -0500 @@ -532,6 +532,7 @@ } break; case 0x06: // STREAMTYPE_13818_PES_PRIVATE + case 0x81: // ATSC AC-3 { int dpid = 0; char lang[MAXLANGCODE1] = ""; @@ -539,6 +540,7 @@ for (SI::Loop::Iterator it; (d = stream.streamDescriptors.getNext(it)); ) { switch (d->getDescriptorTag()) { case SI::AC3DescriptorTag: + case 0x81: // ATSC AC-3 descriptor tag dbgpatpmt(" AC3"); dpid = stream.getPid(); break;