From: Andy Walls <awalls@md.metrocast.net>
To: Eric Sharkey <eric@lisaneric.org>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
Lawrence Rust <lawrence@softsystem.co.uk>,
auric <auric@aanet.com.au>, David Gesswein <djg@pdp8online.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
linux-media@vger.kernel.org, ivtv-users@ivtvdriver.org,
ivtv-devel@ivtvdriver.org
Subject: Re: [REGRESSION: wm8775, ivtv] Please revert commit fcb9757333df37cf4a7feccef7ef6f5300643864
Date: Mon, 03 Jan 2011 17:34:16 -0500 [thread overview]
Message-ID: <1294094056.10094.41.camel@morgan.silverblock.net> (raw)
In-Reply-To: <AANLkTimHh4aS-6cp-CsX68WVSF6U+k6gb2mBSwkhd1Xn@mail.gmail.com>
On Sun, 2011-01-02 at 23:00 -0500, Eric Sharkey wrote:
> On Fri, Dec 31, 2010 at 7:55 PM, Andy Walls <awalls@md.metrocast.net> wrote:
> > Mauro,
> >
> > Please revert at least the wm8775.c portion of commit
> > fcb9757333df37cf4a7feccef7ef6f5300643864:
> >
> > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fcb9757333df37cf4a7feccef7ef6f5300643864
> >
> > It completely trashes baseband line-in audio for PVR-150 cards, and
> > likely does the same for any other ivtv card that has a WM8775 chip.
>
> Confirmed. I manually rolled back most of the changes in that commit
> for wm8775.c, leaving all other files alone, and the audio is now
> working correctly for me. I haven't yet narrowed it down to exactly
> which changes in that file cause the problem. I'll try and do that
> tomorrow if I have time.
This might help then:
http://dl.ivtvdriver.org/datasheets/audio/WM8775.pdf
I don't have time to look, but I'm hoping it is just the initialization
in wm8775_probe().
Without both a PVR-150 card and a Nova-S-plus DVB-S with which to test
you are unlikely to get an initialization that works for both the Nova-S
Plus and PVR-150. Even if you did, such a configuration would be
"fragile" in that it will be hard to tweak in the future for one card
without breaking the other. (Code reuse doesn't work out too well for
setting up hardware parameters.)
The fix will probably have to use some context sensitive initialization
in wm8775_probe(): "Am I being called by ivtv for a PVR-150 or cx88 for
a Nova-S plus?"
Which probably means:
1. adding a ".s_config" method to the "wm8775_core_ops"
See:
http://git.linuxtv.org/media_tree.git?a=blob;f=Documentation/video4linux/v4l2-framework.txt;h=f22f35c271f38d34fda0c19d8942b536e2fc95d9;hb=staging/for_v2.6.38#l206
http://git.linuxtv.org/media_tree.git?a=blob;f=include/media/v4l2-subdev.h;h=b0316a7cf08d21f2ac68f1dc452894441948c155;hb=staging/for_v2.6.38#l109
http://git.linuxtv.org/media_tree.git?a=blob;f=include/media/v4l2-subdev.h;h=b0316a7cf08d21f2ac68f1dc452894441948c155;hb=staging/for_v2.6.38#l141
2. developing a "struct wm8775_platform_data" type that can be used to
indicate the needs for the Nova-S versus the PVR-150 and any other
legacy boards that use the wm8775 module
That structure should probably be defined here:
http://git.linuxtv.org/media_tree.git?a=blob;f=include/media/wm8775.h;h=a1c4d417dfa205e8d5c2cf1d4f9d6bbd7a6ec419;hb=staging/for_v2.6.38
3. writing the corresponding "wm8775_s_config" function in wm8775.c to
setup the WM8775 based on the arguments passed in the "platform_data".
Note that this function may get called at least once initially by the
v4l2 infrastructure with "irq" set to 0 and "platform_data" set to NULL.
See:
http://git.linuxtv.org/media_tree.git?a=blob;f=Documentation/video4linux/v4l2-framework.txt;h=f22f35c271f38d34fda0c19d8942b536e2fc95d9;hb=staging/for_v2.6.38#l399
4. Fixing the wm8775_probe() function to do something sensible, knowing
that the .s_config method may get called once by the infrastructure,
and/or once again by the cx88 driver or the ivtv driver.
5. Searching through the video drivers to see if any other drivers may
use the wm8775 module, and validating that your changes won't break
them.
All I see with a quick grep is cx88, ivtv, and pvrusb2
6. Testing with real hardware....
Regards,
Andy
next prev parent reply other threads:[~2011-01-03 22:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-01 0:55 [REGRESSION: wm8775, ivtv] Please revert commit fcb9757333df37cf4a7feccef7ef6f5300643864 Andy Walls
2011-01-03 4:00 ` Eric Sharkey
2011-01-03 22:34 ` Andy Walls [this message]
2011-01-04 7:10 ` Hans Verkuil
2011-01-04 13:09 ` Andy Walls
2011-01-08 12:09 ` Lawrence Rust
2011-01-08 14:22 ` Andy Walls
2011-01-08 18:45 ` Lawrence Rust
2011-01-10 12:39 ` Andy Walls
2011-01-10 12:56 ` Lawrence Rust
2011-01-10 13:24 ` Andy Walls
2011-02-01 15:49 ` Mauro Carvalho Chehab
2011-02-02 23:52 ` Andy Walls
2011-02-03 12:51 ` Lawrence Rust
2011-02-05 17:56 ` Lawrence Rust
2011-02-06 20:46 ` Andy Walls
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=1294094056.10094.41.camel@morgan.silverblock.net \
--to=awalls@md.metrocast.net \
--cc=auric@aanet.com.au \
--cc=djg@pdp8online.com \
--cc=eric@lisaneric.org \
--cc=hverkuil@xs4all.nl \
--cc=ivtv-devel@ivtvdriver.org \
--cc=ivtv-users@ivtvdriver.org \
--cc=lawrence@softsystem.co.uk \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox