Mailing List Archive

Sony Kikyou card, front inputs and audio mute
Hello all,

[.I am not subscribed to ivtv-devel, please CC me on all replies,
thanks.]

I have a Sony Giga Pocket (kikyou) card, still in original
computer, and have been attempting to get it working properly in
linux. The basic card support in linux-2.6.34 was a good start,
but the front inputs didn't work, which led to more digging.

The card itself is a PCI device, and has coaxial, S-Video, and
composite inputs on the back. It has a cable leading to the
front of the case where there is another S-Video and set of
composite inputs. It also has a cable leading to the main board
of the computer.

After some assistance from awalls on #v4l, I managed to get the
front inputs working, and found an explanation for a stray
comment in the driver source.

My experimental setup is as follows:

linux-2.6.34-rc2, with ivtv built as a module.

A video game system connected to the rear composite input.

A different video game system connected to the front composite input.

The coaxial (tuner) input left disconnected.

mplayer, running as mplayer /dev/video32 -demuxer rawvideo -rawvideo
w=720:h=480:format=hm12:ntsc.

aplay, running as aplay -f dat < /dev/video24.

ivtv-ctl.

I don't have any S-Video equipment easily to hand, so was unable
to test the S-Video inputs.

At startup, sound and video are consistent with having tuned to
an empty frequency (snow and static, no signal). Running
ivtv-ctl -I shows that GPIO in is 0xdb20, GPIO dir is 0xc380 and
GPIO out is 0x320.

I next used ivtv-ctl -i to try different settings for "val", with
results as follows:

val=0x320, audio and video from tuner.
val=0x321, audio and video from tuner.
val=0x322, audio and video from tuner.
val=0x324, silence, and grey screen.
val=0x328, audio and video from tuner.
val=0x330, audio and video from tuner, audio "hiccups".
val=0x300, audio and video from rear composite input.
val=0x360, audio from tuner, video from front composite input.
val=0x340, audio and video from front composite input.
val=0x380, audio and video from rear composite input.
val=0x3a0, audio and video from tuner.
val=0x220, audio and video from tuner.
val=0x120, audio and video from tuner.
val=0x020, audio and video from tuner.
val=0x720, audio and video from tuner.

By this point, I figured that I had sufficient information in
that direction for now.

I next set val=0x340, to enable the front composite input, and
killed aplay, disabling sound output from ivtv via /dev/video24.

This is where the extra cable from the card to the mainboard
probably comes into play. I opened up alsamixer and started
going through anything that looked like a muted / zero-volume
audio input, and found that enabling and turning up the Aux input
restored sound from the capture card.

I next set val=0x140, and sound was muted again. Setting val=340
restored sound.

I next tried val=0x300, for audio and video from the rear
composite input, and val=0x100, which muted the audio again.

This last would explain the comment "/* 0x200? Disable for
now. */" in the 2.6.34-rc2 kernel sources for .gpio_audio_mute,
and the comment about the behavior of the sony windows software
when unmuting in the original driver commit.

I'm afraid I'm rather at a loss as to how to proceed from here,
beyond possibly another series of experiments to attempt to
discern mono/stereo audio input selection for the composite
inputs. With this information I can use the card for what I had
originally planned, but I don't know enough about how the ivtv
driver works to update it to have proper support for the front
input. I'm willing to test patches against the linux kernel
tree, or against whatever is upstream if someone can tell me how
to build upstream, or try to put together a patch myself if
someone can give me pointers as to where to start in making front
input selection work and what (if anything) to do about the, for
lack of a better term, "audio passthrough mute".

Thank you for your time, and thank you again, awalls, for your
assistance.

-- Alastair Bridgewater