* WL1273 FM Radio driver...
@ 2011-01-18 15:04 Matti J. Aaltonen
2011-01-19 10:18 ` Mark Brown
2011-01-30 23:23 ` Samuel Ortiz
0 siblings, 2 replies; 22+ messages in thread
From: Matti J. Aaltonen @ 2011-01-18 15:04 UTC (permalink / raw)
To: alsa-devel, broonie, lrg, mchehab, hverkuil, sameo, linux-media
Hello
I have been trying to get the WL1273 FM radio driver into the kernel for
some time. It has been kind of difficult, one of the reasons is that I
didn't realize I should have tried to involve all relevant maintainers
to the discussion form the beginning (AsoC, Media and MFD). At Mark's
suggestion I'm trying to reopen the discussion now.
The driver consists of an MFD core and two child drivers (the audio
codec and the V4L2 driver). And the question is mainly about the role of
the MFD driver: the original design had the IO functions in the core.
Currently the core is practically empty mainly because Mauro very
strongly wanted to have “everything” in the V4L2 driver.
I liked the original design because it didn't have the bug that the
current MFD has: the codec can be initialized before the V4L2 part sets
the IO function pointers. Having in principle equally capable interface
drivers is symmetrical and esthetically pleasing:-) Also somebody could
easily leave out the existing interfaces and create a completely new one
based for example to sysfs or something... Having the IO in the core
would also conveniently hide the physical communication layer and make
it easy to change I2C to UART, which is also supported by the chip.
Thanks,
Matti
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-01-18 15:04 WL1273 FM Radio driver Matti J. Aaltonen
@ 2011-01-19 10:18 ` Mark Brown
2011-01-30 23:23 ` Samuel Ortiz
1 sibling, 0 replies; 22+ messages in thread
From: Mark Brown @ 2011-01-19 10:18 UTC (permalink / raw)
To: Matti J. Aaltonen; +Cc: alsa-devel, lrg, mchehab, hverkuil, sameo, linux-media
On Tue, Jan 18, 2011 at 05:04:23PM +0200, Matti J. Aaltonen wrote:
> The driver consists of an MFD core and two child drivers (the audio
> codec and the V4L2 driver). And the question is mainly about the role of
> the MFD driver: the original design had the IO functions in the core.
> Currently the core is practically empty mainly because Mauro very
> strongly wanted to have “everything” in the V4L2 driver.
> I liked the original design because it didn't have the bug that the
> current MFD has: the codec can be initialized before the V4L2 part sets
> the IO function pointers. Having in principle equally capable interface
> drivers is symmetrical and esthetically pleasing:-) Also somebody could
> easily leave out the existing interfaces and create a completely new one
> based for example to sysfs or something... Having the IO in the core
> would also conveniently hide the physical communication layer and make
> it easy to change I2C to UART, which is also supported by the chip.
The above pattern with the core taking responsibility for register I/O
is used by all the other MFD drivers in part because it's much less
fragile against initialisation ordering issues. It ensures that before
any subdevices can instantiate and try to do register I/O all the
infrastructure required to do that is present. Is there any great
reason for following a different pattern, and if we are going to do so
how do we deal with the init ordering?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-01-18 15:04 WL1273 FM Radio driver Matti J. Aaltonen
2011-01-19 10:18 ` Mark Brown
@ 2011-01-30 23:23 ` Samuel Ortiz
2011-02-02 15:35 ` Mauro Carvalho Chehab
1 sibling, 1 reply; 22+ messages in thread
From: Samuel Ortiz @ 2011-01-30 23:23 UTC (permalink / raw)
To: Matti J. Aaltonen
Cc: alsa-devel, broonie, lrg, mchehab, hverkuil, linux-media
Hi Matti,
On Tue, Jan 18, 2011 at 05:04:23PM +0200, Matti J. Aaltonen wrote:
> Hello
>
> I have been trying to get the WL1273 FM radio driver into the kernel for
> some time. It has been kind of difficult, one of the reasons is that I
> didn't realize I should have tried to involve all relevant maintainers
> to the discussion form the beginning (AsoC, Media and MFD). At Mark's
> suggestion I'm trying to reopen the discussion now.
>
> The driver consists of an MFD core and two child drivers (the audio
> codec and the V4L2 driver). And the question is mainly about the role of
> the MFD driver: the original design had the IO functions in the core.
> Currently the core is practically empty mainly because Mauro very
> strongly wanted to have “everything” in the V4L2 driver.
What was Mauro main concerns with having the IO part in the core ?
A lot of MFD drivers are going that path already.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-01-30 23:23 ` Samuel Ortiz
@ 2011-02-02 15:35 ` Mauro Carvalho Chehab
2011-02-02 15:51 ` Mark Brown
2011-02-03 0:37 ` Samuel Ortiz
0 siblings, 2 replies; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-02-02 15:35 UTC (permalink / raw)
To: Samuel Ortiz
Cc: Matti J. Aaltonen, alsa-devel, broonie, lrg, hverkuil,
linux-media
Em 30-01-2011 21:23, Samuel Ortiz escreveu:
> Hi Matti,
>
> On Tue, Jan 18, 2011 at 05:04:23PM +0200, Matti J. Aaltonen wrote:
>> Hello
>>
>> I have been trying to get the WL1273 FM radio driver into the kernel for
>> some time. It has been kind of difficult, one of the reasons is that I
>> didn't realize I should have tried to involve all relevant maintainers
>> to the discussion form the beginning (AsoC, Media and MFD). At Mark's
>> suggestion I'm trying to reopen the discussion now.
>>
>> The driver consists of an MFD core and two child drivers (the audio
>> codec and the V4L2 driver). And the question is mainly about the role of
>> the MFD driver: the original design had the IO functions in the core.
>> Currently the core is practically empty mainly because Mauro very
>> strongly wanted to have “everything” in the V4L2 driver.
> What was Mauro main concerns with having the IO part in the core ?
> A lot of MFD drivers are going that path already.
My concerns is that the V4L2-specific part of the code should be at drivers/media.
I prefer that the specific MFD I/O part to be at drivers/mfd, just like
the other drivers.
Cheers,
Mauro
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-02 15:35 ` Mauro Carvalho Chehab
@ 2011-02-02 15:51 ` Mark Brown
2011-02-03 0:37 ` Samuel Ortiz
1 sibling, 0 replies; 22+ messages in thread
From: Mark Brown @ 2011-02-02 15:51 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Samuel Ortiz, Matti J. Aaltonen, alsa-devel, lrg, hverkuil,
linux-media
On Wed, Feb 02, 2011 at 01:35:01PM -0200, Mauro Carvalho Chehab wrote:
[Reflowed into 80 columns.]
> My concerns is that the V4L2-specific part of the code should be at
> drivers/media. I prefer that the specific MFD I/O part to be at
> drivers/mfd, just like the other drivers.
Currently that's not the case - the I/O functionality is not in any
meaningful sense included in the MFD, it's provided by the V4L portion.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-02 15:35 ` Mauro Carvalho Chehab
2011-02-02 15:51 ` Mark Brown
@ 2011-02-03 0:37 ` Samuel Ortiz
1 sibling, 0 replies; 22+ messages in thread
From: Samuel Ortiz @ 2011-02-03 0:37 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Matti J. Aaltonen, alsa-devel, broonie, lrg, hverkuil,
linux-media
Hi Mauro,
On Wed, Feb 02, 2011 at 01:35:01PM -0200, Mauro Carvalho Chehab wrote:
> Em 30-01-2011 21:23, Samuel Ortiz escreveu:
> > Hi Matti,
> >
> > On Tue, Jan 18, 2011 at 05:04:23PM +0200, Matti J. Aaltonen wrote:
> >> Hello
> >>
> >> I have been trying to get the WL1273 FM radio driver into the kernel for
> >> some time. It has been kind of difficult, one of the reasons is that I
> >> didn't realize I should have tried to involve all relevant maintainers
> >> to the discussion form the beginning (AsoC, Media and MFD). At Mark's
> >> suggestion I'm trying to reopen the discussion now.
> >>
> >> The driver consists of an MFD core and two child drivers (the audio
> >> codec and the V4L2 driver). And the question is mainly about the role of
> >> the MFD driver: the original design had the IO functions in the core.
> >> Currently the core is practically empty mainly because Mauro very
> >> strongly wanted to have “everything” in the V4L2 driver.
> > What was Mauro main concerns with having the IO part in the core ?
> > A lot of MFD drivers are going that path already.
>
> My concerns is that the V4L2-specific part of the code should be at drivers/media.
> I prefer that the specific MFD I/O part to be at drivers/mfd, just like
> the other drivers.
Agreed, but it seems that's not the case currently. Would you be ok with Matti
refactoring those 2 drivers a bit so that the actual core I/O parts should be
handled by the MFD driver ?
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
@ 2011-02-07 10:52 Matti J. Aaltonen
2011-02-07 12:00 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 22+ messages in thread
From: Matti J. Aaltonen @ 2011-02-07 10:52 UTC (permalink / raw)
To: alsa-devel, broonie, lrg, mchehab, hverkuil, sameo, linux-media
Hello.
Mark Brown wrote:
> On Wed, Feb 02, 2011 at 01:35:01PM -0200, Mauro
> Carvalho Chehab wrote:
>
> [Reflowed into 80 columns.]
>> My concerns is that the V4L2-specific part of the code should be at
>> drivers/media. I prefer that the specific MFD I/O part to be at
>> drivers/mfd, just like the other drivers.
>
> Currently that's not the case - the I/O functionality is not in any
> meaningful sense included in the MFD, it's provided by the V4L portion.
I've been away for two and a half weeks so I haven't been able to
comment...
But before I start to make changes, I'd still like to ask for a comment
on my original plan, which was to have the I/O functions in the MFD
driver and also have there things like interrupt handling etc.
My vision was that the MFD part would have the application logic and the
child drivers would be just true interfaces to the core functionality,
because I kind of saw the children to be of equal importance and because
the codec and the v4l2 driver share some controls like for example the
volume control.
If you'd care to take a look an earlier version of the MFD driver here:
http://article.gmane.org/gmane.linux.drivers.video-input-infrastructure/23602/match=aaltonen
So the question is if I put only the I/O stuff into the MFD driver or
can I have the other application logic there as well?
Thanks,
Matti
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 10:52 Matti J. Aaltonen
@ 2011-02-07 12:00 ` Mauro Carvalho Chehab
2011-02-07 12:02 ` Mark Brown
0 siblings, 1 reply; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-02-07 12:00 UTC (permalink / raw)
To: matti.j.aaltonen; +Cc: alsa-devel, broonie, lrg, hverkuil, sameo, linux-media
Em 07-02-2011 08:52, Matti J. Aaltonen escreveu:
> Hello.
>
> Mark Brown wrote:
>> On Wed, Feb 02, 2011 at 01:35:01PM -0200, Mauro
>> Carvalho Chehab wrote:
>>
>> [Reflowed into 80 columns.]
>>> My concerns is that the V4L2-specific part of the code should be at
>>> drivers/media. I prefer that the specific MFD I/O part to be at
>>> drivers/mfd, just like the other drivers.
>>
>> Currently that's not the case - the I/O functionality is not in any
>> meaningful sense included in the MFD, it's provided by the V4L portion.
>
> I've been away for two and a half weeks so I haven't been able to
> comment...
>
> But before I start to make changes, I'd still like to ask for a comment
> on my original plan, which was to have the I/O functions in the MFD
> driver and also have there things like interrupt handling etc.
>
> My vision was that the MFD part would have the application logic and the
> child drivers would be just true interfaces to the core functionality,
> because I kind of saw the children to be of equal importance and because
> the codec and the v4l2 driver share some controls like for example the
> volume control.
>
> If you'd care to take a look an earlier version of the MFD driver here:
>
> http://article.gmane.org/gmane.linux.drivers.video-input-infrastructure/23602/match=aaltonen
>
> So the question is if I put only the I/O stuff into the MFD driver or
> can I have the other application logic there as well?
Matti,
Things that are required in order to access the device via MFD should be at
the MFD part (for example, wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data).
The logic that are related to control the radio (wl1273_fm_set_audio, wl1273_fm_set_volume,
etc) are not related to access the device via the MFD bus. They should be at
the media part of the driver, where they belong.
One example that you could as reference for the mfd/media is the Timeberdale driver.
The MFD-specific part is at:
drivers/mfd/timberdale.c
The media part is at:
drivers/media/video/timblogiw.c
All you'll see at the MFD part is the logic to access the MFD bus and a description
of the devices that will be coupled into it (in this case, it is a multi-function
board). In other words, I/O control and the needed glue to access the I2C devices.
All logic required to control the media driver is at timblogiw.c.
I hope that helps.
Thanks,
Mauro
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 12:00 ` Mauro Carvalho Chehab
@ 2011-02-07 12:02 ` Mark Brown
2011-02-07 12:48 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 22+ messages in thread
From: Mark Brown @ 2011-02-07 12:02 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: matti.j.aaltonen, alsa-devel, lrg, hverkuil, sameo, linux-media
On Mon, Feb 07, 2011 at 10:00:16AM -0200, Mauro Carvalho Chehab wrote:
> the MFD part (for example, wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data).
> The logic that are related to control the radio (wl1273_fm_set_audio, wl1273_fm_set_volume,
> etc) are not related to access the device via the MFD bus. They should be at
> the media part of the driver, where they belong.
Those functions are being used by the audio driver.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 12:02 ` Mark Brown
@ 2011-02-07 12:48 ` Mauro Carvalho Chehab
2011-02-07 13:10 ` Mark Brown
2011-02-07 13:27 ` Matti J. Aaltonen
0 siblings, 2 replies; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-02-07 12:48 UTC (permalink / raw)
To: Mark Brown
Cc: matti.j.aaltonen, alsa-devel, lrg, hverkuil, sameo, linux-media
Em 07-02-2011 10:02, Mark Brown escreveu:
> On Mon, Feb 07, 2011 at 10:00:16AM -0200, Mauro Carvalho Chehab wrote:
>
>> the MFD part (for example, wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data).
>> The logic that are related to control the radio (wl1273_fm_set_audio, wl1273_fm_set_volume,
>> etc) are not related to access the device via the MFD bus. They should be at
>> the media part of the driver, where they belong.
>
> Those functions are being used by the audio driver.
Not sure if I understood your comments. Several media drivers have alsa drivers:
saa7134, em28xx, cx231xx, etc. The audio drivers for them are also under
/drivers/media, as it is not easy to de-couple audio and video/radio part
on those devices. For bttv and some USB boards (that use snd-usb-audio), the audio
part is at /sound, as the audio part on them are independent and don't need to
share anything, as audio is provided by a completely independent group of
registers.
I suggest to use the same logic for wl1273.
Cheers,
Mauro.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 12:48 ` Mauro Carvalho Chehab
@ 2011-02-07 13:10 ` Mark Brown
2011-02-07 13:48 ` Mauro Carvalho Chehab
2011-02-07 13:27 ` Matti J. Aaltonen
1 sibling, 1 reply; 22+ messages in thread
From: Mark Brown @ 2011-02-07 13:10 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: matti.j.aaltonen, alsa-devel, lrg, hverkuil, sameo, linux-media
On Mon, Feb 07, 2011 at 10:48:03AM -0200, Mauro Carvalho Chehab wrote:
> Em 07-02-2011 10:02, Mark Brown escreveu:
> > On Mon, Feb 07, 2011 at 10:00:16AM -0200, Mauro Carvalho Chehab wrote:
> >> the MFD part (for example, wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data).
> >> The logic that are related to control the radio (wl1273_fm_set_audio, wl1273_fm_set_volume,
> >> etc) are not related to access the device via the MFD bus. They should be at
> >> the media part of the driver, where they belong.
> > Those functions are being used by the audio driver.
> Not sure if I understood your comments. Several media drivers have alsa drivers:
There is an audio driver for this chip and it is using those functions.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 12:48 ` Mauro Carvalho Chehab
2011-02-07 13:10 ` Mark Brown
@ 2011-02-07 13:27 ` Matti J. Aaltonen
2011-02-07 13:28 ` Mark Brown
1 sibling, 1 reply; 22+ messages in thread
From: Matti J. Aaltonen @ 2011-02-07 13:27 UTC (permalink / raw)
To: ext Mauro Carvalho Chehab
Cc: Mark Brown, alsa-devel, lrg, hverkuil, sameo, linux-media
On Mon, 2011-02-07 at 10:48 -0200, ext Mauro Carvalho Chehab wrote:
> Em 07-02-2011 10:02, Mark Brown escreveu:
> > On Mon, Feb 07, 2011 at 10:00:16AM -0200, Mauro Carvalho Chehab wrote:
> >
> >> the MFD part (for example, wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data).
> >> The logic that are related to control the radio (wl1273_fm_set_audio, wl1273_fm_set_volume,
> >> etc) are not related to access the device via the MFD bus. They should be at
> >> the media part of the driver, where they belong.
> >
> > Those functions are being used by the audio driver.
>
> Not sure if I understood your comments. Several media drivers have alsa drivers:
> saa7134, em28xx, cx231xx, etc. The audio drivers for them are also under
> /drivers/media, as it is not easy to de-couple audio and video/radio part
> on those devices. For bttv and some USB boards (that use snd-usb-audio), the audio
> part is at /sound, as the audio part on them are independent and don't need to
> share anything, as audio is provided by a completely independent group of
> registers.
>
> I suggest to use the same logic for wl1273.
So you are suggesting a more or less complete rewrite, so that I'd
create a directory like media/radio/wl1273 and then place there all of
the driver files: wl1273-radio.c, wl1273-alsa.c and maybe wl1273-core.c?
Cheers,
Matti
>
> Cheers,
> Mauro.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 13:27 ` Matti J. Aaltonen
@ 2011-02-07 13:28 ` Mark Brown
2011-02-07 13:34 ` Matti J. Aaltonen
0 siblings, 1 reply; 22+ messages in thread
From: Mark Brown @ 2011-02-07 13:28 UTC (permalink / raw)
To: Matti J. Aaltonen
Cc: ext Mauro Carvalho Chehab, alsa-devel, lrg, hverkuil, sameo,
linux-media
On Mon, Feb 07, 2011 at 03:27:12PM +0200, Matti J. Aaltonen wrote:
> So you are suggesting a more or less complete rewrite, so that I'd
> create a directory like media/radio/wl1273 and then place there all of
> the driver files: wl1273-radio.c, wl1273-alsa.c and maybe wl1273-core.c?
Don't move the ASoC driver out of the ASoC code, it's a complete pain
for maintaining it and only makes the problems with having to build v4l
worse.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 13:28 ` Mark Brown
@ 2011-02-07 13:34 ` Matti J. Aaltonen
0 siblings, 0 replies; 22+ messages in thread
From: Matti J. Aaltonen @ 2011-02-07 13:34 UTC (permalink / raw)
To: ext Mark Brown
Cc: ext Mauro Carvalho Chehab, alsa-devel, lrg, hverkuil, sameo,
linux-media
On Mon, 2011-02-07 at 13:28 +0000, ext Mark Brown wrote:
> On Mon, Feb 07, 2011 at 03:27:12PM +0200, Matti J. Aaltonen wrote:
>
> > So you are suggesting a more or less complete rewrite, so that I'd
> > create a directory like media/radio/wl1273 and then place there all of
> > the driver files: wl1273-radio.c, wl1273-alsa.c and maybe wl1273-core.c?
>
> Don't move the ASoC driver out of the ASoC code, it's a complete pain
> for maintaining it and only makes the problems with having to build v4l
> worse.
I won't do anything before we have some kind of consensus :-)
Cheers,
Matti
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 13:10 ` Mark Brown
@ 2011-02-07 13:48 ` Mauro Carvalho Chehab
2011-02-07 13:52 ` Mark Brown
2011-02-07 14:09 ` Matti J. Aaltonen
0 siblings, 2 replies; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-02-07 13:48 UTC (permalink / raw)
To: Mark Brown
Cc: matti.j.aaltonen, alsa-devel, lrg, hverkuil, sameo, linux-media
Em 07-02-2011 11:10, Mark Brown escreveu:
> On Mon, Feb 07, 2011 at 10:48:03AM -0200, Mauro Carvalho Chehab wrote:
>> Em 07-02-2011 10:02, Mark Brown escreveu:
>>> On Mon, Feb 07, 2011 at 10:00:16AM -0200, Mauro Carvalho Chehab wrote:
>
>>>> the MFD part (for example, wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data).
>>>> The logic that are related to control the radio (wl1273_fm_set_audio, wl1273_fm_set_volume,
>>>> etc) are not related to access the device via the MFD bus. They should be at
>>>> the media part of the driver, where they belong.
>
>>> Those functions are being used by the audio driver.
>
>> Not sure if I understood your comments. Several media drivers have alsa drivers:
>
> There is an audio driver for this chip and it is using those functions.
Where are the other drivers that depend on it?
Mauro
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 13:48 ` Mauro Carvalho Chehab
@ 2011-02-07 13:52 ` Mark Brown
2011-02-07 14:17 ` Matti J. Aaltonen
2011-02-07 14:09 ` Matti J. Aaltonen
1 sibling, 1 reply; 22+ messages in thread
From: Mark Brown @ 2011-02-07 13:52 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: matti.j.aaltonen, alsa-devel, lrg, hverkuil, sameo, linux-media
On Mon, Feb 07, 2011 at 11:48:17AM -0200, Mauro Carvalho Chehab wrote:
> Em 07-02-2011 11:10, Mark Brown escreveu:
> > There is an audio driver for this chip and it is using those functions.
> Where are the other drivers that depend on it?
Nothing's been merged yet to my knowledge, Matti can comment on any
incoming boards which will use it (rx51?).
Note that due to the decomposed nature of embedded audio hardware the
audio part of the chip needs to be represended within the audio
subsystem even if the control were all in the media side - this isn't an
isolated bit of hardware on an expansion card, it's fairly tightly
coupled into the rest of the system.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 13:48 ` Mauro Carvalho Chehab
2011-02-07 13:52 ` Mark Brown
@ 2011-02-07 14:09 ` Matti J. Aaltonen
2011-02-07 15:57 ` Mauro Carvalho Chehab
1 sibling, 1 reply; 22+ messages in thread
From: Matti J. Aaltonen @ 2011-02-07 14:09 UTC (permalink / raw)
To: ext Mauro Carvalho Chehab
Cc: Mark Brown, alsa-devel, lrg, hverkuil, sameo, linux-media
On Mon, 2011-02-07 at 11:48 -0200, ext Mauro Carvalho Chehab wrote:
> Em 07-02-2011 11:10, Mark Brown escreveu:
> > On Mon, Feb 07, 2011 at 10:48:03AM -0200, Mauro Carvalho Chehab wrote:
> >> Em 07-02-2011 10:02, Mark Brown escreveu:
> >>> On Mon, Feb 07, 2011 at 10:00:16AM -0200, Mauro Carvalho Chehab wrote:
> >
> >>>> the MFD part (for example, wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data).
> >>>> The logic that are related to control the radio (wl1273_fm_set_audio, wl1273_fm_set_volume,
> >>>> etc) are not related to access the device via the MFD bus. They should be at
> >>>> the media part of the driver, where they belong.
> >
> >>> Those functions are being used by the audio driver.
> >
> >> Not sure if I understood your comments. Several media drivers have alsa drivers:
> >
> > There is an audio driver for this chip and it is using those functions.
>
> Where are the other drivers that depend on it?
There's the MFD driver driver/mfd/wl1273-core.c, which is to offer the
(I2C) I/O functions to the child drivers:
drivers/media/radio/radio-wl1273.c and sound/soc/codecs/wl1273.c.
Both children depend on the MFD driver for I/O and the codec also
depends on the presence of the radio-wl1273 driver because without the
v4l2 part nothing can be done...
Matti
>
> Mauro
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 13:52 ` Mark Brown
@ 2011-02-07 14:17 ` Matti J. Aaltonen
2011-02-07 16:00 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 22+ messages in thread
From: Matti J. Aaltonen @ 2011-02-07 14:17 UTC (permalink / raw)
To: ext Mark Brown
Cc: Mauro Carvalho Chehab, alsa-devel, lrg, hverkuil, sameo,
linux-media
On Mon, 2011-02-07 at 13:52 +0000, ext Mark Brown wrote:
> On Mon, Feb 07, 2011 at 11:48:17AM -0200, Mauro Carvalho Chehab wrote:
> > Em 07-02-2011 11:10, Mark Brown escreveu:
>
> > > There is an audio driver for this chip and it is using those functions.
>
> > Where are the other drivers that depend on it?
>
> Nothing's been merged yet to my knowledge, Matti can comment on any
> incoming boards which will use it (rx51?).
Yes, nothing's been merged yet. There are only dependencies between the
parts of this driver... I cannot comment on upcoming boards, I just hope
we could agree on a sensible structure for this thing.
Matti.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 14:09 ` Matti J. Aaltonen
@ 2011-02-07 15:57 ` Mauro Carvalho Chehab
2011-02-07 16:01 ` Mark Brown
0 siblings, 1 reply; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-02-07 15:57 UTC (permalink / raw)
To: matti.j.aaltonen
Cc: Mark Brown, alsa-devel, lrg, hverkuil, sameo, linux-media
Em 07-02-2011 12:09, Matti J. Aaltonen escreveu:
> On Mon, 2011-02-07 at 11:48 -0200, ext Mauro Carvalho Chehab wrote:
>> Em 07-02-2011 11:10, Mark Brown escreveu:
>>> On Mon, Feb 07, 2011 at 10:48:03AM -0200, Mauro Carvalho Chehab wrote:
>>>> Em 07-02-2011 10:02, Mark Brown escreveu:
>>>>> On Mon, Feb 07, 2011 at 10:00:16AM -0200, Mauro Carvalho Chehab wrote:
>>>
>>>>>> the MFD part (for example, wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data).
>>>>>> The logic that are related to control the radio (wl1273_fm_set_audio, wl1273_fm_set_volume,
>>>>>> etc) are not related to access the device via the MFD bus. They should be at
>>>>>> the media part of the driver, where they belong.
>>>
>>>>> Those functions are being used by the audio driver.
>>>
>>>> Not sure if I understood your comments. Several media drivers have alsa drivers:
>>>
>>> There is an audio driver for this chip and it is using those functions.
>>
>> Where are the other drivers that depend on it?
>
> There's the MFD driver driver/mfd/wl1273-core.c, which is to offer the
> (I2C) I/O functions to the child drivers:
> drivers/media/radio/radio-wl1273.c and sound/soc/codecs/wl1273.c.
>
> Both children depend on the MFD driver for I/O and the codec also
> depends on the presence of the radio-wl1273 driver because without the
> v4l2 part nothing can be done...
I think that the better would be to move the audio part (sound/soc/codecs/wl1273.c)
as drivers/media/radio/wl1273/wl1273-alsa.c. Is there any problem on moving it, or
the alsa driver is also tightly coupled on the rest of the sound/soc stuff?
I remember that, in the past, there were someone that proposed to move /sound into
/media/sound, and move some common stuff between them into /media/common.
Btw, there are(where?) some problems between -alsa and -media subsystems: basically,
the audio core needs to be initialized before the drivers. However, this sometimes
don't happen (I can't remember the exact situation - perhaps builtin compilations?),
but we ended by needing to explicitly delaying the init of some drivers with:
late_initcall(saa7134_alsa_init);
To avoid some OOPS conditions.
>
> Matti
>
>>
>> Mauro
>>
>
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 14:17 ` Matti J. Aaltonen
@ 2011-02-07 16:00 ` Mauro Carvalho Chehab
2011-02-09 8:47 ` Matti J. Aaltonen
0 siblings, 1 reply; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-02-07 16:00 UTC (permalink / raw)
To: matti.j.aaltonen
Cc: ext Mark Brown, alsa-devel, lrg, hverkuil, sameo, linux-media
Em 07-02-2011 12:17, Matti J. Aaltonen escreveu:
> On Mon, 2011-02-07 at 13:52 +0000, ext Mark Brown wrote:
>> On Mon, Feb 07, 2011 at 11:48:17AM -0200, Mauro Carvalho Chehab wrote:
>>> Em 07-02-2011 11:10, Mark Brown escreveu:
>>
>>>> There is an audio driver for this chip and it is using those functions.
>>
>>> Where are the other drivers that depend on it?
>>
>> Nothing's been merged yet to my knowledge, Matti can comment on any
>> incoming boards which will use it (rx51?).
>
> Yes, nothing's been merged yet. There are only dependencies between the
> parts of this driver... I cannot comment on upcoming boards, I just hope
> we could agree on a sensible structure for this thing.
We don't need any brand names or specific details, but it would be good to
have an overview, in general lines, about the architecture, in order to help
you to map how this would fit. In particular, the architecturre of
things that are tightly coupled and can't be splitted by some bus abstraction.
Mauro.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 15:57 ` Mauro Carvalho Chehab
@ 2011-02-07 16:01 ` Mark Brown
0 siblings, 0 replies; 22+ messages in thread
From: Mark Brown @ 2011-02-07 16:01 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: matti.j.aaltonen, alsa-devel, lrg, hverkuil, sameo, linux-media
On Mon, Feb 07, 2011 at 01:57:10PM -0200, Mauro Carvalho Chehab wrote:
> Em 07-02-2011 12:09, Matti J. Aaltonen escreveu:
> > Both children depend on the MFD driver for I/O and the codec also
> > depends on the presence of the radio-wl1273 driver because without the
> > v4l2 part nothing can be done...
> I think that the better would be to move the audio part (sound/soc/codecs/wl1273.c)
> as drivers/media/radio/wl1273/wl1273-alsa.c. Is there any problem on moving it, or
> the alsa driver is also tightly coupled on the rest of the sound/soc stuff?
As I said in my previous e-mail it's tightly coupled.
> I remember that, in the past, there were someone that proposed to move /sound into
> /media/sound, and move some common stuff between them into /media/common.
This is the first embedded audio driver that's had interface with media
stuff, the driver situation for embedded audio is very different to that
for PCs. Embedded audio subsystems are tightly coupled integrations of
many different devices, the sound card userspace sees is produced by
coordinating the actions of several different drivers.
> Btw, there are(where?) some problems between -alsa and -media subsystems: basically,
> the audio core needs to be initialized before the drivers. However, this sometimes
> don't happen (I can't remember the exact situation - perhaps builtin compilations?),
> but we ended by needing to explicitly delaying the init of some drivers with:
> late_initcall(saa7134_alsa_init);
> To avoid some OOPS conditions.
This isn't a problem for embedded audio, instantiation of the cards is
deferred until all the components for the card have registered with the
core so nothing will happen until dependencies are satisfied, though it
is a problem with the wl1273 driver as it currently stands due to the
lack of a functional MFD.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: WL1273 FM Radio driver...
2011-02-07 16:00 ` Mauro Carvalho Chehab
@ 2011-02-09 8:47 ` Matti J. Aaltonen
0 siblings, 0 replies; 22+ messages in thread
From: Matti J. Aaltonen @ 2011-02-09 8:47 UTC (permalink / raw)
To: ext Mauro Carvalho Chehab
Cc: ext Mark Brown, alsa-devel, lrg, hverkuil, sameo, linux-media
On Mon, 2011-02-07 at 14:00 -0200, ext Mauro Carvalho Chehab wrote:
> Em 07-02-2011 12:17, Matti J. Aaltonen escreveu:
> > On Mon, 2011-02-07 at 13:52 +0000, ext Mark Brown wrote:
> >> On Mon, Feb 07, 2011 at 11:48:17AM -0200, Mauro Carvalho Chehab wrote:
> >>> Em 07-02-2011 11:10, Mark Brown escreveu:
> >>
> >>>> There is an audio driver for this chip and it is using those functions.
> >>
> >>> Where are the other drivers that depend on it?
> >>
> >> Nothing's been merged yet to my knowledge, Matti can comment on any
> >> incoming boards which will use it (rx51?).
> >
> > Yes, nothing's been merged yet. There are only dependencies between the
> > parts of this driver... I cannot comment on upcoming boards, I just hope
> > we could agree on a sensible structure for this thing.
>
> We don't need any brand names or specific details, but it would be good to
> have an overview, in general lines, about the architecture, in order to help
> you to map how this would fit. In particular, the architecturre of
> things that are tightly coupled and can't be splitted by some bus abstraction.
I understand what you are saying but obviously I cannot think like a
sub-system maintainer:-) What I see here is a piece of hardware with
lots of capabilities: FM RX and TX with analog and digital audio, I2C
and UART control...
I would have thought that the goal is to make a driver that's as
"general" as possible and to make it possible to use the chip in all
kinds of architectures and scenarios.
But we have been using the driver in principle in its current form. But
if the interface to the users has to be split in a different way, I
don't see that as a major problem. But on the other hand I can't see the
ASoC / V4L2 division going away completely. The users won't probably
care if we have MFD or not.
Cheers,
Matti
> Mauro.
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2011-02-09 8:48 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-18 15:04 WL1273 FM Radio driver Matti J. Aaltonen
2011-01-19 10:18 ` Mark Brown
2011-01-30 23:23 ` Samuel Ortiz
2011-02-02 15:35 ` Mauro Carvalho Chehab
2011-02-02 15:51 ` Mark Brown
2011-02-03 0:37 ` Samuel Ortiz
-- strict thread matches above, loose matches on Subject: below --
2011-02-07 10:52 Matti J. Aaltonen
2011-02-07 12:00 ` Mauro Carvalho Chehab
2011-02-07 12:02 ` Mark Brown
2011-02-07 12:48 ` Mauro Carvalho Chehab
2011-02-07 13:10 ` Mark Brown
2011-02-07 13:48 ` Mauro Carvalho Chehab
2011-02-07 13:52 ` Mark Brown
2011-02-07 14:17 ` Matti J. Aaltonen
2011-02-07 16:00 ` Mauro Carvalho Chehab
2011-02-09 8:47 ` Matti J. Aaltonen
2011-02-07 14:09 ` Matti J. Aaltonen
2011-02-07 15:57 ` Mauro Carvalho Chehab
2011-02-07 16:01 ` Mark Brown
2011-02-07 13:27 ` Matti J. Aaltonen
2011-02-07 13:28 ` Mark Brown
2011-02-07 13:34 ` Matti J. Aaltonen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox