* em28xx mode switching @ 2009-10-12 22:12 Devin Heitmueller 2009-10-12 22:31 ` Antti Palosaari 2009-10-12 23:33 ` em28xx mode switching hermann pitton 0 siblings, 2 replies; 9+ messages in thread From: Devin Heitmueller @ 2009-10-12 22:12 UTC (permalink / raw) To: Linux Media Mailing List I was debugging an issue on a user's hybrid board, when I realized that we are switching the em28xx mode whenever we start and stop dvb streaming. We already have the ts_bus_ctrl callback implemented which puts the device into digital mode and puts it back into suspend whenever the frontend is opened/closed. This call seems redundant, and in fact can cause problems if the dvb_gpio definition strobes the reset pin, as it can put the driver out of sync with the demodulator's state (in fact this is what I ran into with the zl10353 - the reset pin got strobed when the streaming was started but the demod driver's init() routine was not being run because it already ran when the frontend was originally opened). The only case I can think of where toggling the device mode when starting/stopping dvb streaming might be useful is if we wanted to support being able to do an analog tune while the dvb frontend was still open but not streaming. However, this seems like this could expose all sorts of bugs, and I think the locking would have to be significantly reworked if this were a design goal. Thoughts anybody? Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: em28xx mode switching 2009-10-12 22:12 em28xx mode switching Devin Heitmueller @ 2009-10-12 22:31 ` Antti Palosaari 2009-10-12 23:04 ` Devin Heitmueller 2009-10-12 23:33 ` em28xx mode switching hermann pitton 1 sibling, 1 reply; 9+ messages in thread From: Antti Palosaari @ 2009-10-12 22:31 UTC (permalink / raw) To: Devin Heitmueller; +Cc: Linux Media Mailing List On 10/13/2009 01:12 AM, Devin Heitmueller wrote: > I was debugging an issue on a user's hybrid board, when I realized > that we are switching the em28xx mode whenever we start and stop dvb > streaming. We already have the ts_bus_ctrl callback implemented which > puts the device into digital mode and puts it back into suspend > whenever the frontend is opened/closed. > > This call seems redundant, and in fact can cause problems if the > dvb_gpio definition strobes the reset pin, as it can put the driver > out of sync with the demodulator's state (in fact this is what I ran > into with the zl10353 - the reset pin got strobed when the streaming > was started but the demod driver's init() routine was not being run > because it already ran when the frontend was originally opened). > > The only case I can think of where toggling the device mode when > starting/stopping dvb streaming might be useful is if we wanted to > support being able to do an analog tune while the dvb frontend was > still open but not streaming. However, this seems like this could > expose all sorts of bugs, and I think the locking would have to be > significantly reworked if this were a design goal. > > Thoughts anybody? > > Devin I ran this same trap few weeks ago when adding Reddo DVB-C USB Box support to em28xx :) Anyhow, since it is dvb only device I decided to switch from .dvb_gpio to .tuner_gpio to fix the problem. I haven't pull requested it yet. http://linuxtv.org/hg/~anttip/reddo-dvb-c/rev/38f946af568f Antti -- http://palosaari.fi/ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: em28xx mode switching 2009-10-12 22:31 ` Antti Palosaari @ 2009-10-12 23:04 ` Devin Heitmueller 2009-10-13 7:55 ` Alain Perrot 2009-10-13 18:27 ` xwang1976 0 siblings, 2 replies; 9+ messages in thread From: Devin Heitmueller @ 2009-10-12 23:04 UTC (permalink / raw) To: Antti Palosaari; +Cc: Linux Media Mailing List On Mon, Oct 12, 2009 at 6:31 PM, Antti Palosaari <crope@iki.fi> wrote: > I ran this same trap few weeks ago when adding Reddo DVB-C USB Box support > to em28xx :) Anyhow, since it is dvb only device I decided to switch from > .dvb_gpio to .tuner_gpio to fix the problem. I haven't pull requested it > yet. > http://linuxtv.org/hg/~anttip/reddo-dvb-c/rev/38f946af568f > > Antti > -- > http://palosaari.fi/ You were able to get by with using tuner_gpio instead of dvb_gpio because the Reddo isn't a hybrid device. I'm going to propose removing the calls to em28xx_set_mode() in start_streaming() and stop_streaming(). Given the supported boards that are there, I can regression test: EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 EM2880_BOARD_PINNACLE_PCTV_HD_PRO EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 EM2880_BOARD_TERRATEC_HYBRID_XS and I cannot regression test: EM2880_BOARD_KWORLD_DVB_310U (I have a strong suspicion this board is currently broken anyway) EM2882_BOARD_TERRATEC_HYBRID_XS (I worked with the authors of this one and can probably get them to test) EM2882_BOARD_EVGA_INDTUBE (I worked with the authors of this one and can probably get them to test) EM2880_BOARD_EMPIRE_DUAL_TV (I worked with the authors of this one and can probably get them to test) EM2881_BOARD_PINNACLE_HYBRID_PRO (this is the board I noticed the problem under) EM2883_BOARD_KWORLD_HYBRID_330U EM2870_BOARD_REDDO_DVB_C_USB_BOX Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: em28xx mode switching 2009-10-12 23:04 ` Devin Heitmueller @ 2009-10-13 7:55 ` Alain Perrot 2009-10-13 18:27 ` xwang1976 1 sibling, 0 replies; 9+ messages in thread From: Alain Perrot @ 2009-10-13 7:55 UTC (permalink / raw) To: Devin Heitmueller; +Cc: Antti Palosaari, Linux Media Mailing List On Tue, Oct 13, 2009 at 1:04 AM, Devin Heitmueller <dheitmueller@kernellabs.com> wrote: > On Mon, Oct 12, 2009 at 6:31 PM, Antti Palosaari <crope@iki.fi> wrote: >> I ran this same trap few weeks ago when adding Reddo DVB-C USB Box support >> to em28xx :) Anyhow, since it is dvb only device I decided to switch from >> .dvb_gpio to .tuner_gpio to fix the problem. I haven't pull requested it >> yet. >> http://linuxtv.org/hg/~anttip/reddo-dvb-c/rev/38f946af568f >> >> Antti >> -- >> http://palosaari.fi/ > > You were able to get by with using tuner_gpio instead of dvb_gpio > because the Reddo isn't a hybrid device. > > I'm going to propose removing the calls to em28xx_set_mode() in > start_streaming() and stop_streaming(). Given the supported boards > that are there, I can regression test: > > EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 > EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 > EM2880_BOARD_PINNACLE_PCTV_HD_PRO > EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 > EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 > EM2880_BOARD_TERRATEC_HYBRID_XS > > and I cannot regression test: > > EM2880_BOARD_KWORLD_DVB_310U (I have a strong suspicion this board is > currently broken anyway) > EM2882_BOARD_TERRATEC_HYBRID_XS (I worked with the authors of this one > and can probably get them to test) > EM2882_BOARD_EVGA_INDTUBE (I worked with the authors of this one and > can probably get them to test) > EM2880_BOARD_EMPIRE_DUAL_TV (I worked with the authors of this one and > can probably get them to test) > EM2881_BOARD_PINNACLE_HYBRID_PRO (this is the board I noticed the problem under) I own a Dazzle Hybrid Stick (2881:eb1a IIRC) which I believe use the same hardware as the Pinnacle Hybrid Pro. I can test it with DVB-T, but only on the weekend (I have only access to DVB-C during the week). > EM2883_BOARD_KWORLD_HYBRID_330U > EM2870_BOARD_REDDO_DVB_C_USB_BOX > > Devin > > -- > Devin J. Heitmueller - Kernel Labs > http://www.kernellabs.com -- Alain Perrot ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: em28xx mode switching 2009-10-12 23:04 ` Devin Heitmueller 2009-10-13 7:55 ` Alain Perrot @ 2009-10-13 18:27 ` xwang1976 2009-10-13 18:33 ` Devin Heitmueller 1 sibling, 1 reply; 9+ messages in thread From: xwang1976 @ 2009-10-13 18:27 UTC (permalink / raw) To: Devin Heitmueller; +Cc: Linux Media Mailing List Hi Devin, let me know if you need a tester for the EMPIRE_DUAL_TV. In case I will install the latest v4l driver on my old notebook which has a clean kubuntu 9.04 distro. On the newer notebook I'm using my new Dikom DK-300 device which does not work with the latest v4l drivers and which I can use using a patched version of the main v4l driver (thanks to Dainius Ridzevicius). If you have some spare time for this device too... Xwang Devin Heitmueller ha scritto: > On Mon, Oct 12, 2009 at 6:31 PM, Antti Palosaari <crope@iki.fi> wrote: >> I ran this same trap few weeks ago when adding Reddo DVB-C USB Box support >> to em28xx :) Anyhow, since it is dvb only device I decided to switch from >> .dvb_gpio to .tuner_gpio to fix the problem. I haven't pull requested it >> yet. >> http://linuxtv.org/hg/~anttip/reddo-dvb-c/rev/38f946af568f >> >> Antti >> -- >> http://palosaari.fi/ > > You were able to get by with using tuner_gpio instead of dvb_gpio > because the Reddo isn't a hybrid device. > > I'm going to propose removing the calls to em28xx_set_mode() in > start_streaming() and stop_streaming(). Given the supported boards > that are there, I can regression test: > > EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 > EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 > EM2880_BOARD_PINNACLE_PCTV_HD_PRO > EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 > EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 > EM2880_BOARD_TERRATEC_HYBRID_XS > > and I cannot regression test: > > EM2880_BOARD_KWORLD_DVB_310U (I have a strong suspicion this board is > currently broken anyway) > EM2882_BOARD_TERRATEC_HYBRID_XS (I worked with the authors of this one > and can probably get them to test) > EM2882_BOARD_EVGA_INDTUBE (I worked with the authors of this one and > can probably get them to test) > EM2880_BOARD_EMPIRE_DUAL_TV (I worked with the authors of this one and > can probably get them to test) > EM2881_BOARD_PINNACLE_HYBRID_PRO (this is the board I noticed the problem under) > EM2883_BOARD_KWORLD_HYBRID_330U > EM2870_BOARD_REDDO_DVB_C_USB_BOX > > Devin > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: em28xx mode switching 2009-10-13 18:27 ` xwang1976 @ 2009-10-13 18:33 ` Devin Heitmueller 2009-10-13 18:52 ` xwang1976 2009-10-24 22:01 ` Dikom DK-300 xwang1976 0 siblings, 2 replies; 9+ messages in thread From: Devin Heitmueller @ 2009-10-13 18:33 UTC (permalink / raw) To: xwang1976; +Cc: Linux Media Mailing List On Tue, Oct 13, 2009 at 2:27 PM, <xwang1976@email.it> wrote: > Hi Devin, > let me know if you need a tester for the EMPIRE_DUAL_TV. > In case I will install the latest v4l driver on my old notebook which has a > clean kubuntu 9.04 distro. On the newer notebook I'm using my new Dikom > DK-300 device which does not work with the latest v4l drivers and which I > can use using a patched version of the main v4l driver (thanks to Dainius > Ridzevicius). If you have some spare time for this device too... > Xwang Hi xwang, Well, I'm hoping to setup a tree sometime this week (and test it with my devices). Assuming it works, I will put out a call for testers such as yourself. Regarding your DK-300, if you send the diff between the main v4l driver and the patched version, we can take a look at what would be required to merge it upstream. Cheers, Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: em28xx mode switching 2009-10-13 18:33 ` Devin Heitmueller @ 2009-10-13 18:52 ` xwang1976 2009-10-24 22:01 ` Dikom DK-300 xwang1976 1 sibling, 0 replies; 9+ messages in thread From: xwang1976 @ 2009-10-13 18:52 UTC (permalink / raw) To: Devin Heitmueller; +Cc: Linux Media Mailing List [-- Attachment #1: Type: text/plain, Size: 1401 bytes --] Ok! As far as the DIKOM DK-300 patch, it enables the digital tv, but analog tv still has some problem (no audio and maybe kernel oops when tuning channels). As soon as possible (probably next weekend) I will try to search diff between patched and original version. Meantime I attach the tar file Dainius sent me two months ago (I have used the included files to overwite the ones in /v4l-dvb/linux/drivers/media/video/em28xx). Thank you again for your help, Xwang Devin Heitmueller ha scritto: > On Tue, Oct 13, 2009 at 2:27 PM, <xwang1976@email.it> wrote: >> Hi Devin, >> let me know if you need a tester for the EMPIRE_DUAL_TV. >> In case I will install the latest v4l driver on my old notebook which has a >> clean kubuntu 9.04 distro. On the newer notebook I'm using my new Dikom >> DK-300 device which does not work with the latest v4l drivers and which I >> can use using a patched version of the main v4l driver (thanks to Dainius >> Ridzevicius). If you have some spare time for this device too... >> Xwang > > Hi xwang, > > Well, I'm hoping to setup a tree sometime this week (and test it with > my devices). Assuming it works, I will put out a call for testers > such as yourself. > > Regarding your DK-300, if you send the diff between the main v4l > driver and the patched version, we can take a look at what would be > required to merge it upstream. > > Cheers, > > Devin > [-- Attachment #2: em28xx.tar.gz --] [-- Type: application/gzip, Size: 76594 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Dikom DK-300 2009-10-13 18:33 ` Devin Heitmueller 2009-10-13 18:52 ` xwang1976 @ 2009-10-24 22:01 ` xwang1976 1 sibling, 0 replies; 9+ messages in thread From: xwang1976 @ 2009-10-24 22:01 UTC (permalink / raw) To: Devin Heitmueller; +Cc: Linux Media Mailing List [-- Attachment #1: Type: text/plain, Size: 2024 bytes --] Hi Devin, I sent you the diff between the patched version of the v4l-dvb main and the original one (which I have not updated on this pc since mid of August when I've patched it to have the dikom working in digital mode at least). As you have suggested, I sent you the diff between the two versions (it's the first time I use such a tool so I hope I've used it correctly). In any case I send you also the tar file which contains the patched files which substitute the ones in /v4l-dvb/linux/drivers/media/video/em28xx Can you tell me if it is all you need or if you need something else. Thank you for your help, Xwang Ok! As far as the DIKOM DK-300 patch, it enables the digital tv, but analog tv still has some problem (no audio and maybe kernel oops when tuning channels). As soon as possible (probably next weekend) I will try to search diff between patched and original version. Meantime I attach the tar file Dainius sent me two months ago (I have used the included files to overwite the ones in /v4l-dvb/linux/drivers/media/video/em28xx). Thank you again for your help, Xwang Devin Heitmueller ha scritto: > On Tue, Oct 13, 2009 at 2:27 PM, <xwang1976@email.it> wrote: >> Hi Devin, >> let me know if you need a tester for the EMPIRE_DUAL_TV. >> In case I will install the latest v4l driver on my old notebook which has a >> clean kubuntu 9.04 distro. On the newer notebook I'm using my new Dikom >> DK-300 device which does not work with the latest v4l drivers and which I >> can use using a patched version of the main v4l driver (thanks to Dainius >> Ridzevicius). If you have some spare time for this device too... >> Xwang > > Hi xwang, > > Well, I'm hoping to setup a tree sometime this week (and test it with > my devices). Assuming it works, I will put out a call for testers > such as yourself. > > Regarding your DK-300, if you send the diff between the main v4l > driver and the patched version, we can take a look at what would be > required to merge it upstream. > > Cheers, > > Devin > [-- Attachment #2: em28xx.tar.gz --] [-- Type: application/gzip, Size: 76594 bytes --] [-- Attachment #3: diff_dikom-dk300.txt --] [-- Type: text/plain, Size: 7084 bytes --] diff -r src/v4l-dvb-src/v4l-dvb-main-323u-20090813/v4l-dvb/linux/drivers/media/video/em28xx/em28xx-cards.c src/v4l-dvb-src/v4l-dvb-main/v4l-dvb_old/linux/drivers/media/video/em28xx/em28xx-cards.c 1389,1396d1388 < .mts_firmware = 1, < .has_dvb = 1, < .dvb_gpio = kworld_330u_digital, < .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, < .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | < EM28XX_I2C_EEPROM_ON_BOARD | < EM28XX_I2C_EEPROM_KEY_VALID, < 1812a1805,1823 > > /* FIXME: Should be replaced by a proper mt9m111 driver */ > static int em28xx_initialize_mt9m111(struct em28xx *dev) > { > int i; > unsigned char regs[][3] = { > { 0x0d, 0x00, 0x01, }, /* reset and use defaults */ > { 0x0d, 0x00, 0x00, }, > { 0x0a, 0x00, 0x21, }, > { 0x21, 0x04, 0x00, }, /* full readout speed, no row/col skipping */ > }; > > for (i = 0; i < ARRAY_SIZE(regs); i++) > i2c_master_send(&dev->i2c_client, ®s[i][0], 3); > > return 0; > } > > 1841c1852 < * This method work for webcams with Micron sensors --- > * This method works for webcams with Micron sensors 1886a1898,1914 > > case 0x143a: /* MT9M111 as found in the ECS G200 */ > dev->model = EM2750_BOARD_UNKNOWN; > em28xx_set_model(dev); > > sensor_name = "mt9m111"; > dev->board.xclk = EM28XX_XCLK_FREQUENCY_48MHZ; > dev->em28xx_sensor = EM28XX_MT9M111; > em28xx_initialize_mt9m111(dev); > dev->sensor_xres = 640; > dev->sensor_yres = 512; > > dev->vinmode = 0x0a; > dev->vinctl = 0x00; > > break; > 1907c1935 < printk("Unknown Micron Sensor 0x%04x\n", be16_to_cpu(version)); --- > printk("Unknown Micron Sensor 0x%04x\n", version); 2065d2092 < case EM2882_BOARD_KWORLD_VS_DVBT: //!!!!!!!!!!!!!!!!!!!!!!!!!!1 Solo in src/v4l-dvb-src/v4l-dvb-main-323u-20090813/v4l-dvb/linux/drivers/media/video/em28xx/: em28xx-cards.c~ diff -r src/v4l-dvb-src/v4l-dvb-main-323u-20090813/v4l-dvb/linux/drivers/media/video/em28xx/em28xx-dvb.c src/v4l-dvb-src/v4l-dvb-main/v4l-dvb_old/linux/drivers/media/video/em28xx/em28xx-dvb.c 482d481 < // case EM2882_BOARD_KWORLD_VS_DVBT: //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1 503d501 < case EM2882_BOARD_KWORLD_VS_DVBT: //!!!!!!!!!!!!!!!!!!!!!! 521d518 < Solo in src/v4l-dvb-src/v4l-dvb-main-323u-20090813/v4l-dvb/linux/drivers/media/video/em28xx/: em28xx-dvb.c~ diff -r src/v4l-dvb-src/v4l-dvb-main-323u-20090813/v4l-dvb/linux/drivers/media/video/em28xx/em28xx.h src/v4l-dvb-src/v4l-dvb-main/v4l-dvb_old/linux/drivers/media/video/em28xx/em28xx.h 370a371 > EM28XX_MT9M111, andreak@pro5av:~$ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: em28xx mode switching 2009-10-12 22:12 em28xx mode switching Devin Heitmueller 2009-10-12 22:31 ` Antti Palosaari @ 2009-10-12 23:33 ` hermann pitton 1 sibling, 0 replies; 9+ messages in thread From: hermann pitton @ 2009-10-12 23:33 UTC (permalink / raw) To: Devin Heitmueller; +Cc: Linux Media Mailing List Am Montag, den 12.10.2009, 18:12 -0400 schrieb Devin Heitmueller: > I was debugging an issue on a user's hybrid board, when I realized > that we are switching the em28xx mode whenever we start and stop dvb > streaming. We already have the ts_bus_ctrl callback implemented which > puts the device into digital mode and puts it back into suspend > whenever the frontend is opened/closed. > > This call seems redundant, and in fact can cause problems if the > dvb_gpio definition strobes the reset pin, as it can put the driver > out of sync with the demodulator's state (in fact this is what I ran > into with the zl10353 - the reset pin got strobed when the streaming > was started but the demod driver's init() routine was not being run > because it already ran when the frontend was originally opened). > > The only case I can think of where toggling the device mode when > starting/stopping dvb streaming might be useful is if we wanted to > support being able to do an analog tune while the dvb frontend was > still open but not streaming. However, this seems like this could > expose all sorts of bugs, and I think the locking would have to be > significantly reworked if this were a design goal. > > Thoughts anybody? > > Devin > Hi, on dvb were some telling us previously, by far not all, but the loudest, all the hybrid stuff will soon vanish and it is not even worth to look closer into it. This is years back, and the problem is still there. But, these days you can discuss it more relaxed and despite of all, we have lots of improvements now. See Mike's latest compromising about who has the gpio pins. Even only thinking about such in public was a crime previously ... (and heavily punished ;) Cheers, Hermann ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-10-24 22:03 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-10-12 22:12 em28xx mode switching Devin Heitmueller 2009-10-12 22:31 ` Antti Palosaari 2009-10-12 23:04 ` Devin Heitmueller 2009-10-13 7:55 ` Alain Perrot 2009-10-13 18:27 ` xwang1976 2009-10-13 18:33 ` Devin Heitmueller 2009-10-13 18:52 ` xwang1976 2009-10-24 22:01 ` Dikom DK-300 xwang1976 2009-10-12 23:33 ` em28xx mode switching hermann pitton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox