Linux

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • em28xx: Trying to get Kworld DVD Maker USB 2.0 work

    6 answers - 3272 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi all,
    Somebody gave me a Kworld DVD Maker USB 2.0 and asked to try to get it
    work on Linux. It is a small device that have composite/s-video input
    only. Main components include EM2800 and SAA7113H. And ofcoz, em28xx
    could not recognize this device. By supplying a new board
    configuration, it could display ugly black & white video. As I don't
    have the manual of em2800, I have no idea how to improve the quality
    and therefore would like to seek advise/support from this mailing
    list.
    Background Information:
    Kworld DVD Maker USB 2.0
    The circuit board:
    http://ihome.ust.hk/~
    http://ihome.ust.hk/~
    Testing Environment:
    Debian SID
    Kernel: 2.6.17.11
    xawtv: 3.94|3.95
    mplayer: 1.0-pre8-0.1
    It is already tested with different board configurations from board 0
    to 9, but no one fit for the device. And those board configuration
    with "is_em2800=1" will cause xawtv(3.94 or 3.95) hang with the
    message "v4l2: waiting for a free buffer". Looking through the source
    code and the `dmesg` output of the driver. The problem should be
    caused by ioctl(VIDIC_S_FMT) . xawtv request to fetch 384x288 video
    but em28xx return 720x288. Which is larger than variable cur_tv_width
    and make the function video_gd_blitframe() fails to release video
    buffer.
    em28xx #0 em28xx_set_fmt :VIDIC_S_FMT: type=V4L2_BUF_TYPE_VIDECAPTURE
    em28xx #0 em28xx_set_fmt :VIDIC_S_FMT: requested 384x288
    em28xx #0 em28xx_set_fmt :VIDIC_S_FMT: returned 720x288 (0, 4096)
    Give up xawtv and change to the mplayer, it works but the resolution
    is still rather strange. If I don't use resolution 360x288, it will be
    changed to 360x576. I am quite confused with the code below which
    adjust the returned size from ioctl(VIDIC_S_FMT):
    static int em28xx_set_fmt(struct em28xx *dev, unsigned int cmd, struct
    v4l2_format *format)
    if(dev->is_em2800){
    /* the em2800 can only scale down to 50% */
    if(height % (maxh / 2))
    height=maxh;
    if(width % (maxw / 2))
    width=maxw;
    /* according to empiatech support */
    /* the MaxPacketSize is to small to support */
    /* framesizes larger than 640x480 @ 30 fps */
    /* or 640x576 @ 25 fps. As this would cut */
    /* of a part of the image we prefer */
    /* 360x576 or 360x480 for now */
    if(width == maxw && height == maxh)
    width /= 2;
    That is the board configuration used in my test. I didn't created a
    new board ID as it is just a test only.
    [EM2820_BARD_PINNACLE_DVC_90] = {
    .name = "KWorld DVD Marker USB 2.0",
    .is_em2800 = 1,
    .vchannels = 2,
    .norm = VIDEMDE_PAL,
    .has_tuner = 0,
    .decoder = EM28XX_SAA7113,
    .input = {{
    .type = EM28XX_VMUX_CMPSITE1,
    .vmux = 8,
    .amux = 4,
    },{
    .type = EM28XX_VMUX_SVIDE,
    .vmux = 6,
    .amux = 5,
    }},
    },
    The command:
    sudo rmmod em28xx ;sudo modprobe em28xx video_debug=1 card=9
    mplayer -vo x11 tv:// -tv
    The result:
    http://ihome.ust.hk/~
    The device is connected to a photo viewer which show static image in
    PAL. It was correctly shown beside the color. Could somebody give me
    advise how to improve it?
    Thanks a lot!
  • No.1 | | 3352 bytes | |

    Hi Ben,

    8/27/06, Ben Lau <xbenlau (AT) gmail (DOT) comwrote:
    Hi all,

    Somebody gave me a Kworld DVD Maker USB 2.0 and asked to try to get it
    work on Linux. It is a small device that have composite/s-video input
    only. Main components include EM2800 and SAA7113H. And ofcoz, em28xx
    could not recognize this device. By supplying a new board
    configuration, it could display ugly black & white video. As I don't
    have the manual of em2800, I have no idea how to improve the quality
    and therefore would like to seek advise/support from this mailing
    list.

    Background Information:

    Kworld DVD Maker USB 2.0

    The circuit board:
    http://ihome.ust.hk/~
    http://ihome.ust.hk/~

    Testing Environment:

    Debian SID
    Kernel: 2.6.17.11
    xawtv: 3.94|3.95
    mplayer: 1.0-pre8-0.1

    It is already tested with different board configurations from board 0
    to 9, but no one fit for the device. And those board configuration
    with "is_em2800=1" will cause xawtv(3.94 or 3.95) hang with the
    message "v4l2: waiting for a free buffer". Looking through the source
    code and the `dmesg` output of the driver. The problem should be
    caused by ioctl(VIDIC_S_FMT) . xawtv request to fetch 384x288 video
    but em28xx return 720x288. Which is larger than variable cur_tv_width
    and make the function video_gd_blitframe() fails to release video
    buffer.

    em28xx #0 em28xx_set_fmt :VIDIC_S_FMT: type=V4L2_BUF_TYPE_VIDECAPTURE
    em28xx #0 em28xx_set_fmt :VIDIC_S_FMT: requested 384x288
    em28xx #0 em28xx_set_fmt :VIDIC_S_FMT: returned 720x288 (0, 4096)

    Give up xawtv and change to the mplayer, it works but the resolution
    is still rather strange. If I don't use resolution 360x288, it will be
    changed to 360x576. I am quite confused with the code below which
    adjust the returned size from ioctl(VIDIC_S_FMT):

    static int em28xx_set_fmt(struct em28xx *dev, unsigned int cmd, struct
    v4l2_format *format)

    if(dev->is_em2800){
    /* the em2800 can only scale down to 50% */
    if(height % (maxh / 2))
    height=maxh;
    if(width % (maxw / 2))
    width=maxw;
    /* according to empiatech support */
    /* the MaxPacketSize is to small to support */
    /* framesizes larger than 640x480 @ 30 fps */
    /* or 640x576 @ 25 fps. As this would cut */
    /* of a part of the image we prefer */
    /* 360x576 or 360x480 for now */
    if(width == maxw && height == maxh)
    width /= 2;

    That is the board configuration used in my test. I didn't created a
    new board ID as it is just a test only.

    [EM2820_BARD_PINNACLE_DVC_90] = {
    .name = "KWorld DVD Marker USB 2.0",
    .is_em2800 = 1,
    .vchannels = 2,
    .norm = VIDEMDE_PAL,
    .has_tuner = 0,
    .decoder = EM28XX_SAA7113,
    .input = {{
    .type = EM28XX_VMUX_CMPSITE1,
    .vmux = 8,
    .amux = 4,
    },{
    .type = EM28XX_VMUX_SVIDE,
    .vmux = 6,
    .amux = 5,
    }},
    },

    The command:

    sudo rmmod em28xx ;sudo modprobe em28xx video_debug=1 card=9
    mplayer -vo x11 tv:// -tv

    The result:
    http://ihome.ust.hk/~

    The device is connected to a photo viewer which show static image in
    PAL. It was correctly shown beside the color. Could somebody give me
    advise how to improve it?

    this looks like a saa7113 problem, could you try:
  • No.2 | | 3852 bytes | |

    Hi,

    Sunday 27 August 2006 11:26, Ben Lau wrote:
    Hi all,

    Somebody gave me a Kworld DVD Maker USB 2.0 and asked to try to get it
    work on Linux. It is a small device that have composite/s-video input
    only. Main components include EM2800 and SAA7113H. And ofcoz, em28xx
    could not recognize this device. By supplying a new board
    configuration, it could display ugly black & white video. As I don't
    have the manual of em2800, I have no idea how to improve the quality
    and therefore would like to seek advise/support from this mailing
    list.

    Background Information:

    Kworld DVD Maker USB 2.0

    >tm
    >

    The circuit board:
    http://ihome.ust.hk/~
    http://ihome.ust.hk/~

    Testing Environment:

    Debian SID
    Kernel: 2.6.17.11
    xawtv: 3.94|3.95
    mplayer: 1.0-pre8-0.1

    It is already tested with different board configurations from board 0
    to 9, but no one fit for the device. And those board configuration
    with "is_em2800=1" will cause xawtv(3.94 or 3.95) hang with the
    message "v4l2: waiting for a free buffer". Looking through the source
    code and the `dmesg` output of the driver. The problem should be
    caused by ioctl(VIDIC_S_FMT) . xawtv request to fetch 384x288 video
    but em28xx return 720x288. Which is larger than variable cur_tv_width
    and make the function video_gd_blitframe() fails to release video
    buffer.

    em28xx #0 em28xx_set_fmt :VIDIC_S_FMT: type=V4L2_BUF_TYPE_VIDECAPTURE
    em28xx #0 em28xx_set_fmt :VIDIC_S_FMT: requested 384x288
    em28xx #0 em28xx_set_fmt :VIDIC_S_FMT: returned 720x288 (0, 4096)

    No idea, about xawtv. I'm not using it myself.

    Give up xawtv and change to the mplayer, it works but the resolution
    is still rather strange. If I don't use resolution 360x288, it will be
    changed to 360x576. I am quite confused with the code below which
    adjust the returned size from ioctl(VIDIC_S_FMT):

    static int em28xx_set_fmt(struct em28xx *dev, unsigned int cmd, struct
    v4l2_format *format)

    if(dev->is_em2800){
    /* the em2800 can only scale down to 50% */
    if(height % (maxh / 2))
    height=maxh;
    if(width % (maxw / 2))
    width=maxw;
    /* according to empiatech support */
    /* the MaxPacketSize is to small to support */
    /* framesizes larger than 640x480 @ 30 fps */
    /* or 640x576 @ 25 fps. As this would cut */
    /* of a part of the image we prefer */
    /* 360x576 or 360x480 for now */
    if(width == maxw && height == maxh)
    width /= 2;

    Well as the comment states the em2800 chip does not support random ration
    downscaling. It only supports 720x288, 360x576, 360x288 as PAL frame sizes.
    The above code makes sure that only these are selectable. Feel free to send a
    patch for the comment if it is not clear.

    That is the board configuration used in my test. I didn't created a
    new board ID as it is just a test only.

    [EM2820_BARD_PINNACLE_DVC_90] = {
    .name = "KWorld DVD Marker USB 2.0",
    .is_em2800 = 1,
    .vchannels = 2,
    .norm = VIDEMDE_PAL,
    .has_tuner = 0,
    .decoder = EM28XX_SAA7113,
    .input = {{
    .type = EM28XX_VMUX_CMPSITE1,
    .vmux = 8,
    .amux = 4,
    },{
    .type = EM28XX_VMUX_SVIDE,
    .vmux = 6,
    .amux = 5,
    }},
    },

    The command:

    sudo rmmod em28xx ;sudo modprobe em28xx video_debug=1 card=9
    mplayer -vo x11 tv:// -tv

    The result:
    http://ihome.ust.hk/~

    The device is connected to a photo viewer which show static image in
    PAL. It was correctly shown beside the color. Could somebody give me
    advise how to improve it?

    Are you sure the photo viewer really shows the image in PAL? You could try
    NTSC with MPlayer, too. Just as a test. How is it connected? S-Video?

    Regards

    Sascha
  • No.3 | | 1729 bytes | |

    Markus Rechberger , Sascha Sommer ,

    Thanks for your quick reply! I found that I made a BIG mistake in my
    test The original configuration of card 0 could display color video
    in both PAL/NTSC! Sorry to proivde misleading information. It seem
    that the absent of tuner do not affect the operation. However, it
    still has two problems leave:

    1. No sound.

    $ mplayer -vo x11 tv:// -tv

    [[:snipped:]]

    Audio: no sound
    Starting playback

    2. The quality of video is poor in newer kernel.

    2.6.16.20
    http://ihome.ust.hk/~

    2.6.17.11
    http://ihome.ust.hk/~

    The result was same in using this configuration:

    [EM2820_BARD_PINNACLE_DVC_90] = {
    .name = "Pinnacle Dazzle DVC 90",
    .is_em2800 = 1,
    .vchannels = 2,
    .norm = VIDEMDE_PAL,
    .has_tuner = 0,
    .decoder = EM28XX_SAA7113,
    .input = {{
    .type = EM28XX_VMUX_CMPSITE1,
    .vmux = 0,
    .amux = 1,
    },{
    .type = EM28XX_VMUX_SVIDE,
    .vmux = 9,
    .amux = 1,
    }},
    },

    8/27/06, Sascha Sommer <saschasommer (AT) freenet (DOT) dewrote:
    Well as the comment states the em2800 chip does not support random ration
    downscaling. It only supports 720x288, 360x576, 360x288 as PAL frame sizes.
    The above code makes sure that only these are selectable. Feel free to send a
    patch for the comment if it is not clear.

    I see

    Are you sure the photo viewer really shows the image in PAL? You could try
    NTSC with MPlayer, too. Just as a test. How is it connected? S-Video?

    The device is called Coolplay A10 which could display PAL/NTSC though
    composite video. Now I change to use GP2X to continue the test.

    Regards

    Sascha
  • No.4 | | 1166 bytes | |

    Hi,

    first of all I'd like to autodetect these devices, all other known
    em28xx devices are detected even if the usb ids are the same
    But since I have no em2800 device here I cannot test anything :/

    Sascha:
    do you have any em2800 logfiles floating around?

    Ben:
    please also try to send me a parsed usb logfiles when scanning for channels

    8/30/06, Ben Lau <benlau (AT) embedded (DOT) hkwrote:
    Markus Rechberger , Sascha Sommer ,

    Thanks for your quick reply! I found that I made a BIG mistake in my
    test The original configuration of card 0 could display color video
    in both PAL/NTSC! Sorry to proivde misleading information. It seem
    that the absent of tuner do not affect the operation. However, it
    still has two problems leave:

    1. No sound.

    Audio isn't multiplexed with the videostream, I'm not sure if the
    em2800 device supports usbaudio Sascha knows more about this

    $ mplayer -vo x11 tv:// -tv

    [[:snipped:]]

    Audio: no sound
    Starting playback

    2. The quality of video is poor in newer kernel.

    100% saa7113/saa7115 issue

    Markus
  • No.5 | | 727 bytes | |

    Hi,

    Wednesday 30 August 2006 18:54, Ben Lau wrote:
    Markus Rechberger , Sascha Sommer ,

    Thanks for your quick reply! I found that I made a BIG mistake in my
    test The original configuration of card 0 could display color video
    in both PAL/NTSC! Sorry to proivde misleading information. It seem
    that the absent of tuner do not affect the operation. However, it
    still has two problems leave:

    1. No sound.

    $ mplayer -vo x11 tv:// -tv

    >put=1
    >


    Does the attached patch, that I created for another user, fix the sound
    problem?

    Regards

    Sascha

    P.S. its agains some older v4l-dvb version so it might need some adjustments.
  • No.6 | | 1604 bytes | |

    8/31/06, Sascha Sommer <saschasommer (AT) freenet (DOT) dewrote:
    Hi,

    Wednesday 30 August 2006 19:28, Markus Rechberger wrote:
    Hi,

    first of all I'd like to autodetect these devices, all other known
    em28xx devices are detected even if the usb ids are the same
    But since I have no em2800 device here I cannot test anything :/
    --
    Are the em2800 devices autodetected? I don't think so.

    not yet but I'd really appreciate it the known em2820/2840/2880/2870
    devices are all autodetected at the moment even if they have the same
    usb id.
    I used to compare eeprom content or i2c addresses for the more
    difficult cases and it works out quite well so far.

    Sascha:
    do you have any em2800 logfiles floating around?
    --
    What are you looking for exactly?
    In cinergydrv I had the following code:

    just something general so that I can compare it with other logs maybe
    there's a difference somewhere in it that can be used for detecting
    the proper device

    /* check device id reg, not sure if this is really the
    correct
    reg ;( */

    if(usb_control_msg(udev,usb_rcvctrlpipe(udev,0),US B_REQ_GET_STATUS,
    USB_DIR_IN|USB_TYPE_VENDR|USB_RECIP_DEVICE,
    0x0000,0x000a,&ver,1, HZ) < 0){
    err("Cannot read the device id register please
    report
    this bug!");
    return -ENDEV;
    }

    but I'm not sure if this is really the device_id reg but it seemed to be the
    only difference between my log files and the log files of other devices.

    Regards

    Sascha

    cheers,
    Markus

Re: em28xx: Trying to get Kworld DVD Maker USB 2.0 work


max 4000 letters.
Your nickname that display:
In order to stop the spam: 8 + 7 =
QUESTION ON "Linux"

EMSDN.COM