<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Oct 16, 2013 at 6:23 PM, Stephen Worthington <span dir="ltr">&lt;<a href="mailto:stephen_agent@jsw.gen.nz" target="_blank">stephen_agent@jsw.gen.nz</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, 16 Oct 2013 14:45:12 -0700, you wrote:<br>
<br>
&gt;On Wed, Oct 16, 2013 at 12:46 PM, Rajil Saraswat &lt;<a href="mailto:rajil.s@gmail.com">rajil.s@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; &gt;&gt; Yes, your deduction is correct. The main card works fine in 3.10.7, it<br>
&gt;&gt; is<br>
&gt;&gt; &gt;&gt; only the daughter card which is broken.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Have you done a git bisect to determine which commit caused the breakage?<br>
&gt;&gt; &gt; That would be helpful to the developers, I&#39;m sure, so they could find the<br>
&gt;&gt; &gt; cause more easily.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Karl<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt; The results of the git bisect are here<br>
&gt;&gt; <a href="http://www.spinics.net/lists/linux-media/msg68963.html" target="_blank">http://www.spinics.net/lists/linux-media/msg68963.html</a><br>
&gt;&gt;<br>
&gt;&gt; wm8775 seems to be the culprit.<br>
&gt;&gt;<br>
&gt;<br>
&gt;Glad you found it. Thanks for taking that time. Now I hope they can fix it.<br>
&gt;Maybe the fix will also solve the occasional problem I have with minor<br>
&gt;audio distortion on my PVR-500 using the on-bracket composite input (it<br>
&gt;sounds tinny and slightly scratchy).<br>
&gt;<br>
&gt;Thanks,<br>
&gt;<br>
&gt;Karl<br>
<br>
Your PVR-500 audio problem is likely the same as mine - the drivers<br>
seem to have a bug that causes audio to be mixed in from other inputs.<br>
I have a script that works around the problem, both for recording FM<br>
radio for my mother with her PVR-150 and for me recording S-Video from<br>
my STB with my PVR-500.<br>
<br>
This is the fix script for recording S-Video from my PVR-500<br>
(ivtv_audio_fix.sh):<br>
<br>
#!/bin/sh<br>
<br>
# Workaround for bug which causes audio distortion on some recordings.<br>
# From <a href="http://urlgrey.net/?p=231" target="_blank">http://urlgrey.net/?p=231</a><br>
<br>
sleep 3<br>
<br>
if [ $# -eq 0 ]; then<br>
    device=/dev/video0<br>
else<br>
    device=$1<br>
fi<br>
<br>
# First, set the audio input in turn to each of the unwanted audio<br>
inputs.<br>
# This only became necessary as of Mythbuntu 12.04.<br>
v4l2-ctl -d$device --set-audio-input=2<br>
v4l2-ctl -d$device --set-audio-input=0<br>
<br>
# Next, also set the tuner frequency.  This also seems to be necessary<br>
# since Mythbuntu 12.04 to suppress a slightly different audio<br>
distortion.<br>
# The frequency should be for an unused part of the spectrum, as the<br>
unwanted<br>
# audio is coming from whatever the TV tuner is tuned to.<br>
v4l2-ctl -f 420<br>
<br>
# Reset the audio input to source 1 (the wanted input).<br>
v4l2-ctl -d$device --set-audio-input=1<br>
<br>
<br>
And this fixed FM recording from my mother&#39;s PVR-150:<br>
<br>
#!/bin/sh<br>
<br>
# Workaround for bug which causes audio distortion on some recordings.<br>
# From <a href="http://urlgrey.net/?p=231" target="_blank">http://urlgrey.net/?p=231</a><br>
<br>
sleep 3<br>
<br>
if [ $# -eq 0 ]; then<br>
    device=/dev/video0<br>
else<br>
    device=$1<br>
fi<br>
<br>
# First, set the audio input in turn to each of the unwanted audio<br>
inputs.<br>
# This only became necessary as of Mythbuntu 12.04.<br>
v4l2-ctl -d$device --set-audio-input=2<br>
v4l2-ctl -d$device --set-audio-input=0<br>
<br>
# Next, also set the tuner frequency.  This also seems to be necessary<br>
# since Mythbuntu 12.04 to suppress a slightly different audio<br>
distortion.<br>
# The frequency should be for an unused part of the spectrum, as the<br>
unwanted<br>
# audio is coming from whatever the TV tuner is tuned to.<br>
# DO NOT DO THIS FOR RADIO RECORDINGS<br>
#v4l2-ctl -f 420<br>
<br>
# Reset the audio input to source 1 (the wanted input).<br>
v4l2-ctl -d$device --set-audio-input=1<br>
<br>
The fix script should be called from the channel change script.  Use &amp;<br>
to make it run in parallel with the channel change script, after the<br>
channel has been changed.  Here is my channel change script for using<br>
my PVR-500 with my STB:<br>
<br>
#!/bin/sh<br>
<br>
REMOTE_NAME=Pace_RC-30<br>
cmd=&quot;$1&quot;<br>
<br>
# If things work OK with sleep 1, try this for faster channel changes:<br>
# sleep 0.3<br>
sleep_amt=1.0<br>
<br>
# See if this helps with missing digits at the start of a channel<br>
change.<br>
sleep 1.0<br>
<br>
#echo Change channel: $cmd &gt;&gt;/tmp/irsend.txt<br>
<br>
case $cmd in<br>
    [0-9]*)<br>
    # make sure we unmute by hitting vol up<br>
    #/usr/bin/irsend SEND_ONCE $REMOTE_NAME Vol+<br>
    #sleep $sleep_amt<br>
    for digit in $(echo $1 | sed -e &#39;s/./&amp; /g&#39;); do<br>
            #echo irsend SEND_ONCE $REMOTE_NAME $digit<br>
&gt;&gt;/tmp/irsend.txt<br>
        /usr/bin/irsend SEND_ONCE $REMOTE_NAME $digit<br>
        sleep $sleep_amt<br>
    done<br>
    ;;<br>
<br>
    *)<br>
        /usr/bin/irsend SEND_ONCE $REMOTE_NAME $cmd<br>
        ;;<br>
esac<br>
<br>
<br>
# Workaround for bug which causes audio distortion on some recordings.<br>
/usr/local/bin/ivtv_audio_fix.sh $video &amp;<br></blockquote><div><br></div><div>Interesting. Thanks for the script; I&#39;ll try it out. Do you know if this bug has been reported upstream? One question--You are passing $video to the ivtv_audio_fix.sh script, but I where does it get set in the channel change script?<br>

<br></div><div>Karl<br></div></div></div></div>