<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Oct 16, 2013 at 10:48 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">On Wed, 16 Oct 2013 21:35:25 -0700, you wrote:<br>
<br>
&gt;On Wed, Oct 16, 2013 at 6:23 PM, Stephen Worthington &lt;<br>
&gt;<a href="mailto:stephen_agent@jsw.gen.nz">stephen_agent@jsw.gen.nz</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; On Wed, 16 Oct 2013 14:45:12 -0700, you wrote:<br>
&gt;&gt;<br>
&gt;&gt; &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;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; Yes, your deduction is correct. The main card works fine in 3.10.7,<br>
&gt;&gt; it<br>
&gt;&gt; &gt;&gt; is<br>
&gt;&gt; &gt;&gt; &gt;&gt; only the daughter card which is broken.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Have you done a git bisect to determine which commit caused the<br>
&gt;&gt; breakage?<br>
&gt;&gt; &gt;&gt; &gt; That would be helpful to the developers, I&#39;m sure, so they could find<br>
&gt;&gt; the<br>
&gt;&gt; &gt;&gt; &gt; cause more easily.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Karl<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; The results of the git bisect are here<br>
&gt;&gt; &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; &gt;&gt;<br>
&gt;&gt; &gt;&gt; wm8775 seems to be the culprit.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;Glad you found it. Thanks for taking that time. Now I hope they can fix<br>
&gt;&gt; it.<br>
&gt;&gt; &gt;Maybe the fix will also solve the occasional problem I have with minor<br>
&gt;&gt; &gt;audio distortion on my PVR-500 using the on-bracket composite input (it<br>
&gt;&gt; &gt;sounds tinny and slightly scratchy).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;Thanks,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;Karl<br>
&gt;&gt;<br>
&gt;&gt; Your PVR-500 audio problem is likely the same as mine - the drivers<br>
&gt;&gt; seem to have a bug that causes audio to be mixed in from other inputs.<br>
&gt;&gt; I have a script that works around the problem, both for recording FM<br>
&gt;&gt; radio for my mother with her PVR-150 and for me recording S-Video from<br>
&gt;&gt; my STB with my PVR-500.<br>
&gt;&gt;<br>
&gt;&gt; This is the fix script for recording S-Video from my PVR-500<br>
&gt;&gt; (ivtv_audio_fix.sh):<br>
&gt;&gt;<br>
&gt;&gt; #!/bin/sh<br>
&gt;&gt;<br>
&gt;&gt; # Workaround for bug which causes audio distortion on some recordings.<br>
&gt;&gt; # From <a href="http://urlgrey.net/?p=231" target="_blank">http://urlgrey.net/?p=231</a><br>
&gt;&gt;<br>
&gt;&gt; sleep 3<br>
&gt;&gt;<br>
&gt;&gt; if [ $# -eq 0 ]; then<br>
&gt;&gt;     device=/dev/video0<br>
&gt;&gt; else<br>
&gt;&gt;     device=$1<br>
&gt;&gt; fi<br>
&gt;&gt;<br>
&gt;&gt; # First, set the audio input in turn to each of the unwanted audio<br>
&gt;&gt; inputs.<br>
&gt;&gt; # This only became necessary as of Mythbuntu 12.04.<br>
&gt;&gt; v4l2-ctl -d$device --set-audio-input=2<br>
&gt;&gt; v4l2-ctl -d$device --set-audio-input=0<br>
&gt;&gt;<br>
&gt;&gt; # Next, also set the tuner frequency.  This also seems to be necessary<br>
&gt;&gt; # since Mythbuntu 12.04 to suppress a slightly different audio<br>
&gt;&gt; distortion.<br>
&gt;&gt; # The frequency should be for an unused part of the spectrum, as the<br>
&gt;&gt; unwanted<br>
&gt;&gt; # audio is coming from whatever the TV tuner is tuned to.<br>
&gt;&gt; v4l2-ctl -f 420<br>
&gt;&gt;<br>
&gt;&gt; # Reset the audio input to source 1 (the wanted input).<br>
&gt;&gt; v4l2-ctl -d$device --set-audio-input=1<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; And this fixed FM recording from my mother&#39;s PVR-150:<br>
&gt;&gt;<br>
&gt;&gt; #!/bin/sh<br>
&gt;&gt;<br>
&gt;&gt; # Workaround for bug which causes audio distortion on some recordings.<br>
&gt;&gt; # From <a href="http://urlgrey.net/?p=231" target="_blank">http://urlgrey.net/?p=231</a><br>
&gt;&gt;<br>
&gt;&gt; sleep 3<br>
&gt;&gt;<br>
&gt;&gt; if [ $# -eq 0 ]; then<br>
&gt;&gt;     device=/dev/video0<br>
&gt;&gt; else<br>
&gt;&gt;     device=$1<br>
&gt;&gt; fi<br>
&gt;&gt;<br>
&gt;&gt; # First, set the audio input in turn to each of the unwanted audio<br>
&gt;&gt; inputs.<br>
&gt;&gt; # This only became necessary as of Mythbuntu 12.04.<br>
&gt;&gt; v4l2-ctl -d$device --set-audio-input=2<br>
&gt;&gt; v4l2-ctl -d$device --set-audio-input=0<br>
&gt;&gt;<br>
&gt;&gt; # Next, also set the tuner frequency.  This also seems to be necessary<br>
&gt;&gt; # since Mythbuntu 12.04 to suppress a slightly different audio<br>
&gt;&gt; distortion.<br>
&gt;&gt; # The frequency should be for an unused part of the spectrum, as the<br>
&gt;&gt; unwanted<br>
&gt;&gt; # audio is coming from whatever the TV tuner is tuned to.<br>
&gt;&gt; # DO NOT DO THIS FOR RADIO RECORDINGS<br>
&gt;&gt; #v4l2-ctl -f 420<br>
&gt;&gt;<br>
&gt;&gt; # Reset the audio input to source 1 (the wanted input).<br>
&gt;&gt; v4l2-ctl -d$device --set-audio-input=1<br>
&gt;&gt;<br>
&gt;&gt; The fix script should be called from the channel change script.  Use &amp;<br>
&gt;&gt; to make it run in parallel with the channel change script, after the<br>
&gt;&gt; channel has been changed.  Here is my channel change script for using<br>
&gt;&gt; my PVR-500 with my STB:<br>
&gt;&gt;<br>
&gt;&gt; #!/bin/sh<br>
&gt;&gt;<br>
&gt;&gt; REMOTE_NAME=Pace_RC-30<br>
&gt;&gt; cmd=&quot;$1&quot;<br>
&gt;&gt;<br>
&gt;&gt; # If things work OK with sleep 1, try this for faster channel changes:<br>
&gt;&gt; # sleep 0.3<br>
&gt;&gt; sleep_amt=1.0<br>
&gt;&gt;<br>
&gt;&gt; # See if this helps with missing digits at the start of a channel<br>
&gt;&gt; change.<br>
&gt;&gt; sleep 1.0<br>
&gt;&gt;<br>
&gt;&gt; #echo Change channel: $cmd &gt;&gt;/tmp/irsend.txt<br>
&gt;&gt;<br>
&gt;&gt; case $cmd in<br>
&gt;&gt;     [0-9]*)<br>
&gt;&gt;     # make sure we unmute by hitting vol up<br>
&gt;&gt;     #/usr/bin/irsend SEND_ONCE $REMOTE_NAME Vol+<br>
&gt;&gt;     #sleep $sleep_amt<br>
&gt;&gt;     for digit in $(echo $1 | sed -e &#39;s/./&amp; /g&#39;); do<br>
&gt;&gt;             #echo irsend SEND_ONCE $REMOTE_NAME $digit<br>
&gt;&gt; &gt;&gt;/tmp/irsend.txt<br>
&gt;&gt;         /usr/bin/irsend SEND_ONCE $REMOTE_NAME $digit<br>
&gt;&gt;         sleep $sleep_amt<br>
&gt;&gt;     done<br>
&gt;&gt;     ;;<br>
&gt;&gt;<br>
&gt;&gt;     *)<br>
&gt;&gt;         /usr/bin/irsend SEND_ONCE $REMOTE_NAME $cmd<br>
&gt;&gt;         ;;<br>
&gt;&gt; esac<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; # Workaround for bug which causes audio distortion on some recordings.<br>
&gt;&gt; /usr/local/bin/ivtv_audio_fix.sh $video &amp;<br>
&gt;&gt;<br>
&gt;<br>
&gt;Interesting. Thanks for the script; I&#39;ll try it out. Do you know if this<br>
&gt;bug has been reported upstream?<br>
<br>
</div></div>I have not reported it, or even tried to find a report.  I would not<br>
know where to look, actually.<br>
<div class="im"><br></div></blockquote><div><br>I found this 5 year old thread (!!) which seems to be the same symptoms: <a href="http://www.mail-archive.com/ivtv-users@ivtvdriver.org/msg08058.html">http://www.mail-archive.com/ivtv-users@ivtvdriver.org/msg08058.html</a> It&#39;s a long thread and I haven&#39;t read through it completely yet, but obviously whatever fix there was (if any) didn&#39;t make it into the main codebase, at least not in the default configuration. If I find anything interesting after reading through the whole thing, I&#39;ll let you know.<br>

</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">
&gt;One question--You are passing $video to the<br>
&gt;ivtv_audio_fix.sh script, but I where does it get set in the channel change<br>
&gt;script?<br>
<br>
</div>Looks like I did not test that - $video is not set and will be<br>
defaulting to empty, so ivtv_audio_fix.sh will be defaulting to<br>
/dev/video0.  So no harm done, but it is a bug.  It was quite a while<br>
ago that I did this, but I think it will be a cut &amp; paste bug - I will<br>
have copied that line from another script I was using for testing.<br>
<br></blockquote></div><br></div><div class="gmail_extra">Okay, thanks. I don&#39;t know if Myth can pass the input used to the channel change script (seems unlikely), but I have the problem on only one input (I believe) so I&#39;ll just put it in the channel change script for that particular cable box.<br>

<br></div><div class="gmail_extra">Thanks,<br><br></div><div class="gmail_extra">Karl<br></div></div>