All of lore.kernel.org
 help / color / mirror / Atom feed
From: ほち <knightrider@are.ma>
To: Michael Krufky <mkrufky@linuxtv.org>
Cc: linux-media <linux-media@vger.kernel.org>,
	Hans De Goede <hdegoede@redhat.com>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Sylwester Nawrocki <sylvester.nawrocki@gmail.com>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Peter Senna Tschudin <peter.senna@gmail.com>
Subject: Re: [PATCH] Full DVB driver package for Earthsoft PT3 (ISDB-S/T) cards
Date: Wed, 6 Nov 2013 05:56:46 +0900	[thread overview]
Message-ID: <CAKnK8-Q51UOqGc1T2jfJENm5pOWAutytKLcDkhgkM3yWjAtJ2w@mail.gmail.com> (raw)
In-Reply-To: <CAOcJUbxCjEWk47MkJP15QBAuGd3ePYS3ZRMduqdMCrVT362-8Q@mail.gmail.com>

see inline

2013/11/6 Michael Krufky <mkrufky@linuxtv.org>:
> responding inline:
>
>> Mauro Carvalho Chehab asked to put tuner code as an I2C driver, under drivers/media/tuners, frontends at drivers/media/dvb-
>> However, to keep package integrity & compatibility with PT1/PT2 user apps, FE etc. are still placed in the same directory.
>
> A userspace application doesn't care  where file are places within the
> kernel tree.  You are to use standard linux-dvb api's and the
> codingstyle of the driver shall comply with that of the linux kernel's
> DVB subsystem, including the proper placement of files.

As stated in my (previous) mails, I took PT1 module as a reference.
Everything is located in single directory ...pt1/, including the frontends.
They are built as a single integrated module, earth-pt1.ko

Sure I can split the FEs out to .../dvb-frontends/, build there as a separated
(FE only) module that would be hot-linked with the main module. However
I'm afraid (& sure) this will only make people confused with complex
dependencies leading to annoying bugs... The simpler the better...

Guys I need more opinions from other people before splitting the module.
IMHO even Linus won't like this...

>> diff --git a/drivers/media/pci/pt3_dvb/Kconfig b/drivers/media/pci/pt3_dvb/Kconfig
>> new file mode 100644
>> index 0000000..f9ba00d
>> --- /dev/null
>> +++ b/drivers/media/pci/pt3_dvb/Kconfig
>> @@ -0,0 +1,12 @@
>> +config PT3_DVB
>> +       tristate "Earthsoft PT3 cards"
>> +       depends on DVB_CORE && PCI
>> +       help
>> +         Support for Earthsoft PT3 PCI-Express cards.
>> +
>> +         Since these cards have no MPEG decoder onboard, they transmit
>> +         only compressed MPEG data over the PCI bus, so you need
>> +         an external software decoder to watch TV on your computer.
>> +
>> +         Say Y or M if you own such a device and want to use it.
>
> Very few of these digital tuner boards have onboard mpeg decoders.  We
> can do without this extra information here.

ok, will change to:
These cards transmit only compressed MPEG data over the PCI bus.
You need external software decoder to watch TV on your computer.

>> diff --git a/drivers/media/pci/pt3_dvb/Makefile b/drivers/media/pci/pt3_dvb/Makefile
>> new file mode 100644
>> index 0000000..7087c90
>> --- /dev/null
>> +++ b/drivers/media/pci/pt3_dvb/Makefile
>> @@ -0,0 +1,6 @@
>> +pt3_dvb-objs := pt3.o pt3_fe.o pt3_dma.o pt3_tc.o pt3_i2c.o pt3_bus.o
>> +
>> +obj-$(CONFIG_PT3_DVB) += pt3_dvb.o
>> +
>> +ccflags-y += -Idrivers/media/dvb-core -Idrivers/media/dvb-frontends -Idrivers/media/tuners
>> +
>
> Ususally, the driver would be named 'pt3.ko' and the object file that
> handles the DVB api would be called pt3_dvb.o
>
> This isn't any rule, but the way that you've named them seems a bit
> awkward to me.  I don't require that you change this, just stating my
> awkward feeling on the matter.

FYI, there is another version of PT3 driver, named pt3_drv.ko, that
utilize character devices as the I/O. I'd rather use pt3_dvb.ko to
distinguish.

Maybe I'd like to change the dirname:
drivers/media/pci/pt3_dvb => drivers/media/pci/pt3

>> +static int lnb = 2;    /* used if not set by frontend / the value is invalid */
>> +module_param(lnb, int, 0);
>> +MODULE_PARM_DESC(lnb, "LNB level (0:OFF 1:+11V 2:+15V)");
>
> Take these above three statements out of the header file and move them
> into a .c file

OK Sir

>> +struct dvb_frontend *pt3_fe_s_attach(struct pt3_adapter *adap);
>> +struct dvb_frontend *pt3_fe_t_attach(struct pt3_adapter *adap);
>
> Please create separate headers corresponding to the .c file that
> contains the function.  Don't put them all in one, as the tuner and
> demodulator should be separate modules

Splitting the protos? Well I will consider...

> every source file and header file should include GPLv2 license headers.

Roger: not very crucial though...

>> +#define PT3_QM_INIT_DUMMY_RESET 0x0c
>
> it's nicer when these macros are defined in one place, but its not a
> requirement.  It's OK to leave it here if you really want to, but I
> suggest instead to create a _reg.h file containing all register
> #defines

Will consider...

  parent reply	other threads:[~2013-11-05 20:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05 15:43 [PATCH] Full DVB driver package for Earthsoft PT3 (ISDB-S/T) cards буди Романто
     [not found] ` <CAOcJUbxCjEWk47MkJP15QBAuGd3ePYS3ZRMduqdMCrVT362-8Q@mail.gmail.com>
2013-11-05 20:56   ` ほち [this message]
2013-11-05 21:09     ` Michael Krufky
2013-11-05 22:30     ` ほち
2013-11-06 13:14       ` Michael Krufky
2013-11-06 16:13         ` Antti Palosaari
2013-11-05 16:36 буди Романто
2013-12-08  5:14 Guest
2013-12-08 22:52 ` Antti Palosaari
2013-12-19 23:14 Guest
2013-12-21 13:24 ` Mauro Carvalho Chehab
2013-12-21 16:06 ` Antti Palosaari
2014-04-02  7:44 Guest
2014-04-05  4:34 ` Akihiro TSUKADA
2014-04-10 16:06 буди Романто
2014-04-21 15:20 Буди Романто, AreMa Inc
2014-04-22 17:26 Буди Романто, AreMa Inc
2014-05-17 19:03 ` Antti Palosaari
2014-05-19 22:19   ` ほち
2014-05-19 23:23     ` Antti Palosaari
2014-05-20 23:37 Буди Романто, AreMa Inc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKnK8-Q51UOqGc1T2jfJENm5pOWAutytKLcDkhgkM3yWjAtJ2w@mail.gmail.com \
    --to=knightrider@are.ma \
    --cc=g.liakhovetski@gmx.de \
    --cc=hdegoede@redhat.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mkrufky@linuxtv.org \
    --cc=peter.senna@gmail.com \
    --cc=sylvester.nawrocki@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.