Mailing List Archive

audio channel
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
stero
mono
bass and treble controls etc.
from videodev.h
struct video_audio
{
int audio; /* Audio channel */
__u16 volume; /* If settable */
__u16 bass, treble;
__u32 flags;
#define VIDEO_AUDIO_MUTE 1
#define VIDEO_AUDIO_MUTABLE 2
#define VIDEO_AUDIO_VOLUME 4
#define VIDEO_AUDIO_BASS 8
#define VIDEO_AUDIO_TREBLE 16
char name[16];
#define VIDEO_SOUND_MONO 1
#define VIDEO_SOUND_STEREO 2
#define VIDEO_SOUND_LANG1 4
#define VIDEO_SOUND_LANG2 8
__u16 mode;
__u16 balance; /* Stereo * balance */
__u16 step; /* Step actual volume uses */
};
hope fully i can then use this to fix the audio problem that i have ?
Re: audio channel [ In reply to ]
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
Re: audio channel [ In reply to ]
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

The problem here was that he needed some finetuning for each channel. I
finished up adding support for this, so anyone else who has the same problem
should be all good now.. Currently, you'll need to manually set the
'finetuning' field in the channel table to what it needs to be -- should use
the same values as in xawtv.

Isaac