Re: [alsa-devel] radio-maestro broken (conflicts with snd-es1968)

2011-03-14 Thread Hans Verkuil
> On Monday 14 March 2011, Hans Verkuil wrote:
>> > At Sat, 12 Mar 2011 19:52:39 +0100,
>> >
>> > Hans Verkuil wrote:
>> >> On Saturday, March 12, 2011 19:19:00 Ondrej Zary wrote:
>> >> > Hello,
>> >> > the radio-maestro driver is badly broken. It's intended to drive
>> the
>> >>
>> >> radio on
>> >>
>> >> > MediaForte ESS Maestro-based sound cards with integrated radio
>> (like
>> >> > SF64-PCE2-04). But it conflicts with snd_es1968, ALSA driver for
>> the
>> >>
>> >> sound
>> >>
>> >> > chip itself.
>> >> >
>> >> > If one driver is loaded, the other one does not work - because a
>> >>
>> >> driver is
>> >>
>> >> > already registered for the PCI device (there is only one). This was
>> >>
>> >> probably
>> >>
>> >> > broken by conversion of PCI probing in 2006:
>> >> > ttp://lkml.org/lkml/2005/12/31/93
>> >> >
>> >> > How to fix it properly? Include radio functionality in snd-es1968
>> and
>> >>
>> >> delete
>> >>
>> >> > radio-maestro?
>> >>
>> >> Interesting. I don't know anyone among the video4linux developers who
>> >> has
>> >> this hardware, so the radio-maestro driver hasn't been tested in at
>> >> least
>> >> 6 or 7 years.
>> >>
>> >> The proper fix would be to do it like the fm801.c alsa driver does:
>> have
>> >> the radio functionality as an i2c driver. In fact, it would not
>> surprise
>> >> me at all if you could use the tea575x-tuner.c driver (in
>> >> sound/i2c/other)
>> >> for the es1968 and delete the radio-maestro altogether.
>> >
>> > I guess simply porting radio-maestro codes into snd-es1968 would work
>> > without much hustles, and it's a bit safe way to go for now; smaller
>> > changes have less chance for breakage, and as little people seem using
>> > this driver, it'd be better to take a safer option, IMO.
>>
>> I assume someone has hardware since someone reported this breakage. So
>> try
>> to use tuner-tea575x for the es1968. It shouldn't be too difficult.
>> Additional cleanup should probably wait until we find a tester for the
>> fm801 as well.
>
> I have the hardware - both ES1968 (SF64-PCE2-04) and FM801 cards
> (SF64-PCR)
> with these tuners. I remember fixing mute in tea5757x-tuner back in 2009
> (testing it on SF64-PCR).
>
>> I don't like the idea to duplicate code.
>
> I don't like that either. I've done a quick hack - copied radio support
> from
> fm801 and radio_bits_get() and radio_bits_set() from radio-maestro to
> es1968
> and it seems to basically work.
> Now I just need some more time to finish it, then move everything good
> from
> radio-maestro to tea575x-tuner and delete radio-maestro.

Great! Let me know if you have any v4l-related questions!

>
> IIRC, the TEA5757 tuner is also present on at least one ISA radio card -
> SF16-FMR2 (which I also have).

Interesting. I have a bunch of isa radio cards myself and I am planning a
major cleanup of those isa drivers. I might get back to you for testing.

Regards,

Hans

>
> --
> Ondrej Zary
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Hans Verkuil - video4linux developer - sponsored by Cisco

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [alsa-devel] radio-maestro broken (conflicts with snd-es1968)

2011-03-14 Thread Takashi Iwai
At Mon, 14 Mar 2011 11:28:01 +0100,
Ondrej Zary wrote:
> 
> On Monday 14 March 2011, Hans Verkuil wrote:
> > > At Sat, 12 Mar 2011 19:52:39 +0100,
> > >
> > > Hans Verkuil wrote:
> > >> On Saturday, March 12, 2011 19:19:00 Ondrej Zary wrote:
> > >> > Hello,
> > >> > the radio-maestro driver is badly broken. It's intended to drive the
> > >>
> > >> radio on
> > >>
> > >> > MediaForte ESS Maestro-based sound cards with integrated radio (like
> > >> > SF64-PCE2-04). But it conflicts with snd_es1968, ALSA driver for the
> > >>
> > >> sound
> > >>
> > >> > chip itself.
> > >> >
> > >> > If one driver is loaded, the other one does not work - because a
> > >>
> > >> driver is
> > >>
> > >> > already registered for the PCI device (there is only one). This was
> > >>
> > >> probably
> > >>
> > >> > broken by conversion of PCI probing in 2006:
> > >> > ttp://lkml.org/lkml/2005/12/31/93
> > >> >
> > >> > How to fix it properly? Include radio functionality in snd-es1968 and
> > >>
> > >> delete
> > >>
> > >> > radio-maestro?
> > >>
> > >> Interesting. I don't know anyone among the video4linux developers who
> > >> has
> > >> this hardware, so the radio-maestro driver hasn't been tested in at
> > >> least
> > >> 6 or 7 years.
> > >>
> > >> The proper fix would be to do it like the fm801.c alsa driver does: have
> > >> the radio functionality as an i2c driver. In fact, it would not surprise
> > >> me at all if you could use the tea575x-tuner.c driver (in
> > >> sound/i2c/other)
> > >> for the es1968 and delete the radio-maestro altogether.
> > >
> > > I guess simply porting radio-maestro codes into snd-es1968 would work
> > > without much hustles, and it's a bit safe way to go for now; smaller
> > > changes have less chance for breakage, and as little people seem using
> > > this driver, it'd be better to take a safer option, IMO.
> >
> > I assume someone has hardware since someone reported this breakage. So try
> > to use tuner-tea575x for the es1968. It shouldn't be too difficult.
> > Additional cleanup should probably wait until we find a tester for the
> > fm801 as well.
> 
> I have the hardware - both ES1968 (SF64-PCE2-04) and FM801 cards (SF64-PCR) 
> with these tuners. I remember fixing mute in tea5757x-tuner back in 2009 
> (testing it on SF64-PCR).
> 
> > I don't like the idea to duplicate code.
> 
> I don't like that either. I've done a quick hack - copied radio support from 
> fm801 and radio_bits_get() and radio_bits_set() from radio-maestro to es1968 
> and it seems to basically work.
> Now I just need some more time to finish it, then move everything good from 
> radio-maestro to tea575x-tuner and delete radio-maestro.

Great!


Takashi
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [alsa-devel] radio-maestro broken (conflicts with snd-es1968)

2011-03-14 Thread Ondrej Zary
On Monday 14 March 2011, Hans Verkuil wrote:
> > At Sat, 12 Mar 2011 19:52:39 +0100,
> >
> > Hans Verkuil wrote:
> >> On Saturday, March 12, 2011 19:19:00 Ondrej Zary wrote:
> >> > Hello,
> >> > the radio-maestro driver is badly broken. It's intended to drive the
> >>
> >> radio on
> >>
> >> > MediaForte ESS Maestro-based sound cards with integrated radio (like
> >> > SF64-PCE2-04). But it conflicts with snd_es1968, ALSA driver for the
> >>
> >> sound
> >>
> >> > chip itself.
> >> >
> >> > If one driver is loaded, the other one does not work - because a
> >>
> >> driver is
> >>
> >> > already registered for the PCI device (there is only one). This was
> >>
> >> probably
> >>
> >> > broken by conversion of PCI probing in 2006:
> >> > ttp://lkml.org/lkml/2005/12/31/93
> >> >
> >> > How to fix it properly? Include radio functionality in snd-es1968 and
> >>
> >> delete
> >>
> >> > radio-maestro?
> >>
> >> Interesting. I don't know anyone among the video4linux developers who
> >> has
> >> this hardware, so the radio-maestro driver hasn't been tested in at
> >> least
> >> 6 or 7 years.
> >>
> >> The proper fix would be to do it like the fm801.c alsa driver does: have
> >> the radio functionality as an i2c driver. In fact, it would not surprise
> >> me at all if you could use the tea575x-tuner.c driver (in
> >> sound/i2c/other)
> >> for the es1968 and delete the radio-maestro altogether.
> >
> > I guess simply porting radio-maestro codes into snd-es1968 would work
> > without much hustles, and it's a bit safe way to go for now; smaller
> > changes have less chance for breakage, and as little people seem using
> > this driver, it'd be better to take a safer option, IMO.
>
> I assume someone has hardware since someone reported this breakage. So try
> to use tuner-tea575x for the es1968. It shouldn't be too difficult.
> Additional cleanup should probably wait until we find a tester for the
> fm801 as well.

I have the hardware - both ES1968 (SF64-PCE2-04) and FM801 cards (SF64-PCR) 
with these tuners. I remember fixing mute in tea5757x-tuner back in 2009 
(testing it on SF64-PCR).

> I don't like the idea to duplicate code.

I don't like that either. I've done a quick hack - copied radio support from 
fm801 and radio_bits_get() and radio_bits_set() from radio-maestro to es1968 
and it seems to basically work.
Now I just need some more time to finish it, then move everything good from 
radio-maestro to tea575x-tuner and delete radio-maestro.

IIRC, the TEA5757 tuner is also present on at least one ISA radio card - 
SF16-FMR2 (which I also have).

-- 
Ondrej Zary
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [alsa-devel] radio-maestro broken (conflicts with snd-es1968)

2011-03-14 Thread Takashi Iwai
At Mon, 14 Mar 2011 10:59:47 +0100,
Hans Verkuil wrote:
> 
> > At Sat, 12 Mar 2011 19:52:39 +0100,
> > Hans Verkuil wrote:
> >>
> >> On Saturday, March 12, 2011 19:19:00 Ondrej Zary wrote:
> >> > Hello,
> >> > the radio-maestro driver is badly broken. It's intended to drive the
> >> radio on
> >> > MediaForte ESS Maestro-based sound cards with integrated radio (like
> >> > SF64-PCE2-04). But it conflicts with snd_es1968, ALSA driver for the
> >> sound
> >> > chip itself.
> >> >
> >> > If one driver is loaded, the other one does not work - because a
> >> driver is
> >> > already registered for the PCI device (there is only one). This was
> >> probably
> >> > broken by conversion of PCI probing in 2006:
> >> > ttp://lkml.org/lkml/2005/12/31/93
> >> >
> >> > How to fix it properly? Include radio functionality in snd-es1968 and
> >> delete
> >> > radio-maestro?
> >>
> >> Interesting. I don't know anyone among the video4linux developers who
> >> has
> >> this hardware, so the radio-maestro driver hasn't been tested in at
> >> least
> >> 6 or 7 years.
> >>
> >> The proper fix would be to do it like the fm801.c alsa driver does: have
> >> the radio functionality as an i2c driver. In fact, it would not surprise
> >> me at all if you could use the tea575x-tuner.c driver (in
> >> sound/i2c/other)
> >> for the es1968 and delete the radio-maestro altogether.
> >
> > I guess simply porting radio-maestro codes into snd-es1968 would work
> > without much hustles, and it's a bit safe way to go for now; smaller
> > changes have less chance for breakage, and as little people seem using
> > this driver, it'd be better to take a safer option, IMO.
> 
> I assume someone has hardware since someone reported this breakage. So try
> to use tuner-tea575x for the es1968. It shouldn't be too difficult.

We can try at least, yes...

> Additional cleanup should probably wait until we find a tester for the
> fm801 as well.

My concern is that having both testers might be not easy, if we need
to change something in tea575-tuner side.
(We have already the same code, so porting it doesn't increase the code
 size :)  Anyway I agree to unify in a long term.  Let's see whether
tea-575x works as is.


thanks,

Takashi

> I don't like the idea to duplicate code.
> 
> Regards,
> 
>   Hans
> 
> > If we have active testers for both devices, it's nicer to go forward
> > to clean-up works indeed, though.
> >
> >
> > thanks,
> >
> > Takashi
> >
> >> Both are for the tea575x tuner, although radio-maestro seems to have
> >> better
> >> support for the g_tuner operation. It doesn't seem difficult to add that
> >> to
> >> tea575x-tuner.c.
> >>
> >> The fm801 code for driving the tea575x is pretty horrible and it should
> >> be
> >> possible to improve that. I suspect that those read/write/mute functions
> >> really belong in tea575x-tuner.c and that only the low-level gpio
> >> actions
> >> need to be in the fm801/es1968 drivers.
> >>
> >> Hope this helps.
> >>
> >> Regards,
> >>
> >>Hans
> >>
> >> BTW: if anyone has spare hardware for testing the
> >> radio-maestro/tea575x-tuner,
> >> then I'm interested.
> >>
> >> --
> >> Hans Verkuil - video4linux developer - sponsored by Cisco
> >> ___
> >> Alsa-devel mailing list
> >> alsa-de...@alsa-project.org
> >> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> >>
> >
> 
> 
> -- 
> Hans Verkuil - video4linux developer - sponsored by Cisco
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [alsa-devel] radio-maestro broken (conflicts with snd-es1968)

2011-03-14 Thread Hans Verkuil
> At Sat, 12 Mar 2011 19:52:39 +0100,
> Hans Verkuil wrote:
>>
>> On Saturday, March 12, 2011 19:19:00 Ondrej Zary wrote:
>> > Hello,
>> > the radio-maestro driver is badly broken. It's intended to drive the
>> radio on
>> > MediaForte ESS Maestro-based sound cards with integrated radio (like
>> > SF64-PCE2-04). But it conflicts with snd_es1968, ALSA driver for the
>> sound
>> > chip itself.
>> >
>> > If one driver is loaded, the other one does not work - because a
>> driver is
>> > already registered for the PCI device (there is only one). This was
>> probably
>> > broken by conversion of PCI probing in 2006:
>> > ttp://lkml.org/lkml/2005/12/31/93
>> >
>> > How to fix it properly? Include radio functionality in snd-es1968 and
>> delete
>> > radio-maestro?
>>
>> Interesting. I don't know anyone among the video4linux developers who
>> has
>> this hardware, so the radio-maestro driver hasn't been tested in at
>> least
>> 6 or 7 years.
>>
>> The proper fix would be to do it like the fm801.c alsa driver does: have
>> the radio functionality as an i2c driver. In fact, it would not surprise
>> me at all if you could use the tea575x-tuner.c driver (in
>> sound/i2c/other)
>> for the es1968 and delete the radio-maestro altogether.
>
> I guess simply porting radio-maestro codes into snd-es1968 would work
> without much hustles, and it's a bit safe way to go for now; smaller
> changes have less chance for breakage, and as little people seem using
> this driver, it'd be better to take a safer option, IMO.

I assume someone has hardware since someone reported this breakage. So try
to use tuner-tea575x for the es1968. It shouldn't be too difficult.
Additional cleanup should probably wait until we find a tester for the
fm801 as well.

I don't like the idea to duplicate code.

Regards,

  Hans

> If we have active testers for both devices, it's nicer to go forward
> to clean-up works indeed, though.
>
>
> thanks,
>
> Takashi
>
>> Both are for the tea575x tuner, although radio-maestro seems to have
>> better
>> support for the g_tuner operation. It doesn't seem difficult to add that
>> to
>> tea575x-tuner.c.
>>
>> The fm801 code for driving the tea575x is pretty horrible and it should
>> be
>> possible to improve that. I suspect that those read/write/mute functions
>> really belong in tea575x-tuner.c and that only the low-level gpio
>> actions
>> need to be in the fm801/es1968 drivers.
>>
>> Hope this helps.
>>
>> Regards,
>>
>>  Hans
>>
>> BTW: if anyone has spare hardware for testing the
>> radio-maestro/tea575x-tuner,
>> then I'm interested.
>>
>> --
>> Hans Verkuil - video4linux developer - sponsored by Cisco
>> ___
>> Alsa-devel mailing list
>> alsa-de...@alsa-project.org
>> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>>
>


-- 
Hans Verkuil - video4linux developer - sponsored by Cisco

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [alsa-devel] radio-maestro broken (conflicts with snd-es1968)

2011-03-14 Thread Takashi Iwai
At Sat, 12 Mar 2011 19:52:39 +0100,
Hans Verkuil wrote:
> 
> On Saturday, March 12, 2011 19:19:00 Ondrej Zary wrote:
> > Hello,
> > the radio-maestro driver is badly broken. It's intended to drive the radio 
> > on 
> > MediaForte ESS Maestro-based sound cards with integrated radio (like 
> > SF64-PCE2-04). But it conflicts with snd_es1968, ALSA driver for the sound 
> > chip itself.
> > 
> > If one driver is loaded, the other one does not work - because a driver is 
> > already registered for the PCI device (there is only one). This was 
> > probably 
> > broken by conversion of PCI probing in 2006: 
> > ttp://lkml.org/lkml/2005/12/31/93
> > 
> > How to fix it properly? Include radio functionality in snd-es1968 and 
> > delete 
> > radio-maestro?
> 
> Interesting. I don't know anyone among the video4linux developers who has
> this hardware, so the radio-maestro driver hasn't been tested in at least
> 6 or 7 years.
> 
> The proper fix would be to do it like the fm801.c alsa driver does: have
> the radio functionality as an i2c driver. In fact, it would not surprise
> me at all if you could use the tea575x-tuner.c driver (in sound/i2c/other)
> for the es1968 and delete the radio-maestro altogether.

I guess simply porting radio-maestro codes into snd-es1968 would work
without much hustles, and it's a bit safe way to go for now; smaller
changes have less chance for breakage, and as little people seem using
this driver, it'd be better to take a safer option, IMO.

If we have active testers for both devices, it's nicer to go forward
to clean-up works indeed, though.


thanks,

Takashi

> Both are for the tea575x tuner, although radio-maestro seems to have better
> support for the g_tuner operation. It doesn't seem difficult to add that to
> tea575x-tuner.c.
> 
> The fm801 code for driving the tea575x is pretty horrible and it should be
> possible to improve that. I suspect that those read/write/mute functions
> really belong in tea575x-tuner.c and that only the low-level gpio actions
> need to be in the fm801/es1968 drivers.
> 
> Hope this helps.
> 
> Regards,
> 
>   Hans
> 
> BTW: if anyone has spare hardware for testing the radio-maestro/tea575x-tuner,
> then I'm interested.
> 
> -- 
> Hans Verkuil - video4linux developer - sponsored by Cisco
> ___
> Alsa-devel mailing list
> alsa-de...@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [alsa-devel] radio-maestro broken (conflicts with snd-es1968)

2011-03-14 Thread Takashi Iwai
At Sat, 12 Mar 2011 19:19:00 +0100,
Ondrej Zary wrote:
> 
> Hello,
> the radio-maestro driver is badly broken. It's intended to drive the radio on 
> MediaForte ESS Maestro-based sound cards with integrated radio (like 
> SF64-PCE2-04). But it conflicts with snd_es1968, ALSA driver for the sound 
> chip itself.
> 
> If one driver is loaded, the other one does not work - because a driver is 
> already registered for the PCI device (there is only one). This was probably 
> broken by conversion of PCI probing in 2006: 
> ttp://lkml.org/lkml/2005/12/31/93
> 
> How to fix it properly? Include radio functionality in snd-es1968 and delete 
> radio-maestro?

Yes.


Takashi
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html