From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: HVR-4000 DVB can't scan or tune (properly) with Xen Date: Tue, 15 Nov 2011 09:31:32 -0500 Message-ID: <20111115143131.GB22675@phenom.dumpdata.com> References: <20111114183807.GA15284@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "jonathanjstevens@gmail.com" Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, Nov 15, 2011 at 12:52:56AM +0000, jonathanjstevens@gmail.com wrot= e: > > > > Excellent. Everything that is new. >=20 > Shiney. :) >=20 > > > >> > >> When I boot without Xen the DVB PCI cards can tune and scan perfectl= y. > >> I also have a USB DVB unit, which can tune and scan regardless of > >> whether Xen is running. However when I try to scan and tune with the > >> PCI DVB cards it fails. > > > > OK, and you are _not_ passing it to a guest right? >=20 > Indeed not, this is in dom0. I do not have IOMMU so my dvb stuff will > run in dom0. >=20 >=20 > >> > >> [ =A0 26.572693] cx88[1]/1: IRQ loop detected, disabling interrupts > >> [ =A0 26.574810] cx88[1]: irq aud [0x1001] dn_risci1* dn_sync* > > > > Great. Can you do a couple of tests: >=20 > Certainly. However, first I will say that I have made the above > messages go away. I had been trying various boot options based on what > I had been reading on net. I was using irqpoll at the time that those > messages appeared. Removing irqpoll has stopped them from occurring. > Hopefully that is useful information in itself. Why did pick irqpoll? Was there something in the past that was hanging on= your box. >=20 > > > > 1). Boot your Linux machine with 'mem=3D3G' and see if that makes the= issue > > =A0 =A0disappear. >=20 > I have tried mem=3D2G and 4G (not 3 but I will if you think it'll be di= fferent). > I have also been trying with ballooning disabled, and with dom0_mem=3D2= G / 4G > I also tried swiotlb=3D65762 > I have tried most combinations of the above - but not necessarily all. And all fail? Was this with the irqpoll option? Is this a two socket box? >=20 >=20 > > > > 2). Tell me what is the 'scan' tool you use? Is it there a command > > =A0 line version of the tool that triggers this? > > > I've been using as many as I can try. > Mainly it's the F16 provided scandvb, which I think is just a renamed > dvbscan and also w_scan. > I've also tried mplayer, xine, kaffeine, and mythtv. I haven't got vlc > to compile yet... rpmfusion has a version of it built for F16. >=20 > I think I have a bit more information for you after today's hacking abo= ut. > First off there was a kernel update, so I'm now at >=20 > Linux mythtvtuner.home 3.1.1-1.fc16.x86_64 #1 SMP Fri Nov 11 21:47:56 > UTC 2011 x86_64 x86_64 x86_64 GNU/Linux >=20 >=20 > >From what I can see I think in fact the tuning works OK, but there is > some sort of issue getting at the streams once tuned. > e.g. tzap will get a lock OK > > tzap -a 1 -f 1 -d 1 -c ~/tzap.channels.conf "BBC ONE(BBC)" > using '/dev/dvb/adapter1/frontend1' and '/dev/dvb/adapter1/demux1' > tuning to 650000000 Hz > video pid 0x0065, audio pid 0x0066 > status 01 | signal 5151 | snr 8000 | ber 00003fff | unc 00000000 | > status 1f | signal 4e4e | snr ffff | ber 00000000 | unc 00000000 | FE_H= AS_LOCK > status 1f | signal 4e4e | snr ffff | ber 00000000 | unc 00000000 | FE_H= AS_LOCK >=20 >=20 > I don't know if the following is useful? >=20 > root@mythtvtuner jon]# strace -f -v scandvb -a 1 -f1 -d 0 -5 -v -v -v > ~jon/dvbscan.channels.conf > execve("/usr/bin/scandvb", ["scandvb", "-a", "1", "-f1", "-d", "0", > "-5", "-v", "-v", "-v", "/home/jon/dvbscan.channels.conf"], > ["XDG_SESSION_ID=3D69", "HOSTNAME=3Dmythtvtuner.home", "SHELL=3D/bin/ba= sh", > "TERM=3Dxterm", "HISTSIZE=3D1000", "SSH_CLIENT=3D192.168.2.179 48391 2"= ..., > "SSH_TTY=3D/dev/pts/7", "USER=3Djon", > "LS_COLORS=3Drs=3D0:di=3D01;34:ln=3D01;36"..., > "PATH=3D/usr/lib64/ccache:/usr/loca"..., "MAIL=3D/var/spool/mail/jon", > "PWD=3D/home/jon", "XMODIFIERS=3D@im=3Dnone", "LANG=3Den_US.UTF-8", > "KDE_IS_PRELINKED=3D1", "KDEDIRS=3D/usr", "HISTCONTROL=3Dignoredups", > "HOME=3D/root", "SHLVL=3D2", "LOGNAME=3Djon", "CVS_RSH=3Dssh", > "SSH_CONNECTION=3D192.168.2.179 483"..., > "LESSOPEN=3D||/usr/bin/lesspipe.sh "..., > "XDG_RUNTIME_DIR=3D/run/user/jon", "_=3D/usr/bin/strace"]) =3D 0 > brk(0) =3D 0x20fe000 > mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, > 0) =3D 0x7ff5ccd7a000 > access("/etc/ld.so.preload", R_OK) =3D -1 ENOENT (No such file or = directory) > open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) =3D 3 > fstat(3, {st_dev=3Dmakedev(253, 1), st_ino=3D132752, st_mode=3DS_IFREG|= 0644, > st_nlink=3D1, st_uid=3D0, st_gid=3D0, st_blksize=3D4096, st_blocks=3D22= 4, > st_size=3D112482, st_atime=3D2011/11/14-12:23:08, > st_mtime=3D2011/11/14-12:23:06, st_ctime=3D2011/11/14-12:23:06}) =3D 0 > mmap(NULL, 112482, PROT_READ, MAP_PRIVATE, 3, 0) =3D 0x7ff5ccd5e000 > close(3) =3D 0 > open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) =3D 3 > read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\27\2\2008\0= \0\0"..., > 832) =3D 832 > fstat(3, {st_dev=3Dmakedev(253, 1), st_ino=3D157705, st_mode=3DS_IFREG|= 0755, > st_nlink=3D1, st_uid=3D0, st_gid=3D0, st_blksize=3D4096, st_blocks=3D40= 32, > st_size=3D2063512, st_atime=3D2011/11/14-23:30:01, > st_mtime=3D2011/10/26-20:57:26, st_ctime=3D2011/11/09-23:29:49}) =3D 0 > mmap(0x3880000000, 3884344, PROT_READ|PROT_EXEC, > MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =3D 0x3880000000 > mprotect(0x38801aa000, 2097152, PROT_NONE) =3D 0 > mmap(0x38803aa000, 24576, PROT_READ|PROT_WRITE, > MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1aa000) =3D 0x38803aa000 > mmap(0x38803b0000, 17720, PROT_READ|PROT_WRITE, > MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) =3D 0x38803b0000 > close(3) =3D 0 > mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, > 0) =3D 0x7ff5ccd5d000 > mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, > 0) =3D 0x7ff5ccd5c000 > mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, > 0) =3D 0x7ff5ccd5b000 > arch_prctl(ARCH_SET_FS, 0x7ff5ccd5c700) =3D 0 > mprotect(0x38803aa000, 16384, PROT_READ) =3D 0 > mprotect(0x387fe21000, 4096, PROT_READ) =3D 0 > munmap(0x7ff5ccd5e000, 112482) =3D 0 > write(2, "scanning /home/jon/dvbscan.chann"..., 41scanning > /home/jon/dvbscan.channels.conf > ) =3D 41 > write(2, "using '/dev/dvb/adapter1/fronten"..., 67using > '/dev/dvb/adapter1/frontend1' and '/dev/dvb/adapter1/demux0' > ) =3D 67 > open("/dev/dvb/adapter1/frontend1", O_RDWR) =3D 3 > ioctl(3, FE_GET_INFO, 0x60a640) =3D 0 > rt_sigaction(SIGINT, {0x403300, [INT], SA_RESTORER|SA_RESTART, > 0x3880036320}, {SIG_DFL, [], 0}, 8) =3D 0 > brk(0) =3D 0x20fe000 > brk(0x211f000) =3D 0x211f000 > brk(0) =3D 0x211f000 > open("/home/jon/dvbscan.channels.conf", O_RDONLY) =3D 4 > fstat(4, {st_dev=3Dmakedev(253, 16), st_ino=3D1704027, > st_mode=3DS_IFREG|0664, st_nlink=3D1, st_uid=3D1000, st_gid=3D1000, > st_blksize=3D4096, st_blocks=3D8, st_size=3D1028, > st_atime=3D2011/11/14-15:05:46, st_mtime=3D2011/11/10-23:05:38, > st_ctime=3D2011/11/10-23:05:38}) =3D 0 > mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, > 0) =3D 0x7ff5ccd79000 > read(4, "#-------------------------------"..., 4096) =3D 1028 > write(2, "initial transponder 650000000 0 "..., 44initial transponder > 650000000 0 9 9 6 2 4 4 > ) =3D 44 > write(2, "initial transponder 754000000 0 "..., 44initial transponder > 754000000 0 3 9 3 1 0 0 > ) =3D 44 > write(2, "initial transponder 794000000 0 "..., 44initial transponder > 794000000 0 2 9 3 1 0 0 > ) =3D 44 > write(2, "initial transponder 738000000 0 "..., 44initial transponder > 738000000 0 2 9 3 1 0 0 > ) =3D 44 > write(2, "initial transponder 690000000 0 "..., 44initial transponder > 690000000 0 2 9 3 1 0 0 > ) =3D 44 > write(2, "initial transponder 722000000 0 "..., 44initial transponder > 722000000 0 2 9 3 1 0 0 > ) =3D 44 > write(2, "initial transponder 706000000 0 "..., 44initial transponder > 706000000 0 9 9 6 2 4 4 > ) =3D 44 > write(2, "initial transponder 842000000 0 "..., 44initial transponder > 842000000 0 9 9 6 2 4 4 > ) =3D 44 > read(4, "", 4096) =3D 0 > close(4) =3D 0 > munmap(0x7ff5ccd79000, 4096) =3D 0 > write(2, ">>> tune to: ", 13>>> tune to: ) =3D 13 > write(2, "650000000:", 10650000000:) =3D 10 > write(2, "INVERSION_AUTO:", 15INVERSION_AUTO:) =3D 15 > write(2, "BANDWIDTH_8_MHZ:", 16BANDWIDTH_8_MHZ:) =3D 16 > write(2, "FEC_AUTO:", 9FEC_AUTO:) =3D 9 > write(2, "FEC_AUTO:", 9FEC_AUTO:) =3D 9 > write(2, "QAM_AUTO:", 9QAM_AUTO:) =3D 9 > write(2, "TRANSMISSION_MODE_AUTO:", 23TRANSMISSION_MODE_AUTO:) =3D 23 > write(2, "GUARD_INTERVAL_AUTO:", 20GUARD_INTERVAL_AUTO:) =3D 20 > write(2, "HIERARCHY_AUTO", 14HIERARCHY_AUTO) =3D 14 > write(2, "\n", 1 > ) =3D 1 > ioctl(3, FE_SET_FRONTEND, 0x7fffe82681c0) =3D 0 > nanosleep({0, 200000000}, NULL) =3D 0 > ioctl(3, FE_READ_STATUS, 0x7fffe82681ec) =3D 0 > write(2, ">>> tuning status =3D=3D 0x01\n", 26>>> tuning status =3D=3D = 0x01 > ) =3D 26 > nanosleep({0, 200000000}, NULL) =3D 0 > ioctl(3, FE_READ_STATUS, 0x7fffe82681ec) =3D 0 > write(2, ">>> tuning status =3D=3D 0x1f\n", 26>>> tuning status =3D=3D = 0x1f > ) =3D 26 > open("/dev/dvb/adapter1/demux0", O_RDWR|O_NONBLOCK) =3D 4 > ioctl(4, DMX_SET_FILTER, 0x7fffe8266fc0) =3D 0 > open("/dev/dvb/adapter1/demux0", O_RDWR|O_NONBLOCK) =3D 5 > ioctl(5, DMX_SET_FILTER, 0x7fffe8266fc0) =3D 0 > open("/dev/dvb/adapter1/demux0", O_RDWR|O_NONBLOCK) =3D 6 > ioctl(6, DMX_SET_FILTER, 0x7fffe8266fc0) =3D 0 > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D5, events=3DPOLLIN}, {fd=3D4, > events=3DPOLLIN}], 3, 1000) =3D 0 (Timeout) > write(2, "WARNING: filter timeout pid 0x00"..., 35WARNING: filter > timeout pid 0x0011 > ) =3D 35 > ioctl(5, DMX_STOP, 0x38803b0a80) =3D 0 > close(5) =3D 0 > poll([{fd=3D6, events=3DPOLLIN}, {fd=3D4, events=3DPOLLIN}], 2, 1000) =3D= 0 (Timeout) > write(2, "WARNING: filter timeout pid 0x00"..., 35WARNING: filter > timeout pid 0x0000 > ) =3D 35 > ioctl(4, DMX_STOP, 0x38803b0a80) =3D 0 > close(4) =3D 0 > poll([{fd=3D6, events=3DPOLLIN}], 1, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}], 1, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}], 1, 1000) =3D 0 (Timeout) > poll([{fd=3D6, events=3DPOLLIN}], 1, 1000^C >=20 > etc... >=20 > Occasionally the POLLIN doesn't timeout (since kernel upgrade), but > the data can't seem to be interpreted (my guess) and I can't find what > makes this occur (and I can't seem to make it happen right now > annoyingly!). > I don't want to bombard you with unwanted diags but can capture more > fully similar to above if useful? >=20 >=20 >=20 > > 3). Or does this happend when you just load the module and it starts > > =A0 doing the IRQ loop detected' thingy? >=20 > Not entirely sure, can recreate by turning irqpoll back on and testing > if you want? From memory there were very few of the > >> [ =A0 26.572693] cx88[1]/1: IRQ loop detected, disabling interrupts >=20 > but lots and lots of: > >> [ =A0 26.574810] cx88[1]: irq aud [0x1001] dn_risci1* dn_sync* Well, that one is the worry some one. It reads as if it can't get the interrupts fast enough, which would be worrysome. I think I need to look at the code itself to get a better understanding of where that 'irq aud ..' is. Are there cheap versions of these DVB cards? I've only Hauppage PV-150 wh= ich works for me, but that is not a DVB type card.