Re: [mythtv-users] Re: Repeat problems with ati_remote in 2.6 kernel

2004-12-30 Thread mail.com
d(&ati_remote->wait);

/* Set up irq_urb */

pipe = usb_rcvintpipe(udev, ati_remote->endpoint_in->bEndpointAddress);

maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));

maxp = (maxp > DATA_BUFSIZE) ? DATA_BUFSIZE : maxp;


usb_fill_int_urb(ati_remote->irq_urb, udev, pipe, ati_remote->inbuf,

maxp, ati_remote_irq_in, ati_remote,

ati_remote->endpoint_in->bInterval);

ati_remote->irq_urb->transfer_dma = ati_remote->inbuf_dma;

ati_remote->irq_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;


/* Set up out_urb */

pipe = usb_sndintpipe(udev, ati_remote->endpoint_out->bEndpointAddress);

maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));

maxp = (maxp > DATA_BUFSIZE) ? DATA_BUFSIZE : maxp;

usb_fill_int_urb(ati_remote->out_urb, udev, pipe, ati_remote->outbuf,

maxp, ati_remote_irq_out, ati_remote,

ati_remote->endpoint_out->bInterval);

ati_remote->out_urb->transfer_dma = ati_remote->outbuf_dma;

ati_remote->out_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;

/* send initialization strings */

if ((ati_remote_sendpacket(ati_remote, 0x8004, init1)) ||

(ati_remote_sendpacket(ati_remote, 0x8007, init2))) {

dev_err(&ati_remote->interface->dev,

"Initializing ati_remote hardware failed.\n");

return 1;

}


return 0;

}

/*

* ati_remote_probe

*/

static int ati_remote_probe(struct usb_interface *interface, const struct
usb_device_id *id)

{

struct usb_device *udev = interface_to_usbdev(interface);

struct ati_remote *ati_remote = NULL;

struct usb_host_interface *iface_host;

int retval = -ENOMEM;

char path[64];

char *buf = NULL;

/* See if the offered device matches what we can accept */

if ((udev->descriptor.idVendor != ATI_REMOTE_VENDOR_ID) ||

( (udev->descriptor.idProduct != ATI_REMOTE_PRODUCT_ID) &&

(udev->descriptor.idProduct != LOLA_REMOTE_PRODUCT_ID) ))

return -ENODEV;

/* Allocate and clear an ati_remote struct */

if (!(ati_remote = kmalloc(sizeof (struct ati_remote), GFP_KERNEL)))

return -ENOMEM;

memset(ati_remote, 0x00, sizeof (struct ati_remote));

iface_host = interface->cur_altsetting;

if (iface_host->desc.bNumEndpoints != 2) {

err("%s: Unexpected desc.bNumEndpoints\n", __FUNCTION__);

retval = -ENODEV;

goto error;

}

ati_remote->endpoint_in = &(iface_host->endpoint[0].desc);

ati_remote->endpoint_out = &(iface_host->endpoint[1].desc);

ati_remote->udev = udev;

ati_remote->interface = interface;

if (!(ati_remote->endpoint_in->bEndpointAddress & 0x80)) {

err("%s: Unexpected endpoint_in->bEndpointAddress\n", __FUNCTION__);

retval = -ENODEV;

goto error;

}

if ((ati_remote->endpoint_in->bmAttributes & 3) != 3) {

err("%s: Unexpected endpoint_in->bmAttributes\n", __FUNCTION__);

retval = -ENODEV;

goto error;

}

if (ati_remote->endpoint_in->wMaxPacketSize == 0) {

err("%s: endpoint_in message size==0? \n", __FUNCTION__);

retval = -ENODEV;

goto error;

}

if (!(buf = kmalloc(NAME_BUFSIZE, GFP_KERNEL)))

goto error;

/* Allocate URB buffers, URBs */

ati_remote->inbuf = usb_buffer_alloc(udev, DATA_BUFSIZE, SLAB_ATOMIC,

&ati_remote->inbuf_dma);

if (!ati_remote->inbuf)

goto error;

ati_remote->outbuf = usb_buffer_alloc(udev, DATA_BUFSIZE, SLAB_ATOMIC,

&ati_remote->outbuf_dma);

if (!ati_remote->outbuf)

goto error;

ati_remote->irq_urb = usb_alloc_urb(0, GFP_KERNEL);

if (!ati_remote->irq_urb)

goto error;

ati_remote->out_urb = usb_alloc_urb(0, GFP_KERNEL);

if (!ati_remote->out_urb)

goto error;

usb_make_path(udev, path, NAME_BUFSIZE);

sprintf(ati_remote->phys, "%s/input%d", path, ATI_INPUTNUM);

if (udev->descriptor.iManufacturer &&

(usb_string(udev, udev->descriptor.iManufacturer, buf,

NAME_BUFSIZE) > 0))

strcat(ati_remote->name, buf);

if (udev->descriptor.iProduct &&

(usb_string(udev, udev->descriptor.iProduct, buf, NAME_BUFSIZE) > 0))

sprintf(ati_remote->name, "%s %s", ati_remote->name, buf);

if (!strlen(ati_remote->name))

sprintf(ati_remote->name, DRIVER_DESC "(%04x,%04x)",

ati_remote->udev->descriptor.idVendor,

ati_remote->udev->descriptor.idProduct);

/* Device Hardware Initialization - fills in ati_remote->idev from udev. */

retval = ati_remote_initialize(ati_remote);

if (retval)

goto error;

/* Set up and register input device */

ati_remote_input_init(ati_remote);

input_register_device(&ati_remote->idev);

dev_info(&ati_remote->interface->dev, "Input registered: %s on %s\n",

ati_remote->name, path);

usb_set_intfdata(interface, ati_remote);

ati_remote->present = 1;


error:

if (buf)

kfree(buf);

if (retval)

ati_remote_delete(ati_remote);

return retval;

}

