[1/1] media: dvb-usb/af9015, add IR support for digivox mini II

Message ID 1263412807-23350-1-git-send-email-jslaby@suse.cz (mailing list archive)
State Superseded, archived
Headers

Commit Message

Jiri Slaby Jan. 13, 2010, 8 p.m. UTC
  MSI digivox mini II works even with remote=2 module parameter. Check
for manufacturer and if it is Afatech, use af9015_ir_table_msi and
af9015_rc_keys_msi.

The device itself is 15a4:9016.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Antti Palosaari <crope@iki.fi>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-media@vger.kernel.org
---
 drivers/media/dvb/dvb-usb/af9015.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
  

Comments

Antti Palosaari Jan. 14, 2010, 7:09 p.m. UTC | #1
On 01/13/2010 10:00 PM, Jiri Slaby wrote:
> MSI digivox mini II works even with remote=2 module parameter. Check
> for manufacturer and if it is Afatech, use af9015_ir_table_msi and
> af9015_rc_keys_msi.
>
> The device itself is 15a4:9016.

NACK

Device ID 15a4:9016 is reference design ID and it is used by vary many 
devices. Also manufacturer string "Afatech" is chipset default one. This 
leads MSI remote in question configured for many devices using default / 
reference values which I don't like good idea. Strings and other USB 
settings are stored to the device eeprom.

Empia (em28xx) driver uses eeprom hashing for identifying reference ID 
devices. This approach is better because it uses all eeprom bytes. I 
hope you could implement similar eeprom hashing to af9015.

regards
Antti
  
Jiri Slaby Jan. 22, 2010, 3:11 p.m. UTC | #2
On 01/14/2010 08:09 PM, Antti Palosaari wrote:
> Device ID 15a4:9016 is reference design ID and it is used by vary many
> devices. Also manufacturer string "Afatech" is chipset default one. This
> leads MSI remote in question configured for many devices using default /
> reference values which I don't like good idea. Strings and other USB
> settings are stored to the device eeprom.

What do you think about the following patches?

thanks,
  

Patch

diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c
index 8b60a60..f0d5731 100644
--- a/drivers/media/dvb/dvb-usb/af9015.c
+++ b/drivers/media/dvb/dvb-usb/af9015.c
@@ -835,9 +835,15 @@  static int af9015_read_config(struct usb_device *udev)
 					  af9015_ir_table_mygictv;
 					af9015_config.ir_table_size =
 					  ARRAY_SIZE(af9015_ir_table_mygictv);
-				} else if (!strcmp("MSI", manufacturer)) {
-					/* iManufacturer 1 MSI
-					   iProduct      2 MSI K-VOX */
+				} else if (!strcmp("MSI", manufacturer) ||
+					   !strcmp("Afatech", manufacturer)) {
+					/*
+					   iManufacturer 1 MSI
+					   iProduct      2 MSI K-VOX
+					   iManufacturer 1 Afatech
+					   iProduct      2 DVB-T 2
+					 */
+
 					af9015_properties[i].rc_key_map =
 					  af9015_rc_keys_msi;
 					af9015_properties[i].rc_key_map_size =