Hi all, subject says it all. This patch (that applies to trunk, but probably also for 0.21.fixes) allows myth to tune with the latest multiproto drivers. No DVB-S2 support here, its a crude patch, but it works for DVB-S. Bye Manu
--- ../../trunk/mythtv/libs/libmythtv/dvbchannel.cpp 2008-07-10 22:02:57.000000000 -0400 +++ libs/libmythtv/dvbchannel.cpp 2008-07-11 18:33:33.000000000 -0400 @@ -211,8 +211,16 @@ } VERBOSE(VB_IMPORTANT, LOC + "Getting additional DVBFE_GET_INFO information." + ENO); dvbfe_info fe_info; + enum dvbfe_delsys delsys = DVBFE_DELSYS_DVBS; bzero(&fe_info, sizeof(fe_info)); - fe_info.delivery = DVBFE_DELSYS_DVBS; + if (ioctl(fd_frontend, DVBFE_SET_DELSYS, &delsys)<0) + { + VERBOSE(VB_IMPORTANT, LOC_ERR + "Failed to set delivery system." + ENO); + close(fd_frontend); + fd_frontend = -1; + } + + //fe_info.delivery = DVBFE_DELSYS_DVBS; if (ioctl(fd_frontend, DVBFE_GET_INFO, &fe_info) < 0) { VERBOSE(VB_IMPORTANT, LOC_ERR + @@ -773,42 +781,49 @@ // check for multiproto API if ((DVB_API_VERSION == 3) && (DVB_API_VERSION_MINOR == 3)) { struct dvbfe_params fe_params; - unsigned int delsys = DVBFE_DELSYS_DVBS; //TODO: should come from configuration/database + enum dvbfe_delsys delsys = DVBFE_DELSYS_DVBS; //TODO: should come from configuration/database VERBOSE(VB_CHANNEL, LOC + "Tune(): " + QString("API minor version=%1, delivery system = %2").arg(DVB_API_VERSION_MINOR).arg(delsys)); fe_params.frequency = params.frequency; - fe_params.inversion = DVBFE_INVERSION_AUTO; + fe_params.inversion = INVERSION_AUTO; switch (delsys) { - case DVBFE_DELSYS_DVBS: - fe_params.delsys.dvbs.symbol_rate = params.u.qpsk.symbol_rate; - fe_params.delsys.dvbs.fec = DVBFE_FEC_AUTO; - fe_params.delsys.dvbs.modulation = DVBFE_MOD_AUTO; - fe_params.delivery= DVBFE_DELSYS_DVBS; - VERBOSE(VB_CHANNEL, LOC + "Tune(): " + - QString("Frequency = %2, Srate = %3 (DVB-S)")..arg(fe_params.frequency).arg(fe_params.delsys.dvbs.symbol_rate)); - break; - case DVBFE_DELSYS_DVBS2: - fe_params.delsys.dvbs2.symbol_rate = params.u.qpsk.symbol_rate; //TODO: should use the new symbol_rate type - fe_params.delsys.dvbs2.fec = DVBFE_FEC_AUTO; //TODO: should use the new FEC options - fe_params.delsys.dvbs.modulation = DVBFE_MOD_AUTO; - fe_params.delivery= DVBFE_DELSYS_DVBS2; - VERBOSE(VB_CHANNEL, LOC + "Tune(): " + - QString("Frequency = %2, Srate = %3 (DVB-S2)").arg(fe_params.frequency).arg(fe_params.delsys.dvbs2.symbol_rate)); - break; - default: - return false; + case DVBFE_DELSYS_DVBS: + fe_params.delsys.dvbs.symbol_rate = params.u.qpsk.symbol_rate; + fe_params.delsys.dvbs.fec = DVBFE_FEC_AUTO; + fe_params.delsys.dvbs.modulation = DVBFE_MOD_AUTO; + //fe_params.delivery= DVBFE_DELSYS_DVBS; + VERBOSE(VB_CHANNEL, LOC + "Tune(): " + + QString("Frequency = %2, Srate = %3 (DVB-S)") + .arg(fe_params.frequency).arg(fe_params.delsys.dvbs.symbol_rate)); + break; + case DVBFE_DELSYS_DVBS2: + fe_params.delsys.dvbs2.symbol_rate = params.u.qpsk.symbol_rate; //TODO: should use the new symbol_rate type + fe_params.delsys.dvbs2.fec = DVBFE_FEC_AUTO; //TODO: should use the new FEC options + fe_params.delsys.dvbs.modulation = DVBFE_MOD_AUTO; + fe_params.delivery= DVBFE_DELSYS_DVBS2; + VERBOSE(VB_CHANNEL, LOC + "Tune(): " + + QString("Frequency = %2, Srate = %3 (DVB-S2)") + .arg(fe_params.frequency).arg(fe_params.delsys.dvbs2.symbol_rate)); + break; + default: + return false; } VERBOSE(VB_CHANNEL, LOC + "Tune(): " + - QString("Frequency = %1, Srate = %2 (SET_PARAMS)").arg(fe_params.frequency).arg(fe_params.delsys.dvbs.symbol_rate)); - + QString("Frequency = %1, Srate = %2 (SET_PARAMS)").arg(fe_params.frequency).arg(fe_params.delsys.dvbs.symbol_rate)); + + if (ioctl(fd_frontend, DVBFE_SET_DELSYS, &delsys) < 0) { + VERBOSE(VB_IMPORTANT, LOC_ERR + + "Tune(): " + "DVB_SET_DELSYS failed"); + return false; + } if (ioctl(fd_frontend, DVBFE_SET_PARAMS, &fe_params) == -1) { - VERBOSE(VB_IMPORTANT, LOC_ERR + "Tune(): " + - "DVBFE_SET_PARAMS failed"); - return false; + VERBOSE(VB_IMPORTANT, LOC_ERR + "Tune(): " + + "DVBFE_SET_PARAMS failed"); + return false; } }
_______________________________________________ linux-dvb mailing list linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb