Skip to content

Commit

Permalink
V4L/DVB: media: dvb/af9015, add hashes support
Browse files Browse the repository at this point in the history
So as a final patch, add support for hash and one hash entry
for MSI digi vox mini II:
iManufacturer 1 Afatech
iProduct      2 DVB-T 2
iSerial       3 010101010600001

It is now handled with proper IR and key map tables.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Jiri Slaby authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent 26c3b8b commit e3a0cc6
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions drivers/media/dvb/dvb-usb/af9015.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,13 @@ static const struct af9015_setup af9015_setup_usbids[] = {
{ }
};

static const struct af9015_setup af9015_setup_hashes[] = {
{ 0xb8feb708,
af9015_rc_keys_msi, ARRAY_SIZE(af9015_rc_keys_msi),
af9015_ir_table_msi, ARRAY_SIZE(af9015_ir_table_msi) },
{ }
};

static void af9015_set_remote_config(struct usb_device *udev,
struct dvb_usb_device_properties *props)
{
Expand All @@ -800,7 +807,10 @@ static void af9015_set_remote_config(struct usb_device *udev,
} else {
u16 vendor = le16_to_cpu(udev->descriptor.idVendor);

if (vendor == USB_VID_AFATECH) {
table = af9015_setup_match(af9015_config.eeprom_sum,
af9015_setup_hashes);

if (!table && vendor == USB_VID_AFATECH) {
/* Check USB manufacturer and product strings and try
to determine correct remote in case of chip vendor
reference IDs are used.
Expand Down Expand Up @@ -831,7 +841,7 @@ static void af9015_set_remote_config(struct usb_device *udev,
ARRAY_SIZE(af9015_ir_table_trekstor)
};
}
} else
} else if (!table)
table = af9015_setup_match(vendor, af9015_setup_usbids);
}

Expand Down

0 comments on commit e3a0cc6

Please sign in to comment.