Autor Thema: Using two tuners  (Gelesen 19110 mal)

Hans2004

  • Newbie
  • *
  • Beiträge: 3
    • Profil anzeigen
Using two tuners
« am: Dezember 20, 2010, 07:16:06 Nachmittag »
I love my Sundtek MediaTV. It works very well with MythTV and scanning for channels is easy and fast, both with DVBC and analog television.

Is it possible to use two MediaTV sticks, so one can record on one channel and watch on another at the same time? If so, how do I specify with mediaclient which stick I put in a certain mode?

For example if I want to put one stick in DVBT mode and another one on the same machine in DVBC mode. How do I specify with the mediaclient command which stick I want to put that mode into?

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8604
    • Profil anzeigen
Re:Using two tuners
« Antwort #1 am: Dezember 20, 2010, 07:57:18 Nachmittag »
Hi,

using 2 Sticks is possible yes.

you can create a batch file and use a simple configuration option of the driver

/etc/sundtek.conf
Zitat
device_attach=/usr/bin/mythtvrestarter.sh

/usr/bin/mythtvrestarter.sh
Zitat
#!/bin/bash
sleep 3 # just wait a few seconds until some other application which gets triggered by udev is done accessing analog TV
if [ "$1" = "0" ]; then
 /opt/bin/mediaclient -DDVBC -d /dev/dvb/adapter0/frontend0
fi
if [ "$1" = "1" ]; then
 /opt/bin/mediaclient -DDVBT -d /dev/dvb/adapter1/frontend0
fi
/etc/init.d/mythtv restart

actually this will cause mythtv to restart twice, but since you have 2 devices you could just put it into the second "if" check. Please note the $1 parameter does not refer to the adapterid, it refers to the deviceid which is retrieved by /opt/bin/mediaclient -e

the device_attach parameter will be called when the device is fully available to the system
« Letzte Änderung: Dezember 20, 2010, 07:58:51 Nachmittag von Sundtek »
Failure is a good thing! I'll fix it

Hans2004

  • Newbie
  • *
  • Beiträge: 3
    • Profil anzeigen
Re:Using two tuners
« Antwort #2 am: Dezember 28, 2010, 09:56:48 Nachmittag »
Thank you for the fast reply. That solved both my questions.

Benny

  • Newbie
  • *
  • Beiträge: 3
    • Profil anzeigen
Re:Using two tuners
« Antwort #3 am: Februar 15, 2012, 11:39:19 Nachmittag »
Hi there,

I'm sorry to raise an old thread but I'm having a problem using 2 tuners.
The system I have is ubuntu with tvheadend and using xbmc.

I use the script in this post: http://support.sundtek.com/index.php/topic,800.0.html

But when I start xbmc it seems only one tuner is available. I cannot watch one channel and record on another. Both tuners are set for dvb-c.

Mediaclient -e lists the following:
Zitat
benny@XBMCLive:~$ mediaclient -e
**** List of Media Hardware Devices ****
device 0: [ Sundtek MediaTV Pro]  DVB-C, DVB-T, ANALOG-TV, FM-RADIO, REMOTE-CONTROL, OSS-AUDIO, RDS
  [SERIAL]:
     ID: 02043952
  [DVB-C]:
     FRONTEND: /dev/dvb/adapter0/frontend0
     DVR: /dev/dvb/adapter0/dvr0
     DMX: /dev/dvb/adapter0/demux0
  [DVB-T]:
     FRONTEND: /dev/dvb/adapter0/frontend0
     DVR: /dev/dvb/adapter0/dvr0
     DMX: /dev/dvb/adapter0/demux0
  [ANALOG-TV]:
     VIDEO0: /dev/video0
     VBI0: /dev/vbi0
  [FM-RADIO]:
     RADIO0: /dev/radio0
     RDS: /dev/rds0
  [REMOTECONTROL]:
     INPUT0: /dev/mediainput0
  [OSS]:
     OSS0: /dev/dsp0

device 1: [ Sundtek MediaTV Pro]  DVB-C, DVB-T, ANALOG-TV, FM-RADIO, REMOTE-CONTROL, OSS-AUDIO, RDS
  [SERIAL]:
     ID: 02043971
  [DVB-C]:
     FRONTEND: /dev/dvb/adapter1/frontend0
     DVR: /dev/dvb/adapter1/dvr0
     DMX: /dev/dvb/adapter1/demux0
  [DVB-T]:
     FRONTEND: /dev/dvb/adapter1/frontend0
     DVR: /dev/dvb/adapter1/dvr0
     DMX: /dev/dvb/adapter1/demux0
  [ANALOG-TV]:
     VIDEO0: /dev/video1
     VBI0: /dev/vbi1
  [FM-RADIO]:
     RADIO0: /dev/radio1
     RDS: /dev/rds1
  [REMOTECONTROL]:
     INPUT0: /dev/mediainput1
  [OSS]:
     OSS0: /dev/dsp1

Anyone got any tips for how to proceed?

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8604
    • Profil anzeigen
Re:Using two tuners
« Antwort #4 am: Februar 16, 2012, 07:46:07 Vormittag »
Did you check if tvheadend is using both tuners?

Zitat
/opt/bin/mediaclient --lc # list clients
Failure is a good thing! I'll fix it

Benny

  • Newbie
  • *
  • Beiträge: 3
    • Profil anzeigen
Re:Using two tuners
« Antwort #5 am: Februar 16, 2012, 11:23:56 Vormittag »
Hi,

Looks like it:


Zitat
benny@XBMCLive:/opt/bin$ mediaclient --lc #list clients
**** List of Media Clients ****
/dev/dvb/adapter0/frontend0:
  1601 ... tvheadend
/dev/dvb/adapter0/dvr0:
  1601 ... tvheadend
/dev/dvb/adapter0/demux0:
  1601 ... tvheadend (0000)
  1601 ... tvheadend (0001)
  1601 ... tvheadend (0010)
  1601 ... tvheadend (0011)
  1601 ... tvheadend (0012)
  1601 ... tvheadend (0300)
  1601 ... tvheadend (0104)
  1601 ... tvheadend (0108)
  1601 ... tvheadend (0101)
  1601 ... tvheadend (0122)
  1601 ... tvheadend (0106)
  1601 ... tvheadend (0105)
  1601 ... tvheadend (0107)
  1601 ... tvheadend (0196)
  1601 ... tvheadend (0193)
  1601 ... tvheadend (0194)
  1601 ... tvheadend (0195)
  1601 ... tvheadend (0197)
  1601 ... tvheadend (0152)
  1601 ... tvheadend (0151)
  1601 ... tvheadend (0153)
/dev/video0:
  No client connected
/dev/vbi0:
  No client connected
/dev/radio0:
  No client connected
/dev/rds0:
  No client connected
/dev/mediainput0:
  No client connected
/dev/dsp0:
  No client connected
/dev/dvb/adapter1/frontend0:
  1601 ... tvheadend
/dev/dvb/adapter1/dvr0:
  1601 ... tvheadend
/dev/dvb/adapter1/demux0:
  1601 ... tvheadend (0000)
  1601 ... tvheadend (0001)
  1601 ... tvheadend (0010)
  1601 ... tvheadend (0011)
  1601 ... tvheadend (0012)
  1601 ... tvheadend (0122)
  1601 ... tvheadend (0107)
  1601 ... tvheadend (0106)
  1601 ... tvheadend (0133)
  1601 ... tvheadend (0104)
  1601 ... tvheadend (0105)
  1601 ... tvheadend (0101)
  1601 ... tvheadend (0152)
  1601 ... tvheadend (0153)
  1601 ... tvheadend (0154)
  1601 ... tvheadend (0155)
  1601 ... tvheadend (0146)
  1601 ... tvheadend (0300)
/dev/video1:
  No client connected
/dev/vbi1:
  No client connected
/dev/radio1:
  No client connected
/dev/rds1:
  No client connected
/dev/mediainput1:
  No client connected
/dev/dsp1:
  No client connected

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8604
    • Profil anzeigen
Re:Using two tuners
« Antwort #6 am: Februar 16, 2012, 11:30:15 Vormittag »
According to that output tvheadend sees 2 tuners, so the problem might be somewhere in xbmc not between the tuner and tvheadend it seems.

I have a small problem understanding your problem, does it only happen sometimes or always?
« Letzte Änderung: Februar 16, 2012, 11:52:47 Vormittag von Sundtek »
Failure is a good thing! I'll fix it

Benny

  • Newbie
  • *
  • Beiträge: 3
    • Profil anzeigen
Re:Using two tuners
« Antwort #7 am: Februar 16, 2012, 12:05:16 Nachmittag »
Hi,

Thanks for you response.
I'll try to describe it better.

I have 2 tuners.
in XBMC when I try to record something and then switch channel, I get the message that the tuner is already in use.

This means even though there are 2 tuners only 1 of them is available.
And from what I can see, tvheadend finds both tuners. When scanning muxes I've done it on both tuners, so it seems that both of them are atleast working.

I'm guessing it's probably an issue with tvheadend not beeing able to select the second tuner when I watch 2 different channels.

Guess I'm stuck with one tuner for the time beeing.
Oh and thanks for your help, much appreciated.

I'll be looking out for XBMC and tvheadend updates. I'm guessing it's an issue there that has to be solved.

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8604
    • Profil anzeigen
Re:Using two tuners
« Antwort #8 am: Februar 16, 2012, 12:12:41 Nachmittag »
You might check what tvheadend is doing with both tuners, following commands will show up the signal statistics and frequency parameters

Zitat
/opt/bin/mediaclient --readsignal=0 -d /dev/dvb/adapter0/frontend0

and on another terminal:
Zitat
/opt/bin/mediaclient --readsignal=0 -d /dev/dvb/adapter1/frontend0

(abort with ctrl-c since 0 means endless reading)

if both tuners show up the same frequency then there's something wrong with tvheadend, since the second tuner should only be used with another frequency.
Failure is a good thing! I'll fix it