[mythtv] audio channel

Isaac Richards mythtv-dev@snowman.net
Mon, 30 Sep 2002 23:30:10 -0400


On Monday 30 September 2002 07:22 pm, David Hunnisett wrote:
> After yet more hacking i still dont have working audio :(
> if i run ythtv after using xawtv to tune into a channel everything is
> fine until i change channel. After that i have the correct sound faintly
> and there is a lot of hissing over the top however Iwas wondering if there
> was any way to get mythtv to set the audio mode eg
<snip>
> hope fully i can then use this to fix the audio problem that i have ?

Really, as you said on IRC, the only other thing that xawtv does on a channel 
change is mute/unmute the tuner's audio..  You can do this by modifying 
channel.cpp, the if (currentcapchannel == 0) (line 159) to be:

        if (currentcapchannel == 0)
        {
            struct video_audio va;
            memset(&va, 0, sizeof(va));

            ioctl(videofd, VIDIOCGAUDIO, &va);

            va.flags |= VIDEO_AUDIO_MUTE;

            ioctl(videofd, VIDIOCSAUDIO, &va);

            int frequency = curList[i].freq * 16 / 1000;
            if (ioctl(videofd, VIDIOCSFREQ, &frequency) == -1)
                perror("channel set:");


            va.flags &= ~VIDEO_AUDIO_MUTE;
            ioctl(videofd, VIDIOCSAUDIO, &va);

            curchannel = i;
            return true;
        }

Help any?

Isaac