/*

* ati_remote_disconnect

*/

static void ati_remote_disconnect(struct usb_interface *interface)

{

struct ati_remote *ati_

Re: [mythtv-users] Re: Repeat problems with ati_remote in 2.6 kernel

2004-12-29 Thread Chris Vargas
Except that the reason I got the ATI remote was to
avoid LIRC and its associated headaches...

--- Paul Miller <[EMAIL PROTECTED]> wrote:

> Try using lirc's atiusb driver...
> 
> -Paul

___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


Re: [mythtv-users] Re: Repeat problems with ati_remote in 2.6 kernel

2004-12-29 Thread Paul Miller
Try using lirc's atiusb driver...

-Paul

On Tuesday 28 December 2004 8:58 pm, Chris Vargas wrote:
> --- Dave Steinberg wrote:
> > The real problem, though, is the repeat behaviour.
>
> I'm finding
>
> > that it's very easy to accidentally get a double
>
> keypress.
>
> I can confirm seeing that behavior with the built-in
> ATI remote support in the 2.6 kernel. Quite annoying.
> I too would like to see a fix.
___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


[mythtv-users] Re: Repeat problems with ati_remote in 2.6 kernel

2004-12-28 Thread Jason Gabriele
The driver changed sometime after 2.6.7, and yes it is annoying. 
Fast-Forward does work much better now but it needs to have some kind of 
throttling (like holding it down gives you one keystroke every .25 
seconds). Whoever suggested altering .lircrc: the ati_remote driver is a 
kernel driver, lirc is not required for use. I am pretty sure most 
people are now using that driver because it's easier to setup than 
installing lirc. Maybe this discussion needs to take place on a kernel 
mailing list?
___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


[mythtv-users] Re: Repeat problems with ati_remote in 2.6 kernel

2004-12-28 Thread Chris Vargas

--- Dave Steinberg wrote:

> The real problem, though, is the repeat behaviour. 
I'm finding 
> that it's very easy to accidentally get a double
keypress. 

I can confirm seeing that behavior with the built-in
ATI remote support in the 2.6 kernel. Quite annoying.
I too would like to see a fix.
___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users