<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"><<a href="mailto:stephen_agent@jsw.gen.nz" target="_blank">stephen_agent@jsw.gen.nz</a>></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>
>On Wed, Oct 16, 2013 at 6:23 PM, Stephen Worthington <<br>
><a href="mailto:stephen_agent@jsw.gen.nz">stephen_agent@jsw.gen.nz</a>> wrote:<br>
><br>
>> On Wed, 16 Oct 2013 14:45:12 -0700, you wrote:<br>
>><br>
>> >On Wed, Oct 16, 2013 at 12:46 PM, Rajil Saraswat <<a href="mailto:rajil.s@gmail.com">rajil.s@gmail.com</a>><br>
>> wrote:<br>
>> ><br>
>> >> >> Yes, your deduction is correct. The main card works fine in 3.10.7,<br>
>> it<br>
>> >> is<br>
>> >> >> only the daughter card which is broken.<br>
>> >> ><br>
>> >> > Have you done a git bisect to determine which commit caused the<br>
>> breakage?<br>
>> >> > That would be helpful to the developers, I'm sure, so they could find<br>
>> the<br>
>> >> > cause more easily.<br>
>> >> ><br>
>> >> > Karl<br>
>> >> ><br>
>> >><br>
>> >> The results of the git bisect are here<br>
>> >> <a href="http://www.spinics.net/lists/linux-media/msg68963.html" target="_blank">http://www.spinics.net/lists/linux-media/msg68963.html</a><br>
>> >><br>
>> >> wm8775 seems to be the culprit.<br>
>> >><br>
>> ><br>
>> >Glad you found it. Thanks for taking that time. Now I hope they can fix<br>
>> it.<br>
>> >Maybe the fix will also solve the occasional problem I have with minor<br>
>> >audio distortion on my PVR-500 using the on-bracket composite input (it<br>
>> >sounds tinny and slightly scratchy).<br>
>> ><br>
>> >Thanks,<br>
>> ><br>
>> >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'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 &<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="$1"<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 >>/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 's/./& /g'); do<br>
>> #echo irsend SEND_ONCE $REMOTE_NAME $digit<br>
>> >>/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 &<br>
>><br>
><br>
>Interesting. Thanks for the script; I'll try it out. Do you know if this<br>
>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's a long thread and I haven't read through it completely yet, but obviously whatever fix there was (if any) didn'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'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">
>One question--You are passing $video to the<br>
>ivtv_audio_fix.sh script, but I where does it get set in the channel change<br>
>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 & 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'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'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>