2005-12-19 23:10:08

by Junichi Uekawa

[permalink] [raw]
Subject: [x86_64] linux 2.6.15-rc6 mplayer fails to record ALSA audio.




> The last version known to work: 2.6.14-rc5 (probably 2.6.15 works also)
>
> With 2.6.15-rc3 or so, with the following fix, bttv started functioning.
> > commit ed5297a94090d9a9f27b0ce1f9601ebe73561cff
> > tree 00d28144ae949b3f9d566279cb12be0c802f86e6
> > parent aa1a64ee12ae130706f3fc0007841ce9b0ddf9c2
> > author Hugh Dickins <[email protected]>
> > committer Linus Torvalds <[email protected]>
> > [PATCH] unpaged: get_user_pages VM_RESERVED
>
> However, mplayer doesn't want to read from ALSA input, and no sound is recorded.
>
> I'm trying to record video from /dev/video0, and audio from ALSA,0,0
> (which is ATIIXP card). Audio is physically routed from the video
> capture board to ATIIXP card.
>
> I'm attaching the encoding script I use, and strace output
> for 2.6.14-rc5 and 2.6.15-rc5.
>
> I'm using Debian sid, and this regression is killing me...
>
> If you know of good fix, or know of a reason of this breakage, I'm all
> ears.
>
> regards,
> junichi
> --
> dancer@{debian.org,netfort.gr.jp} Debian Project
>
>
> [2 encodetv.sh-strace <application/octet-stream (7bit)>]
> #!/bin/bash
> #interactive script to encode TV.
>
> if [[ $# != 3 ]]; then
> echo "encodetv [channel] [minutes] [output filename]"
> exit 0;
> fi
> echo "channel: $1"
> CHANNEL=$1
> echo "minutes: $2"
> MINUTES=$2
> echo "output filename: $3"
> OUTFILE=$3
>
> strace -f \
> mencoder tv://${CHANNEL} \
> -tv \
> driver=v4l2:\
> device=/dev/video0:\
> width=320:\
> height=240:\
> normid=6:\
> alsa:\
> amode=1:\
> adevice=ixp:\
> chanlist=japan-bcast:\
> forcechan=2:\
> -o "${OUTFILE}.avi" \
> -ovc lavc -lavcopts vcodec=mpeg4:vhq -oac mp3lame -lameopts br=128:cbr:mode=0 -endpos $(( 60 * $MINUTES ))
>



regards,
junichi
--
dancer@{debian.org,netfort.gr.jp} Debian Project


Attachments:
success.txt (2.50 kB)
fail.txt (2.02 kB)
Download all attachments

2006-01-14 07:33:23

by Junichi Uekawa

[permalink] [raw]
Subject: Re: [x86_64] linux 2.6.15-rc6 mplayer fails to record ALSA audio.

Hi,

With recent git tree I'm still experiencing the same problem that
audio isn't captured with mencoder.

$ uname -a
Linux dancer64 2.6.15dancer-ga4fc7ab1-dirty #1 Thu Jan 12 08:32:49 JST 2006 x86_64 GNU/Linux

last successful one was 2.6.14-rc5.


I've noticed that there is a v4l-info command, which dumps v4l2
information, and it seems to signify that v4l2 is giving a different
answer.

The following is a diff, which seems to signify that this difference
exists in the two versions:

- audioset : 1
+ audioset : 0

What caused this change and how to revert is a mystery, yet.



$ diff -u 261[45]/v4l-info
--- 2614/v4l-info 2006-01-14 16:22:58.000000000 +0900
+++ 2615/v4l-info 2006-01-14 16:19:00.000000000 +0900
@@ -25,7 +25,7 @@
framelines : 525
VIDIOC_ENUMSTD(2)
index : 2
- id : 0x7f0000 [SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L]
+ id : 0xff0000 [SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L,?ATSC_8_VSB]
name : "SECAM"
frameperiod.numerator : 1
frameperiod.denominator : 25
@@ -71,25 +71,25 @@
index : 0
name : "Television"
type : TUNER
- audioset : 1
+ audioset : 0
tuner : 0
- std : 0x7f3fff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L]
+ std : 0xff3fff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L,?ATSC_8_VSB]
status : 0x100 [NO_H_LOCK]
VIDIOC_ENUMINPUT(1)
index : 1
name : "Composite1"
type : CAMERA
- audioset : 1
+ audioset : 0
tuner : 0
- std : 0x7f3fff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L]
+ std : 0xff3fff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L,?ATSC_8_VSB]
status : 0x0 []
VIDIOC_ENUMINPUT(2)
index : 2
name : "S-Video"
type : CAMERA
- audioset : 1
+ audioset : 0
tuner : 0
- std : 0x7f3fff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L]
+ std : 0xff3fff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L,?ATSC_8_VSB]
status : 0x0 []

