From patchwork Fri Jan 22 15:10:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 2502 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Fri, 22 Jan 2010 15:11:12 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for (single-drop); Fri, 22 Jan 2010 13:11:49 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NYLAF-0002hs-Q6; Fri, 22 Jan 2010 15:11:12 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755063Ab0AVPLB (ORCPT + 1 other); Fri, 22 Jan 2010 10:11:01 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755019Ab0AVPLB (ORCPT ); Fri, 22 Jan 2010 10:11:01 -0500 Received: from smtp.mujha-vel.cz ([81.30.225.246]:45363 "EHLO smtp.mujha-vel.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754911Ab0AVPK7 (ORCPT ); Fri, 22 Jan 2010 10:10:59 -0500 Received: from [217.66.174.142] (helo=localhost.localdomain) by smtp.mujha-vel.cz with esmtp (Exim 4.63) (envelope-from ) id 1NYLA2-0004Qa-QV; Fri, 22 Jan 2010 16:10:58 +0100 From: Jiri Slaby To: crope@iki.fi Cc: linux-kernel@vger.kernel.org, jirislaby@gmail.com, Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 4/4] media: dvb/af9015, add hashes support Date: Fri, 22 Jan 2010 16:10:55 +0100 Message-Id: <1264173055-14787-4-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 1.6.5.7 In-Reply-To: <4B4F6BE5.2040102@iki.fi> References: <4B4F6BE5.2040102@iki.fi> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 Cc: Antti Palosaari Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Signed-off-by: Jiri Slaby Acked-by: Antti Palosaari --- drivers/media/dvb/dvb-usb/af9015.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index 796f9d5..650c913 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c @@ -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) { @@ -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. @@ -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); }