* [PATCH] Add suport for Avermedia TD310
@ 2019-02-11 22:13 Jose Alberto Reguero
2019-02-19 21:57 ` Sean Young
0 siblings, 1 reply; 6+ messages in thread
From: Jose Alberto Reguero @ 2019-02-11 22:13 UTC (permalink / raw)
To: linux-media, Antti Palosaari
This patch add support for Avermedia TD310 usb stik.
This patch must be aplied after this one:
https://patchwork.linuxtv.org/patch/40087/
Signed-off-by: Jose Alberto Reguero <jose.alberto.reguero@gmail.com>
diff -upr linux/drivers/media/usb/dvb-usb-v2/af9035.c linux.new/drivers/media/usb/dvb-usb-v2/af9035.c
--- linux/drivers/media/usb/dvb-usb-v2/af9035.c 2019-02-11 14:48:58.133751038 +0100
+++ linux.new/drivers/media/usb/dvb-usb-v2/af9035.c 2019-02-11 15:02:10.646718610 +0100
@@ -1215,6 +1215,7 @@ static int it930x_frontend_attach(struct
int ret;
struct si2168_config si2168_config;
struct i2c_adapter *adapter;
+ u8 i2c_addr;
dev_dbg(&intf->dev, "%s adap->id=%d\n", __func__, adap->id);
@@ -1266,7 +1267,11 @@ static int it930x_frontend_attach(struct
state->af9033_config[adap->id].fe = &adap->fe[0];
state->af9033_config[adap->id].ops = &state->ops;
- ret = af9035_add_i2c_dev(d, "si2168", 0x67, &si2168_config,
+ i2c_addr = 0x67;
+ if ((le16_to_cpu(d->udev->descriptor.idVendor) == USB_VID_AVERMEDIA) &&
+ (le16_to_cpu(d->udev->descriptor.idProduct) == USB_PID_AVERMEDIA_TD310))
+ i2c_addr = 0x64;
+ ret = af9035_add_i2c_dev(d, "si2168", i2c_addr, &si2168_config,
&d->i2c_adap);
if (ret)
goto err;
@@ -1613,6 +1618,7 @@ static int it930x_tuner_attach(struct dv
struct usb_interface *intf = d->intf;
int ret;
struct si2157_config si2157_config;
+ u8 i2c_addr;
dev_dbg(&intf->dev, "adap->id=%d\n", adap->id);
@@ -1661,7 +1667,13 @@ static int it930x_tuner_attach(struct dv
memset(&si2157_config, 0, sizeof(si2157_config));
si2157_config.fe = adap->fe[0];
si2157_config.if_port = 1;
- ret = af9035_add_i2c_dev(d, "si2157", 0x63,
+ i2c_addr = 0x63;
+ if ((le16_to_cpu(d->udev->descriptor.idVendor) == USB_VID_AVERMEDIA) &&
+ (le16_to_cpu(d->udev->descriptor.idProduct) == USB_PID_AVERMEDIA_TD310)) {
+ i2c_addr = 0x60;
+ si2157_config.if_port = 0;
+ }
+ ret = af9035_add_i2c_dev(d, "si2157", i2c_addr,
&si2157_config, state->i2c_adapter_demod);
if (ret)
@@ -2169,6 +2181,8 @@ static const struct usb_device_id af9035
/* IT930x devices */
{ DVB_USB_DEVICE(USB_VID_ITETECH, USB_PID_ITETECH_IT9303,
&it930x_props, "ITE 9303 Generic", NULL) },
+ { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_TD310,
+ &it930x_props, "AVerMedia TD310 DVB-T2", NULL) },
{ }
};
MODULE_DEVICE_TABLE(usb, af9035_id_table);
diff -upr linux/include/media/dvb-usb-ids.h linux.new/include/media/dvb-usb-ids.h
--- linux/include/media/dvb-usb-ids.h 2018-05-05 07:40:18.000000000 +0200
+++ linux.new/include/media/dvb-usb-ids.h 2019-02-08 22:00:24.765541474 +0100
@@ -258,6 +258,7 @@
#define USB_PID_AVERMEDIA_A867 0xa867
#define USB_PID_AVERMEDIA_H335 0x0335
#define USB_PID_AVERMEDIA_TD110 0xa110
+#define USB_PID_AVERMEDIA_TD310 0x1871
#define USB_PID_AVERMEDIA_TWINSTAR 0x0825
#define USB_PID_TECHNOTREND_CONNECT_S2400 0x3006
#define USB_PID_TECHNOTREND_CONNECT_S2400_8KEEPROM 0x3009
Sent from MailDroid
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Add suport for Avermedia TD310
2019-02-11 22:13 [PATCH] Add suport for Avermedia TD310 Jose Alberto Reguero
@ 2019-02-19 21:57 ` Sean Young
2019-02-19 22:51 ` Jose Alberto Reguero
0 siblings, 1 reply; 6+ messages in thread
From: Sean Young @ 2019-02-19 21:57 UTC (permalink / raw)
To: Jose Alberto Reguero; +Cc: linux-media, Antti Palosaari
On Mon, Feb 11, 2019 at 11:13:25PM +0100, Jose Alberto Reguero wrote:
> This patch add support for Avermedia TD310 usb stik.
> This patch must be aplied after this one:
> https://patchwork.linuxtv.org/patch/40087/
That patch is marked Changes Requested. Please fix that patch first,
and then re-submit.
Thanks,
Sean
>
> Signed-off-by: Jose Alberto Reguero <jose.alberto.reguero@gmail.com>
>
> diff -upr linux/drivers/media/usb/dvb-usb-v2/af9035.c linux.new/drivers/media/usb/dvb-usb-v2/af9035.c
> --- linux/drivers/media/usb/dvb-usb-v2/af9035.c 2019-02-11 14:48:58.133751038 +0100
> +++ linux.new/drivers/media/usb/dvb-usb-v2/af9035.c 2019-02-11 15:02:10.646718610 +0100
> @@ -1215,6 +1215,7 @@ static int it930x_frontend_attach(struct
> int ret;
> struct si2168_config si2168_config;
> struct i2c_adapter *adapter;
> + u8 i2c_addr;
>
> dev_dbg(&intf->dev, "%s adap->id=%d\n", __func__, adap->id);
>
> @@ -1266,7 +1267,11 @@ static int it930x_frontend_attach(struct
>
> state->af9033_config[adap->id].fe = &adap->fe[0];
> state->af9033_config[adap->id].ops = &state->ops;
> - ret = af9035_add_i2c_dev(d, "si2168", 0x67, &si2168_config,
> + i2c_addr = 0x67;
> + if ((le16_to_cpu(d->udev->descriptor.idVendor) == USB_VID_AVERMEDIA) &&
> + (le16_to_cpu(d->udev->descriptor.idProduct) == USB_PID_AVERMEDIA_TD310))
> + i2c_addr = 0x64;
> + ret = af9035_add_i2c_dev(d, "si2168", i2c_addr, &si2168_config,
> &d->i2c_adap);
> if (ret)
> goto err;
> @@ -1613,6 +1618,7 @@ static int it930x_tuner_attach(struct dv
> struct usb_interface *intf = d->intf;
> int ret;
> struct si2157_config si2157_config;
> + u8 i2c_addr;
>
> dev_dbg(&intf->dev, "adap->id=%d\n", adap->id);
>
> @@ -1661,7 +1667,13 @@ static int it930x_tuner_attach(struct dv
> memset(&si2157_config, 0, sizeof(si2157_config));
> si2157_config.fe = adap->fe[0];
> si2157_config.if_port = 1;
> - ret = af9035_add_i2c_dev(d, "si2157", 0x63,
> + i2c_addr = 0x63;
> + if ((le16_to_cpu(d->udev->descriptor.idVendor) == USB_VID_AVERMEDIA) &&
> + (le16_to_cpu(d->udev->descriptor.idProduct) == USB_PID_AVERMEDIA_TD310)) {
> + i2c_addr = 0x60;
> + si2157_config.if_port = 0;
> + }
> + ret = af9035_add_i2c_dev(d, "si2157", i2c_addr,
> &si2157_config, state->i2c_adapter_demod);
>
> if (ret)
> @@ -2169,6 +2181,8 @@ static const struct usb_device_id af9035
> /* IT930x devices */
> { DVB_USB_DEVICE(USB_VID_ITETECH, USB_PID_ITETECH_IT9303,
> &it930x_props, "ITE 9303 Generic", NULL) },
> + { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_TD310,
> + &it930x_props, "AVerMedia TD310 DVB-T2", NULL) },
> { }
> };
> MODULE_DEVICE_TABLE(usb, af9035_id_table);
> diff -upr linux/include/media/dvb-usb-ids.h linux.new/include/media/dvb-usb-ids.h
> --- linux/include/media/dvb-usb-ids.h 2018-05-05 07:40:18.000000000 +0200
> +++ linux.new/include/media/dvb-usb-ids.h 2019-02-08 22:00:24.765541474 +0100
> @@ -258,6 +258,7 @@
> #define USB_PID_AVERMEDIA_A867 0xa867
> #define USB_PID_AVERMEDIA_H335 0x0335
> #define USB_PID_AVERMEDIA_TD110 0xa110
> +#define USB_PID_AVERMEDIA_TD310 0x1871
> #define USB_PID_AVERMEDIA_TWINSTAR 0x0825
> #define USB_PID_TECHNOTREND_CONNECT_S2400 0x3006
> #define USB_PID_TECHNOTREND_CONNECT_S2400_8KEEPROM 0x3009
>
>
>
> Sent from MailDroid
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Add suport for Avermedia TD310
2019-02-19 21:57 ` Sean Young
@ 2019-02-19 22:51 ` Jose Alberto Reguero
2019-02-20 9:37 ` Sean Young
0 siblings, 1 reply; 6+ messages in thread
From: Jose Alberto Reguero @ 2019-02-19 22:51 UTC (permalink / raw)
To: Sean Young, Jose Alberto Reguero; +Cc: linux-media, Antti Palosaari
El 19 de febrero de 2019 22:57:31 CET, Sean Young <sean@mess.org> escribió:
>On Mon, Feb 11, 2019 at 11:13:25PM +0100, Jose Alberto Reguero wrote:
>> This patch add support for Avermedia TD310 usb stik.
>> This patch must be aplied after this one:
>> https://patchwork.linuxtv.org/patch/40087/
>
>That patch is marked Changes Requested. Please fix that patch first,
>and then re-submit.
>
>Thanks,
>Sean
>
The patch that that need changes is the other one of the serie, the one for the si2157. This one can be applyed like this.
Thanks.
Jose Alberto
>>
>> Signed-off-by: Jose Alberto Reguero <jose.alberto.reguero@gmail.com>
>>
>> diff -upr linux/drivers/media/usb/dvb-usb-v2/af9035.c
>linux.new/drivers/media/usb/dvb-usb-v2/af9035.c
>> --- linux/drivers/media/usb/dvb-usb-v2/af9035.c 2019-02-11
>14:48:58.133751038 +0100
>> +++ linux.new/drivers/media/usb/dvb-usb-v2/af9035.c 2019-02-11
>15:02:10.646718610 +0100
>> @@ -1215,6 +1215,7 @@ static int it930x_frontend_attach(struct
>> int ret;
>> struct si2168_config si2168_config;
>> struct i2c_adapter *adapter;
>> + u8 i2c_addr;
>>
>> dev_dbg(&intf->dev, "%s adap->id=%d\n", __func__, adap->id);
>>
>> @@ -1266,7 +1267,11 @@ static int it930x_frontend_attach(struct
>>
>> state->af9033_config[adap->id].fe = &adap->fe[0];
>> state->af9033_config[adap->id].ops = &state->ops;
>> - ret = af9035_add_i2c_dev(d, "si2168", 0x67, &si2168_config,
>> + i2c_addr = 0x67;
>> + if ((le16_to_cpu(d->udev->descriptor.idVendor) ==
>USB_VID_AVERMEDIA) &&
>> + (le16_to_cpu(d->udev->descriptor.idProduct) ==
>USB_PID_AVERMEDIA_TD310))
>> + i2c_addr = 0x64;
>> + ret = af9035_add_i2c_dev(d, "si2168", i2c_addr, &si2168_config,
>> &d->i2c_adap);
>> if (ret)
>> goto err;
>> @@ -1613,6 +1618,7 @@ static int it930x_tuner_attach(struct dv
>> struct usb_interface *intf = d->intf;
>> int ret;
>> struct si2157_config si2157_config;
>> + u8 i2c_addr;
>>
>> dev_dbg(&intf->dev, "adap->id=%d\n", adap->id);
>>
>> @@ -1661,7 +1667,13 @@ static int it930x_tuner_attach(struct dv
>> memset(&si2157_config, 0, sizeof(si2157_config));
>> si2157_config.fe = adap->fe[0];
>> si2157_config.if_port = 1;
>> - ret = af9035_add_i2c_dev(d, "si2157", 0x63,
>> + i2c_addr = 0x63;
>> + if ((le16_to_cpu(d->udev->descriptor.idVendor) ==
>USB_VID_AVERMEDIA) &&
>> + (le16_to_cpu(d->udev->descriptor.idProduct) ==
>USB_PID_AVERMEDIA_TD310)) {
>> + i2c_addr = 0x60;
>> + si2157_config.if_port = 0;
>> + }
>> + ret = af9035_add_i2c_dev(d, "si2157", i2c_addr,
>> &si2157_config, state->i2c_adapter_demod);
>>
>> if (ret)
>> @@ -2169,6 +2181,8 @@ static const struct usb_device_id af9035
>> /* IT930x devices */
>> { DVB_USB_DEVICE(USB_VID_ITETECH, USB_PID_ITETECH_IT9303,
>> &it930x_props, "ITE 9303 Generic", NULL) },
>> + { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_TD310,
>> + &it930x_props, "AVerMedia TD310 DVB-T2", NULL) },
>> { }
>> };
>> MODULE_DEVICE_TABLE(usb, af9035_id_table);
>> diff -upr linux/include/media/dvb-usb-ids.h
>linux.new/include/media/dvb-usb-ids.h
>> --- linux/include/media/dvb-usb-ids.h 2018-05-05 07:40:18.000000000
>+0200
>> +++ linux.new/include/media/dvb-usb-ids.h 2019-02-08
>22:00:24.765541474 +0100
>> @@ -258,6 +258,7 @@
>> #define USB_PID_AVERMEDIA_A867 0xa867
>> #define USB_PID_AVERMEDIA_H335 0x0335
>> #define USB_PID_AVERMEDIA_TD110 0xa110
>> +#define USB_PID_AVERMEDIA_TD310 0x1871
>> #define USB_PID_AVERMEDIA_TWINSTAR 0x0825
>> #define USB_PID_TECHNOTREND_CONNECT_S2400 0x3006
>> #define USB_PID_TECHNOTREND_CONNECT_S2400_8KEEPROM 0x3009
>>
>>
>>
>> Sent from MailDroid
--
Enviado desde mi dispositivo Android con K-9 Mail. Por favor, disculpa mi brevedad.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Add suport for Avermedia TD310
2019-02-19 22:51 ` Jose Alberto Reguero
@ 2019-02-20 9:37 ` Sean Young
2019-02-20 12:49 ` Jose Alberto Reguero
0 siblings, 1 reply; 6+ messages in thread
From: Sean Young @ 2019-02-20 9:37 UTC (permalink / raw)
To: Jose Alberto Reguero; +Cc: Jose Alberto Reguero, linux-media, Antti Palosaari
On Tue, Feb 19, 2019 at 11:51:25PM +0100, Jose Alberto Reguero wrote:
> El 19 de febrero de 2019 22:57:31 CET, Sean Young <sean@mess.org> escribió:
> >On Mon, Feb 11, 2019 at 11:13:25PM +0100, Jose Alberto Reguero wrote:
> >> This patch add support for Avermedia TD310 usb stik.
> >> This patch must be aplied after this one:
> >> https://patchwork.linuxtv.org/patch/40087/
> >
> >That patch is marked Changes Requested. Please fix that patch first,
> >and then re-submit.
> >
> >Thanks,
> >Sean
> >
>
> The patch that that need changes is the other one of the serie, the one for the si2157. This one can be applyed like this.
Do you mean:
https://patchwork.linuxtv.org/patch/40089/
That also needs changes before it can be applied, I'm afraid.
Sean
>
> Thanks.
>
> Jose Alberto
>
> >>
> >> Signed-off-by: Jose Alberto Reguero <jose.alberto.reguero@gmail.com>
> >>
> >> diff -upr linux/drivers/media/usb/dvb-usb-v2/af9035.c
> >linux.new/drivers/media/usb/dvb-usb-v2/af9035.c
> >> --- linux/drivers/media/usb/dvb-usb-v2/af9035.c 2019-02-11
> >14:48:58.133751038 +0100
> >> +++ linux.new/drivers/media/usb/dvb-usb-v2/af9035.c 2019-02-11
> >15:02:10.646718610 +0100
> >> @@ -1215,6 +1215,7 @@ static int it930x_frontend_attach(struct
> >> int ret;
> >> struct si2168_config si2168_config;
> >> struct i2c_adapter *adapter;
> >> + u8 i2c_addr;
> >>
> >> dev_dbg(&intf->dev, "%s adap->id=%d\n", __func__, adap->id);
> >>
> >> @@ -1266,7 +1267,11 @@ static int it930x_frontend_attach(struct
> >>
> >> state->af9033_config[adap->id].fe = &adap->fe[0];
> >> state->af9033_config[adap->id].ops = &state->ops;
> >> - ret = af9035_add_i2c_dev(d, "si2168", 0x67, &si2168_config,
> >> + i2c_addr = 0x67;
> >> + if ((le16_to_cpu(d->udev->descriptor.idVendor) ==
> >USB_VID_AVERMEDIA) &&
> >> + (le16_to_cpu(d->udev->descriptor.idProduct) ==
> >USB_PID_AVERMEDIA_TD310))
> >> + i2c_addr = 0x64;
> >> + ret = af9035_add_i2c_dev(d, "si2168", i2c_addr, &si2168_config,
> >> &d->i2c_adap);
> >> if (ret)
> >> goto err;
> >> @@ -1613,6 +1618,7 @@ static int it930x_tuner_attach(struct dv
> >> struct usb_interface *intf = d->intf;
> >> int ret;
> >> struct si2157_config si2157_config;
> >> + u8 i2c_addr;
> >>
> >> dev_dbg(&intf->dev, "adap->id=%d\n", adap->id);
> >>
> >> @@ -1661,7 +1667,13 @@ static int it930x_tuner_attach(struct dv
> >> memset(&si2157_config, 0, sizeof(si2157_config));
> >> si2157_config.fe = adap->fe[0];
> >> si2157_config.if_port = 1;
> >> - ret = af9035_add_i2c_dev(d, "si2157", 0x63,
> >> + i2c_addr = 0x63;
> >> + if ((le16_to_cpu(d->udev->descriptor.idVendor) ==
> >USB_VID_AVERMEDIA) &&
> >> + (le16_to_cpu(d->udev->descriptor.idProduct) ==
> >USB_PID_AVERMEDIA_TD310)) {
> >> + i2c_addr = 0x60;
> >> + si2157_config.if_port = 0;
> >> + }
> >> + ret = af9035_add_i2c_dev(d, "si2157", i2c_addr,
> >> &si2157_config, state->i2c_adapter_demod);
> >>
> >> if (ret)
> >> @@ -2169,6 +2181,8 @@ static const struct usb_device_id af9035
> >> /* IT930x devices */
> >> { DVB_USB_DEVICE(USB_VID_ITETECH, USB_PID_ITETECH_IT9303,
> >> &it930x_props, "ITE 9303 Generic", NULL) },
> >> + { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_TD310,
> >> + &it930x_props, "AVerMedia TD310 DVB-T2", NULL) },
> >> { }
> >> };
> >> MODULE_DEVICE_TABLE(usb, af9035_id_table);
> >> diff -upr linux/include/media/dvb-usb-ids.h
> >linux.new/include/media/dvb-usb-ids.h
> >> --- linux/include/media/dvb-usb-ids.h 2018-05-05 07:40:18.000000000
> >+0200
> >> +++ linux.new/include/media/dvb-usb-ids.h 2019-02-08
> >22:00:24.765541474 +0100
> >> @@ -258,6 +258,7 @@
> >> #define USB_PID_AVERMEDIA_A867 0xa867
> >> #define USB_PID_AVERMEDIA_H335 0x0335
> >> #define USB_PID_AVERMEDIA_TD110 0xa110
> >> +#define USB_PID_AVERMEDIA_TD310 0x1871
> >> #define USB_PID_AVERMEDIA_TWINSTAR 0x0825
> >> #define USB_PID_TECHNOTREND_CONNECT_S2400 0x3006
> >> #define USB_PID_TECHNOTREND_CONNECT_S2400_8KEEPROM 0x3009
> >>
> >>
> >>
> >> Sent from MailDroid
>
>
> --
> Enviado desde mi dispositivo Android con K-9 Mail. Por favor, disculpa mi brevedad.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Add suport for Avermedia TD310
2019-02-20 9:37 ` Sean Young
@ 2019-02-20 12:49 ` Jose Alberto Reguero
2019-02-20 13:08 ` Sean Young
0 siblings, 1 reply; 6+ messages in thread
From: Jose Alberto Reguero @ 2019-02-20 12:49 UTC (permalink / raw)
To: Sean Young; +Cc: Jose Alberto Reguero, linux-media, Antti Palosaari
El 20 de febrero de 2019 10:37:15 CET, Sean Young <sean@mess.org> escribió:
>On Tue, Feb 19, 2019 at 11:51:25PM +0100, Jose Alberto Reguero wrote:
>> El 19 de febrero de 2019 22:57:31 CET, Sean Young <sean@mess.org>
>escribió:
>> >On Mon, Feb 11, 2019 at 11:13:25PM +0100, Jose Alberto Reguero
>wrote:
>> >> This patch add support for Avermedia TD310 usb stik.
>> >> This patch must be aplied after this one:
>> >> https://patchwork.linuxtv.org/patch/40087/
>> >
>> >That patch is marked Changes Requested. Please fix that patch first,
>> >and then re-submit.
>> >
>> >Thanks,
>> >Sean
>> >
>>
>> The patch that that need changes is the other one of the serie, the
>one for the si2157. This one can be applyed like this.
>
>Do you mean:
>
> https://patchwork.linuxtv.org/patch/40089/
>
>That also needs changes before it can be applied, I'm afraid.
>
>Sean
>
I only need the patch:
[2/3,media] af9035: init i2c already in it930x_frontend_attach
I think that It can be applied. I don't know what need no be changed.
Thanks.
Jose Alberto
>>
>> Thanks.
>>
>> Jose Alberto
>>
>> >>
>> >> Signed-off-by: Jose Alberto Reguero
><jose.alberto.reguero@gmail.com>
>> >>
>> >> diff -upr linux/drivers/media/usb/dvb-usb-v2/af9035.c
>> >linux.new/drivers/media/usb/dvb-usb-v2/af9035.c
>> >> --- linux/drivers/media/usb/dvb-usb-v2/af9035.c 2019-02-11
>> >14:48:58.133751038 +0100
>> >> +++ linux.new/drivers/media/usb/dvb-usb-v2/af9035.c 2019-02-11
>> >15:02:10.646718610 +0100
>> >> @@ -1215,6 +1215,7 @@ static int it930x_frontend_attach(struct
>> >> int ret;
>> >> struct si2168_config si2168_config;
>> >> struct i2c_adapter *adapter;
>> >> + u8 i2c_addr;
>> >>
>> >> dev_dbg(&intf->dev, "%s adap->id=%d\n", __func__, adap->id);
>> >>
>> >> @@ -1266,7 +1267,11 @@ static int it930x_frontend_attach(struct
>> >>
>> >> state->af9033_config[adap->id].fe = &adap->fe[0];
>> >> state->af9033_config[adap->id].ops = &state->ops;
>> >> - ret = af9035_add_i2c_dev(d, "si2168", 0x67, &si2168_config,
>> >> + i2c_addr = 0x67;
>> >> + if ((le16_to_cpu(d->udev->descriptor.idVendor) ==
>> >USB_VID_AVERMEDIA) &&
>> >> + (le16_to_cpu(d->udev->descriptor.idProduct) ==
>> >USB_PID_AVERMEDIA_TD310))
>> >> + i2c_addr = 0x64;
>> >> + ret = af9035_add_i2c_dev(d, "si2168", i2c_addr, &si2168_config,
>> >> &d->i2c_adap);
>> >> if (ret)
>> >> goto err;
>> >> @@ -1613,6 +1618,7 @@ static int it930x_tuner_attach(struct dv
>> >> struct usb_interface *intf = d->intf;
>> >> int ret;
>> >> struct si2157_config si2157_config;
>> >> + u8 i2c_addr;
>> >>
>> >> dev_dbg(&intf->dev, "adap->id=%d\n", adap->id);
>> >>
>> >> @@ -1661,7 +1667,13 @@ static int it930x_tuner_attach(struct dv
>> >> memset(&si2157_config, 0, sizeof(si2157_config));
>> >> si2157_config.fe = adap->fe[0];
>> >> si2157_config.if_port = 1;
>> >> - ret = af9035_add_i2c_dev(d, "si2157", 0x63,
>> >> + i2c_addr = 0x63;
>> >> + if ((le16_to_cpu(d->udev->descriptor.idVendor) ==
>> >USB_VID_AVERMEDIA) &&
>> >> + (le16_to_cpu(d->udev->descriptor.idProduct) ==
>> >USB_PID_AVERMEDIA_TD310)) {
>> >> + i2c_addr = 0x60;
>> >> + si2157_config.if_port = 0;
>> >> + }
>> >> + ret = af9035_add_i2c_dev(d, "si2157", i2c_addr,
>> >> &si2157_config, state->i2c_adapter_demod);
>> >>
>> >> if (ret)
>> >> @@ -2169,6 +2181,8 @@ static const struct usb_device_id af9035
>> >> /* IT930x devices */
>> >> { DVB_USB_DEVICE(USB_VID_ITETECH, USB_PID_ITETECH_IT9303,
>> >> &it930x_props, "ITE 9303 Generic", NULL) },
>> >> + { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_TD310,
>> >> + &it930x_props, "AVerMedia TD310 DVB-T2", NULL) },
>> >> { }
>> >> };
>> >> MODULE_DEVICE_TABLE(usb, af9035_id_table);
>> >> diff -upr linux/include/media/dvb-usb-ids.h
>> >linux.new/include/media/dvb-usb-ids.h
>> >> --- linux/include/media/dvb-usb-ids.h 2018-05-05
>07:40:18.000000000
>> >+0200
>> >> +++ linux.new/include/media/dvb-usb-ids.h 2019-02-08
>> >22:00:24.765541474 +0100
>> >> @@ -258,6 +258,7 @@
>> >> #define USB_PID_AVERMEDIA_A867 0xa867
>> >> #define USB_PID_AVERMEDIA_H335 0x0335
>> >> #define USB_PID_AVERMEDIA_TD110 0xa110
>> >> +#define USB_PID_AVERMEDIA_TD310 0x1871
>> >> #define USB_PID_AVERMEDIA_TWINSTAR 0x0825
>> >> #define USB_PID_TECHNOTREND_CONNECT_S2400 0x3006
>> >> #define USB_PID_TECHNOTREND_CONNECT_S2400_8KEEPROM 0x3009
>> >>
>> >>
>> >>
>> >> Sent from MailDroid
>>
>>
>> --
>> Enviado desde mi dispositivo Android con K-9 Mail. Por favor,
>disculpa mi brevedad.
--
Enviado desde mi dispositivo Android con K-9 Mail. Por favor, disculpa mi brevedad.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Add suport for Avermedia TD310
2019-02-20 12:49 ` Jose Alberto Reguero
@ 2019-02-20 13:08 ` Sean Young
0 siblings, 0 replies; 6+ messages in thread
From: Sean Young @ 2019-02-20 13:08 UTC (permalink / raw)
To: Jose Alberto Reguero; +Cc: Jose Alberto Reguero, linux-media, Antti Palosaari
On Wed, Feb 20, 2019 at 01:49:28PM +0100, Jose Alberto Reguero wrote:
> El 20 de febrero de 2019 10:37:15 CET, Sean Young <sean@mess.org> escribió:
> >On Tue, Feb 19, 2019 at 11:51:25PM +0100, Jose Alberto Reguero wrote:
> >> El 19 de febrero de 2019 22:57:31 CET, Sean Young <sean@mess.org>
> >escribió:
> >> >On Mon, Feb 11, 2019 at 11:13:25PM +0100, Jose Alberto Reguero
> >wrote:
> >> >> This patch add support for Avermedia TD310 usb stik.
> >> >> This patch must be aplied after this one:
> >> >> https://patchwork.linuxtv.org/patch/40087/
> >> >
> >> >That patch is marked Changes Requested. Please fix that patch first,
> >> >and then re-submit.
> >> >
> >> >Thanks,
> >> >Sean
> >> >
> >>
> >> The patch that that need changes is the other one of the serie, the
> >one for the si2157. This one can be applyed like this.
> >
> >Do you mean:
> >
> > https://patchwork.linuxtv.org/patch/40089/
> >
> >That also needs changes before it can be applied, I'm afraid.
> >
> >Sean
> >
>
> I only need the patch:
>
> [2/3,media] af9035: init i2c already in it930x_frontend_attach
>
> I think that It can be applied. I don't know what need no be changed.
Ah sorry, I was not following before. So, in patch
https://patchwork.linuxtv.org/patch/40087/
called:
[2/3,media] af9035: init i2c already in it930x_frontend_attach
The i2c bus init is copied into it930x_frontend_attach() from
it930x_tuner_attach(). However the copy in the tuner attach is
still there, so it should be removed from the tuner attach. Please
fix this patch and re-submit both two patches as a new series and
we can review again.
Thanks,
Sean
>
> Thanks.
>
> Jose Alberto
>
> >>
> >> Thanks.
> >>
> >> Jose Alberto
> >>
> >> >>
> >> >> Signed-off-by: Jose Alberto Reguero
> ><jose.alberto.reguero@gmail.com>
> >> >>
> >> >> diff -upr linux/drivers/media/usb/dvb-usb-v2/af9035.c
> >> >linux.new/drivers/media/usb/dvb-usb-v2/af9035.c
> >> >> --- linux/drivers/media/usb/dvb-usb-v2/af9035.c 2019-02-11
> >> >14:48:58.133751038 +0100
> >> >> +++ linux.new/drivers/media/usb/dvb-usb-v2/af9035.c 2019-02-11
> >> >15:02:10.646718610 +0100
> >> >> @@ -1215,6 +1215,7 @@ static int it930x_frontend_attach(struct
> >> >> int ret;
> >> >> struct si2168_config si2168_config;
> >> >> struct i2c_adapter *adapter;
> >> >> + u8 i2c_addr;
> >> >>
> >> >> dev_dbg(&intf->dev, "%s adap->id=%d\n", __func__, adap->id);
> >> >>
> >> >> @@ -1266,7 +1267,11 @@ static int it930x_frontend_attach(struct
> >> >>
> >> >> state->af9033_config[adap->id].fe = &adap->fe[0];
> >> >> state->af9033_config[adap->id].ops = &state->ops;
> >> >> - ret = af9035_add_i2c_dev(d, "si2168", 0x67, &si2168_config,
> >> >> + i2c_addr = 0x67;
> >> >> + if ((le16_to_cpu(d->udev->descriptor.idVendor) ==
> >> >USB_VID_AVERMEDIA) &&
> >> >> + (le16_to_cpu(d->udev->descriptor.idProduct) ==
> >> >USB_PID_AVERMEDIA_TD310))
> >> >> + i2c_addr = 0x64;
> >> >> + ret = af9035_add_i2c_dev(d, "si2168", i2c_addr, &si2168_config,
> >> >> &d->i2c_adap);
> >> >> if (ret)
> >> >> goto err;
> >> >> @@ -1613,6 +1618,7 @@ static int it930x_tuner_attach(struct dv
> >> >> struct usb_interface *intf = d->intf;
> >> >> int ret;
> >> >> struct si2157_config si2157_config;
> >> >> + u8 i2c_addr;
> >> >>
> >> >> dev_dbg(&intf->dev, "adap->id=%d\n", adap->id);
> >> >>
> >> >> @@ -1661,7 +1667,13 @@ static int it930x_tuner_attach(struct dv
> >> >> memset(&si2157_config, 0, sizeof(si2157_config));
> >> >> si2157_config.fe = adap->fe[0];
> >> >> si2157_config.if_port = 1;
> >> >> - ret = af9035_add_i2c_dev(d, "si2157", 0x63,
> >> >> + i2c_addr = 0x63;
> >> >> + if ((le16_to_cpu(d->udev->descriptor.idVendor) ==
> >> >USB_VID_AVERMEDIA) &&
> >> >> + (le16_to_cpu(d->udev->descriptor.idProduct) ==
> >> >USB_PID_AVERMEDIA_TD310)) {
> >> >> + i2c_addr = 0x60;
> >> >> + si2157_config.if_port = 0;
> >> >> + }
> >> >> + ret = af9035_add_i2c_dev(d, "si2157", i2c_addr,
> >> >> &si2157_config, state->i2c_adapter_demod);
> >> >>
> >> >> if (ret)
> >> >> @@ -2169,6 +2181,8 @@ static const struct usb_device_id af9035
> >> >> /* IT930x devices */
> >> >> { DVB_USB_DEVICE(USB_VID_ITETECH, USB_PID_ITETECH_IT9303,
> >> >> &it930x_props, "ITE 9303 Generic", NULL) },
> >> >> + { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_TD310,
> >> >> + &it930x_props, "AVerMedia TD310 DVB-T2", NULL) },
> >> >> { }
> >> >> };
> >> >> MODULE_DEVICE_TABLE(usb, af9035_id_table);
> >> >> diff -upr linux/include/media/dvb-usb-ids.h
> >> >linux.new/include/media/dvb-usb-ids.h
> >> >> --- linux/include/media/dvb-usb-ids.h 2018-05-05
> >07:40:18.000000000
> >> >+0200
> >> >> +++ linux.new/include/media/dvb-usb-ids.h 2019-02-08
> >> >22:00:24.765541474 +0100
> >> >> @@ -258,6 +258,7 @@
> >> >> #define USB_PID_AVERMEDIA_A867 0xa867
> >> >> #define USB_PID_AVERMEDIA_H335 0x0335
> >> >> #define USB_PID_AVERMEDIA_TD110 0xa110
> >> >> +#define USB_PID_AVERMEDIA_TD310 0x1871
> >> >> #define USB_PID_AVERMEDIA_TWINSTAR 0x0825
> >> >> #define USB_PID_TECHNOTREND_CONNECT_S2400 0x3006
> >> >> #define USB_PID_TECHNOTREND_CONNECT_S2400_8KEEPROM 0x3009
> >> >>
> >> >>
> >> >>
> >> >> Sent from MailDroid
> >>
> >>
> >> --
> >> Enviado desde mi dispositivo Android con K-9 Mail. Por favor,
> >disculpa mi brevedad.
>
>
> --
> Enviado desde mi dispositivo Android con K-9 Mail. Por favor, disculpa mi brevedad.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-02-20 13:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 22:13 [PATCH] Add suport for Avermedia TD310 Jose Alberto Reguero
2019-02-19 21:57 ` Sean Young
2019-02-19 22:51 ` Jose Alberto Reguero
2019-02-20 9:37 ` Sean Young
2019-02-20 12:49 ` Jose Alberto Reguero
2019-02-20 13:08 ` Sean Young
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).