tuners
@@ -98,8 +98,8 @@
name : "Television"
type : ANALOG_TV
capability : 0x2 [NORM]
- rangelow : 0
- rangehigh : 4294967295
+ rangelow : 704
+ rangehigh : 15328
rxsubchans : 0x1 [MONO]
audmode : MONO
signal : 0
@@ -332,11 +332,11 @@
VIDIOC_G_FMT(VBI_CAPTURE)
type : VBI_CAPTURE
fmt.vbi.sampling_rate : 35468950
- fmt.vbi.offset : 244
+ fmt.vbi.offset : 128
fmt.vbi.samples_per_line: 2048
fmt.vbi.sample_format : 0x59455247 [GREY]
fmt.vbi.start[0] : 7
- fmt.vbi.start[1] : 319
+ fmt.vbi.start[1] : 320
fmt.vbi.count[0] : 16
fmt.vbi.count[1] : 16
fmt.vbi.flags : 0



full output of v4l-info:
### v4l2 device info [/dev/video0] ###
general info
VIDIOC_QUERYCAP
driver : "bttv"
card : "BT878 video (IODATA GV-BCTV5/PC"
bus_info : "PCI:0000:03:0b.0"
version : 0.9.16
capabilities : 0x5010015 [VIDEO_CAPTURE,VIDEO_OVERLAY,VBI_CAPTURE,TUNER,READWRITE,STREAMING]

standards
VIDIOC_ENUMSTD(0)
index : 0
id : 0xff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K]
name : "PAL"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(1)
index : 1
id : 0x1000 [NTSC_M]
name : "NTSC"
frameperiod.numerator : 1001
frameperiod.denominator : 30000
framelines : 525
VIDIOC_ENUMSTD(2)
index : 2
id : 0xff0000 [SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L,?ATSC_8_VSB]
name : "SECAM"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(3)
index : 3
id : 0x400 [PAL_Nc]
name : "PAL-Nc"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(4)
index : 4
id : 0x100 [PAL_M]
name : "PAL-M"
frameperiod.numerator : 1001
frameperiod.denominator : 30000
framelines : 525
VIDIOC_ENUMSTD(5)
index : 5
id : 0x200 [PAL_N]
name : "PAL-N"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(6)
index : 6
id : 0x2000 [NTSC_M_JP]
name : "NTSC-JP"
frameperiod.numerator : 1001
frameperiod.denominator : 30000
framelines : 525
VIDIOC_ENUMSTD(7)
index : 7
id : 0x800 [PAL_60]
name : "PAL-60"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625

inputs
VIDIOC_ENUMINPUT(0)
index : 0
name : "Television"
type : TUNER
audioset : 0
tuner : 0
std : 0xff3fff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L,?ATSC_8_VSB]
status : 0x100 [NO_H_LOCK]
VIDIOC_ENUMINPUT(1)
index : 1
name : "Composite1"
type : CAMERA
audioset : 0
tuner : 0
std : 0xff3fff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L,?ATSC_8_VSB]
status : 0x0 []
VIDIOC_ENUMINPUT(2)
index : 2
name : "S-Video"
type : CAMERA
audioset : 0
tuner : 0
std : 0xff3fff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L,?ATSC_8_VSB]
status : 0x0 []

tuners
VIDIOC_G_TUNER(0)
index : 0
name : "Television"
type : ANALOG_TV
capability : 0x2 [NORM]
rangelow : 704
rangehigh : 15328
rxsubchans : 0x1 [MONO]
audmode : MONO
signal : 0
afc : 0

video capture
VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
index : 0
type : VIDEO_CAPTURE
flags : 0
description : "8 bpp, gray"
pixelformat : 0x59455247 [GREY]
VIDIOC_ENUM_FMT(1,VIDEO_CAPTURE)
index : 1
type : VIDEO_CAPTURE
flags : 0
description : "8 bpp, dithered color"
pixelformat : 0x34324948 [HI24]
VIDIOC_ENUM_FMT(2,VIDEO_CAPTURE)
index : 2
type : VIDEO_CAPTURE
flags : 0
description : "15 bpp RGB, le"
pixelformat : 0x4f424752 [RGBO]
VIDIOC_ENUM_FMT(3,VIDEO_CAPTURE)
index : 3
type : VIDEO_CAPTURE
flags : 0
description : "15 bpp RGB, be"
pixelformat : 0x51424752 [RGBQ]
VIDIOC_ENUM_FMT(4,VIDEO_CAPTURE)
index : 4
type : VIDEO_CAPTURE
flags : 0
description : "16 bpp RGB, le"
pixelformat : 0x50424752 [RGBP]
VIDIOC_ENUM_FMT(5,VIDEO_CAPTURE)
index : 5
type : VIDEO_CAPTURE
flags : 0
description : "16 bpp RGB, be"
pixelformat : 0x52424752 [RGBR]
VIDIOC_ENUM_FMT(6,VIDEO_CAPTURE)
index : 6
type : VIDEO_CAPTURE
flags : 0
description : "24 bpp RGB, le"
pixelformat : 0x33524742 [BGR3]
VIDIOC_ENUM_FMT(7,VIDEO_CAPTURE)
index : 7
type : VIDEO_CAPTURE
flags : 0
description : "32 bpp RGB, le"
pixelformat : 0x34524742 [BGR4]
VIDIOC_ENUM_FMT(8,VIDEO_CAPTURE)
index : 8
type : VIDEO_CAPTURE
flags : 0
description : "32 bpp RGB, be"
pixelformat : 0x34424752 [RGB4]
VIDIOC_ENUM_FMT(9,VIDEO_CAPTURE)
index : 9
type : VIDEO_CAPTURE
flags : 0
description : "4:2:2, packed, YUYV"
pixelformat : 0x56595559 [YUYV]
VIDIOC_ENUM_FMT(10,VIDEO_CAPTURE)
index : 10
type : VIDEO_CAPTURE
flags : 0
description : "4:2:2, packed, YUYV"
pixelformat : 0x56595559 [YUYV]
VIDIOC_ENUM_FMT(11,VIDEO_CAPTURE)
index : 11
type : VIDEO_CAPTURE
flags : 0
description : "4:2:2, packed, UYVY"
pixelformat : 0x59565955 [UYVY]
VIDIOC_ENUM_FMT(12,VIDEO_CAPTURE)
index : 12
type : VIDEO_CAPTURE
flags : 0
description : "4:2:2, planar, Y-Cb-Cr"
pixelformat : 0x50323234 [422P]
VIDIOC_ENUM_FMT(13,VIDEO_CAPTURE)
index : 13
type : VIDEO_CAPTURE
flags : 0
description : "4:2:0, planar, Y-Cb-Cr"
pixelformat : 0x32315559 [YU12]
VIDIOC_ENUM_FMT(14,VIDEO_CAPTURE)
index : 14
type : VIDEO_CAPTURE
flags : 0
description : "4:2:0, planar, Y-Cr-Cb"
pixelformat : 0x32315659 [YV12]
VIDIOC_ENUM_FMT(15,VIDEO_CAPTURE)
index : 15
type : VIDEO_CAPTURE
flags : 0
description : "4:1:1, planar, Y-Cb-Cr"
pixelformat : 0x50313134 [411P]
VIDIOC_ENUM_FMT(16,VIDEO_CAPTURE)
index : 16
type : VIDEO_CAPTURE
flags : 0
description : "4:1:0, planar, Y-Cb-Cr"
pixelformat : 0x39565559 [YUV9]
VIDIOC_ENUM_FMT(17,VIDEO_CAPTURE)
index : 17
type : VIDEO_CAPTURE
flags : 0
description : "4:1:0, planar, Y-Cr-Cb"
pixelformat : 0x39555659 [YVU9]
VIDIOC_G_FMT(VIDEO_CAPTURE)
type : VIDEO_CAPTURE
fmt.pix.width : 320
fmt.pix.height : 240
fmt.pix.pixelformat : 0x56595559 [YUYV]
fmt.pix.field : INTERLACED
fmt.pix.bytesperline : 640
fmt.pix.sizeimage : 153600
fmt.pix.colorspace : unknown
fmt.pix.priv : 0

video overlay
VIDIOC_ENUM_FMT(0,VIDEO_OVERLAY)
index : 0
type : VIDEO_OVERLAY
flags : 0
description : "8 bpp, gray"
pixelformat : 0x59455247 [GREY]
VIDIOC_ENUM_FMT(1,VIDEO_OVERLAY)
index : 1
type : VIDEO_OVERLAY
flags : 0
description : "8 bpp, dithered color"
pixelformat : 0x34324948 [HI24]
VIDIOC_ENUM_FMT(2,VIDEO_OVERLAY)
index : 2
type : VIDEO_OVERLAY
flags : 0
description : "15 bpp RGB, le"
pixelformat : 0x4f424752 [RGBO]
VIDIOC_ENUM_FMT(3,VIDEO_OVERLAY)
index : 3
type : VIDEO_OVERLAY
flags : 0
description : "15 bpp RGB, be"
pixelformat : 0x51424752 [RGBQ]
VIDIOC_ENUM_FMT(4,VIDEO_OVERLAY)
index : 4
type : VIDEO_OVERLAY
flags : 0
description : "16 bpp RGB, le"
pixelformat : 0x50424752 [RGBP]
VIDIOC_ENUM_FMT(5,VIDEO_OVERLAY)
index : 5
type : VIDEO_OVERLAY
flags : 0
description : "16 bpp RGB, be"
pixelformat : 0x52424752 [RGBR]
VIDIOC_ENUM_FMT(6,VIDEO_OVERLAY)
index : 6
type : VIDEO_OVERLAY
flags : 0
description : "24 bpp RGB, le"
pixelformat : 0x33524742 [BGR3]
VIDIOC_ENUM_FMT(7,VIDEO_OVERLAY)
index : 7
type : VIDEO_OVERLAY
flags : 0
description : "32 bpp RGB, le"
pixelformat : 0x34524742 [BGR4]
VIDIOC_ENUM_FMT(8,VIDEO_OVERLAY)
index : 8
type : VIDEO_OVERLAY
flags : 0
description : "32 bpp RGB, be"
pixelformat : 0x34424752 [RGB4]
VIDIOC_ENUM_FMT(9,VIDEO_OVERLAY)
index : 9
type : VIDEO_OVERLAY
flags : 0
description : "4:2:2, packed, YUYV"
pixelformat : 0x56595559 [YUYV]
VIDIOC_ENUM_FMT(10,VIDEO_OVERLAY)
index : 10
type : VIDEO_OVERLAY
flags : 0
description : "4:2:2, packed, YUYV"
pixelformat : 0x56595559 [YUYV]
VIDIOC_ENUM_FMT(11,VIDEO_OVERLAY)
index : 11
type : VIDEO_OVERLAY
flags : 0
description : "4:2:2, packed, UYVY"
pixelformat : 0x59565955 [UYVY]
VIDIOC_G_FMT(VIDEO_OVERLAY)
type : VIDEO_OVERLAY
fmt.win.w.left : 0
fmt.win.w.top : 0
fmt.win.w.width : 320
fmt.win.w.height : 240
fmt.win.field : ANY
fmt.win.chromakey : 0
fmt.win.clips : (nil)
fmt.win.clipcount : 0
fmt.win.bitmap : (nil)
VIDIOC_G_FBUF
capability : 0x4 [LIST_CLIPPING]
flags : 0x0 []
base : (nil)
fmt.width : 0
fmt.height : 0
fmt.pixelformat : 0x56595559 [YUYV]
fmt.field : ANY
fmt.bytesperline : 0
fmt.sizeimage : 0
fmt.colorspace : unknown
fmt.priv : 0

vbi capture
VIDIOC_ENUM_FMT(0,VBI_CAPTURE)
index : 0
type : VBI_CAPTURE
flags : 0
description : "vbi data"
pixelformat : 0x59455247 [GREY]
VIDIOC_G_FMT(VBI_CAPTURE)
type : VBI_CAPTURE
fmt.vbi.sampling_rate : 35468950
fmt.vbi.offset : 128
fmt.vbi.samples_per_line: 2048
fmt.vbi.sample_format : 0x59455247 [GREY]
fmt.vbi.start[0] : 7
fmt.vbi.start[1] : 320
fmt.vbi.count[0] : 16
fmt.vbi.count[1] : 16
fmt.vbi.flags : 0

controls
VIDIOC_QUERYCTRL(BASE+0)
id : 9963776
type : INTEGER
name : "Brightness"
minimum : 0
maximum : 65535
step : 256
default_value : 32768
flags : 0
VIDIOC_QUERYCTRL(BASE+1)
id : 9963777
type : INTEGER
name : "Contrast"
minimum : 0
maximum : 65535
step : 128
default_value : 32768
flags : 0
VIDIOC_QUERYCTRL(BASE+2)
id : 9963778
type : INTEGER
name : "Saturation"
minimum : 0
maximum : 65535
step : 128
default_value : 32768
flags : 0
VIDIOC_QUERYCTRL(BASE+3)
id : 9963779
type : INTEGER
name : "Hue"
minimum : 0
maximum : 65535
step : 256
default_value : 32768
flags : 0
VIDIOC_QUERYCTRL(BASE+9)
id : 9963785
type : BOOLEAN
name : "Mute"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+0)
id : 134217728
type : BOOLEAN
name : "chroma agc"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+1)
id : 134217729
type : BOOLEAN
name : "combfilter"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+2)
id : 134217730
type : BOOLEAN
name : "automute"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+3)
id : 134217731
type : BOOLEAN
name : "luma decimation filter"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+4)
id : 134217732
type : BOOLEAN
name : "agc crush"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+5)
id : 134217733
type : BOOLEAN
name : "vcr hack"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+6)
id : 134217734
type : INTEGER
name : "whitecrush upper"
minimum : 0
maximum : 255
step : 1
default_value : 207
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+7)
id : 134217735
type : INTEGER
name : "whitecrush lower"
minimum : 0
maximum : 255
step : 1
default_value : 127
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+8)
id : 134217736
type : INTEGER
name : "uv ratio"
minimum : 0
maximum : 100
step : 1
default_value : 50
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+9)
id : 134217737
type : BOOLEAN
name : "full luma range"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+10)
id : 134217738
type : INTEGER
name : "coring"
minimum : 0
maximum : 3
step : 1
default_value : 0
flags : 0

### video4linux device info [/dev/video0] ###
general info
VIDIOCGCAP
name : "BT878 video (IODATA GV-BCTV5/PC"
type : 0xab [CAPTURE,TUNER,OVERLAY,CLIPPING,SCALES]
channels : 3
audios : 1
maxwidth : 924
maxheight : 576
minwidth : 48
minheight : 32

channels
VIDIOCGCHAN(0)
channel : 0
name : "Television"
tuners : 1
flags : 0x3 [TUNER,AUDIO]
type : TV
norm : 0
VIDIOCGCHAN(1)
channel : 1
name : "Composite1"
tuners : 0
flags : 0x2 [AUDIO]
type : CAMERA
norm : 0
VIDIOCGCHAN(2)
channel : 2
name : "S-Video"
tuners : 0
flags : 0x2 [AUDIO]
type : CAMERA
norm : 0

tuner
VIDIOCGTUNER
tuner : 0
name : "Television"
rangelow : 0
rangehigh : 704
flags : 0x0 []
mode : unknown
signal : 0

audio
VIDIOCGAUDIO
audio : 0
volume : 0
bass : 0
treble : 0

picture
VIDIOCGPICT
brightness : 32768
hue : 32768
colour : 32768
contrast : 32768
whiteness : 0
depth : 16
palette : YUV422

buffer
VIDIOCGFBUF
base : (nil)
height : 0
width : 0
depth : 16
bytesperline : 0

window
VIDIOCGWIN
x : 0
y : 0
width : 320
height : 240
chromakey : 0
flags : 0




regards,
junichi
--
dancer@{debian.org,netfort.gr.jp} Debian Project

2006-01-19 23:11:36

by Junichi Uekawa

[permalink] [raw]
Subject: Re: [x86_64] bttv: linux 2.6.16-rc1 mplayer fails to record ALSA audio and fails tune TV.

Hi,

With 2.6.16-rc1, it's recording no audio, and it's recording
black-and-white noise on video. Wooo, it's getting worse.

$ uname -a
Linux dancer64 2.6.16-rc1dancer-dirty #1 Wed Jan 18 08:11:24 JST 2006 x86_64 GNU/Linux


>From the information that I've gathered so far it seems like:
1. bttv was rewritten to support v4l2
2. record via v4l2 is broken, v4l1 is not (xawtv works, mencoder broken.)
I've heard mencoder should work with v4l1, but I have not yet confirmed.

bttv-cards.c:

[BTTV_BOARD_GVBCTV5PCI] = {
.name = "IODATA GV-BCTV5/PCI",
.video_inputs = 3,
.audio_inputs = 1,
.tuner = 0,
.svhs = 2,
.gpiomask = 0x0f0f80,
.muxsel = {2, 3, 1, 0 },
.audiomux = {0x030000, 0x010000, 0, 0, 0x020000, 0},
.no_msp34xx = 1,
.pll = PLL_28,
.tuner_type = TUNER_PHILIPS_NTSC_M,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.audio_hook = gvbctv5pci_audio,
.has_radio = 1,
},

dmesg gives me an impression that this path is taken properly:
bttv: driver version 0.9.16 loaded
bttv: using 8 buffers with 2080k (520 pages) each for capture
bttv: Bt8xx card found (0).
bttv0: Bt878 (rev 17) at 0000:03:0b.0, irq: 22, latency: 64, mmio: 0xfdcff000
bttv0: detected: I-O Data Co. GV-BCTV5/PCI [card=81], PCI subsystem ID is 10fc:d018
bttv0: using: IODATA GV-BCTV5/PCI [card=81,autodetected]
bttv0: gpio: en=00000000, out=00000000 in=00f6f0f7 [init]
bttv0: using tuner=17
bttv0: i2c: checking for TDA9875 @ 0xb0... not found
bttv0: i2c: checking for TDA7432 @ 0x8a... not found
bttv0: i2c: checking for TDA9887 @ 0x86... not found
tuner 0-0061: chip found @ 0xc2 (bt878 #0 [sw])
tuner 0-0061: type set to 17 (Philips NTSC_M (MK2))
bttv0: registered device video0
bttv0: registered device vbi0
bttv0: registered device radio0
bttv0: PLL: 28636363 => 35468950 .. ok


v4l-info is dumped with:

printf("inputs\n");
for (i = 0;; i++) {
memset(&input,0,sizeof(input));
input.index = i;
if (-1 == ioctl(fd,VIDIOC_ENUMINPUT,&input))
break;
printf(" VIDIOC_ENUMINPUT(%d)\n",i);
print_struct(stdout,desc_v4l2_input,&input,"",tab);
}
printf("\n");


which is probably handled in
bttv-driver.c:static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)

which unconditionally sets:
i->audioset = 0;



> last successful one was 2.6.14-rc5.
>
>
> I've noticed that there is a v4l-info command, which dumps v4l2
> information, and it seems to signify that v4l2 is giving a different
> answer.
>
> The following is a diff, which seems to signify that this difference
> exists in the two versions:
>
> - audioset : 1
> + audioset : 0
>


regards,
junichi
--
dancer@{debian.org,netfort.gr.jp} Debian Project

2006-02-02 09:13:48

by Junichi Uekawa

[permalink] [raw]
Subject: Re: [x86_64] bttv: linux 2.6.16-rc1 mplayer fails to record ALSA audio and fails tune TV.

Hi,

status update, it's still like this; I probably don't have much time
to sit around debugging this problem myself, but if anyone else has
met this problem and fixed it, I'd be delighted to know about it.

Linux dancer64 2.6.16-rc1dancer-ga6df590d-dirty #1 Wed Feb 1 18:36:00 JST 2006 x86_64 GNU/Linux


regards,
junichi
--
dancer@{debian.org,netfort.gr.jp} Debian Project



At Fri, 20 Jan 2006 08:11:34 +0900,
Junichi Uekawa wrote:
>
> Hi,
>
> With 2.6.16-rc1, it's recording no audio, and it's recording
> black-and-white noise on video. Wooo, it's getting worse.
>
> $ uname -a
> Linux dancer64 2.6.16-rc1dancer-dirty #1 Wed Jan 18 08:11:24 JST 2006 x86_64 GNU/Linux
>
>
> From the information that I've gathered so far it seems like:
> 1. bttv was rewritten to support v4l2
> 2. record via v4l2 is broken, v4l1 is not (xawtv works, mencoder broken.)
> I've heard mencoder should work with v4l1, but I have not yet confirmed.
>
> bttv-cards.c:
>
> [BTTV_BOARD_GVBCTV5PCI] = {
> .name = "IODATA GV-BCTV5/PCI",
> .video_inputs = 3,
> .audio_inputs = 1,
> .tuner = 0,
> .svhs = 2,
> .gpiomask = 0x0f0f80,
> .muxsel = {2, 3, 1, 0 },
> .audiomux = {0x030000, 0x010000, 0, 0, 0x020000, 0},
> .no_msp34xx = 1,
> .pll = PLL_28,
> .tuner_type = TUNER_PHILIPS_NTSC_M,
> .tuner_addr = ADDR_UNSET,
> .radio_addr = ADDR_UNSET,
> .audio_hook = gvbctv5pci_audio,
> .has_radio = 1,
> },
>
> dmesg gives me an impression that this path is taken properly:
> bttv: driver version 0.9.16 loaded
> bttv: using 8 buffers with 2080k (520 pages) each for capture
> bttv: Bt8xx card found (0).
> bttv0: Bt878 (rev 17) at 0000:03:0b.0, irq: 22, latency: 64, mmio: 0xfdcff000
> bttv0: detected: I-O Data Co. GV-BCTV5/PCI [card=81], PCI subsystem ID is 10fc:d018
> bttv0: using: IODATA GV-BCTV5/PCI [card=81,autodetected]
> bttv0: gpio: en=00000000, out=00000000 in=00f6f0f7 [init]
> bttv0: using tuner=17
> bttv0: i2c: checking for TDA9875 @ 0xb0... not found
> bttv0: i2c: checking for TDA7432 @ 0x8a... not found
> bttv0: i2c: checking for TDA9887 @ 0x86... not found
> tuner 0-0061: chip found @ 0xc2 (bt878 #0 [sw])
> tuner 0-0061: type set to 17 (Philips NTSC_M (MK2))
> bttv0: registered device video0
> bttv0: registered device vbi0
> bttv0: registered device radio0
> bttv0: PLL: 28636363 => 35468950 .. ok
>
>
> v4l-info is dumped with:
>
> printf("inputs\n");
> for (i = 0;; i++) {
> memset(&input,0,sizeof(input));
> input.index = i;
> if (-1 == ioctl(fd,VIDIOC_ENUMINPUT,&input))
> break;
> printf(" VIDIOC_ENUMINPUT(%d)\n",i);
> print_struct(stdout,desc_v4l2_input,&input,"",tab);
> }
> printf("\n");
>
>
> which is probably handled in
> bttv-driver.c:static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
>
> which unconditionally sets:
> i->audioset = 0;
>
>
>
> > last successful one was 2.6.14-rc5.
> >
> >
> > I've noticed that there is a v4l-info command, which dumps v4l2
> > information, and it seems to signify that v4l2 is giving a different
> > answer.
> >
> > The following is a diff, which seems to signify that this difference
> > exists in the two versions:
> >
> > - audioset : 1
> > + audioset : 0
> >
>
>
> regards,
> junichi
> --
> dancer@{debian.org,netfort.gr.jp} Debian Project
>

2006-02-02 14:08:20

by Manu Abraham

[permalink] [raw]
Subject: Re: [x86_64] bttv: linux 2.6.16-rc1 mplayer fails to record ALSA audio and fails tune TV.

Junichi Uekawa wrote:
> Hi,
>
> status update, it's still like this; I probably don't have much time
> to sit around debugging this problem myself, but if anyone else has
> met this problem and fixed it, I'd be delighted to know about it.
>
> Linux dancer64 2.6.16-rc1dancer-ga6df590d-dirty #1 Wed Feb 1 18:36:00 JST 2006 x86_64 GNU/Linux
>
>

Are you referring to bugzilla 5895 ? I just closed that ticket.

http://linuxtv.org/hg/v4l-dvb?cmd=changeset;node=dc3ce5a86001;style=gitweb


Manu

2006-02-02 23:04:33

by Junichi Uekawa

[permalink] [raw]
Subject: Re: [x86_64] bttv: linux 2.6.16-rc1 mplayer fails to record ALSA audio and fails tune TV.

Hi,

> Junichi Uekawa wrote:
> > Hi,
> >
> > status update, it's still like this; I probably don't have much time
> > to sit around debugging this problem myself, but if anyone else has
> > met this problem and fixed it, I'd be delighted to know about it.
> >
> > Linux dancer64 2.6.16-rc1dancer-ga6df590d-dirty #1 Wed Feb 1 18:36:00 JST 2006 x86_64 GNU/Linux
> >
> >
>
> Are you referring to bugzilla 5895 ? I just closed that ticket.
>
> http://linuxtv.org/hg/v4l-dvb?cmd=changeset;node=dc3ce5a86001;style=gitweb

That sounds like a different module; I'm using 'bttv' module.


I've tried

rmmod bttv
rmmod tuner
rmmod compat_ioctl32
rmmod v4l2-common
rmmod tveeprom
rmmod videodev
rmmod ir-common

insmod v4l2-common.ko
insmod tveeprom.ko
insmod videodev.ko
insmod compat_ioctl32.ko
insmod tuner.ko
insmod ir-common.ko
insmod bttv.ko


on

$ hg log|head
changeset: 3295:02699cfc26d5
tag: tip
user: Manu Abraham <[email protected]>
date: Thu Feb 2 07:59:47 2006 +0400
summary: bugfix [5895], return an error value

and I can reproduce the situation.


The current situation being that no images come through mencoder,
which probably means it's not
1. tuning the tuner (If there has been a i2c breakage, sounds possible)
2. getting the images
or both.

I am able to see TV through xawtv, and I am assuming that means it's
working with v4l1 compatibility layer of some sort.


regards,
junichi
--
dancer@{debian.org,netfort.gr.jp} Debian Project