Sunday, March 24, 2013

No sound when recording with HVR-1900 after upgrading to openSuSE 12.3

I'm using a WinTV-HVR-1900 - Hauppauge Computer Works for analogue TV recording.
Using the same script for many years I was surprised to notice that all the new recordings did not contain any sound.
For a moment I thought the device was broken but after re-trying with openSuSE 12.2 I concluded that it had to be a software error or setting.

Using the command 
sudo v4l2-ctl -d /dev/video1 --log-status
I tried to do some debugging.
This is the output for openSuSE 12.2 where everything works as expected:

 [ 1438.650407] pvrusb2: =================  START STATUS CARD #0  =================
   [ 1438.652688] cx25840 9-0044: Video signal:              present
   [ 1438.652693] cx25840 9-0044: Detected format:           PAL-BDGHI
   [ 1438.652697] cx25840 9-0044: Specified standard:        automatic detection
   [ 1438.652701] cx25840 9-0044: Specified video input:     Composite 7
   [ 1438.652704] cx25840 9-0044: Specified audioclock freq: 48000 Hz
   [ 1438.658092] cx25840 9-0044: Detected audio mode:       mono
   [ 1438.658101] cx25840 9-0044: Detected audio standard:   A2-BG
   [ 1438.658108] cx25840 9-0044: Audio microcontroller:     running
   [ 1438.658115] cx25840 9-0044: Configured audio standard: automatic detection
   [ 1438.658122] cx25840 9-0044: Configured audio system:   automatic standard and mode detection
   [ 1438.658132] cx25840 9-0044: Specified audio input:     Tuner (In8)
   [ 1438.658140] cx25840 9-0044: Preferred audio mode:      stereo
   [ 1438.658149] cx25840 9-0044: Selected 65 MHz format:    system DK
   [ 1438.658155] cx25840 9-0044: Selected 45 MHz format:    chroma
   [ 1438.667850] cx25840 9-0044: IR Receiver:
   [ 1438.667869] cx25840 9-0044:     Enabled:                           no
   [ 1438.667881] cx25840 9-0044:     Demodulation from a carrier:       disabled
   [ 1438.667894] cx25840 9-0044:     FIFO:                              disabled
   [ 1438.667905] cx25840 9-0044:     Pulse timers' start/stop trigger:  disabled
   [ 1438.667917] cx25840 9-0044:     FIFO data on pulse timer overflow: overflow marker
   [ 1438.667929] cx25840 9-0044:     FIFO interrupt watermark:          half full or greater
   [ 1438.667941] cx25840 9-0044:     Loopback mode:                     normal receive
   [ 1438.667958] cx25840 9-0044:     Max measurable pulse width:        318144512 us, 318144512000 ns
   [ 1438.667974] cx25840 9-0044:     Low pass filter:                   disabled
   [ 1438.667990] cx25840 9-0044:     Pulse width timer timed-out:       no
   [ 1438.668026] cx25840 9-0044:     Pulse width timer time-out intr:   enabled
   [ 1438.668038] cx25840 9-0044:     FIFO overrun:                      no
   [ 1438.668048] cx25840 9-0044:     FIFO overrun interrupt:            enabled
   [ 1438.668064] cx25840 9-0044:     Busy:                              no
   [ 1438.668076] cx25840 9-0044:     FIFO service requested:            no
   [ 1438.668089] cx25840 9-0044:     FIFO service request interrupt:    enabled
   [ 1438.668101] cx25840 9-0044: IR Transmitter:
   [ 1438.668111] cx25840 9-0044:     Enabled:                           no
   [ 1438.668123] cx25840 9-0044:     Modulation onto a carrier:         disabled
   [ 1438.668135] cx25840 9-0044:     FIFO:                              disabled
   [ 1438.668147] cx25840 9-0044:     FIFO interrupt watermark:          half full or less
   [ 1438.668159] cx25840 9-0044:     Carrier polarity:                  space:noburst mark:burst
   [ 1438.668174] cx25840 9-0044:     Max pulse width:                   318144512 us, 318144512000 ns
   [ 1438.668187] cx25840 9-0044:     Busy:                              no
   [ 1438.668200] cx25840 9-0044:     FIFO service requested:            yes
   [ 1438.668211] cx25840 9-0044:     FIFO service request interrupt:    enabled
   [ 1438.668227] cx25840 9-0044: Brightness: 128
   [ 1438.668244] cx25840 9-0044: Contrast: 68
   [ 1438.668262] cx25840 9-0044: Saturation: 64
   [ 1438.668279] cx25840 9-0044: Hue: 0
   [ 1438.668296] cx25840 9-0044: Volume: 62225
   [ 1438.668313] cx25840 9-0044: Mute: false
   [ 1438.668331] cx25840 9-0044: Balance: 0
   [ 1438.668350] cx25840 9-0044: Bass: 0
   [ 1438.668365] cx25840 9-0044: Treble: 0
   [ 1438.668384] pvrusb2: cx2341x config:
   [ 1438.668396] pvrusb2: Stream: MPEG-2 Program Stream
   [ 1438.668412] pvrusb2: VBI Format: No VBI
   [ 1438.668424] pvrusb2: Video:  720x480, 30 fps
   [ 1438.668438] pvrusb2: Video:  MPEG-2, 4x3, Variable Bitrate, 6000000, Peak 8000000
   [ 1438.668460] pvrusb2: Video:  GOP Size 12, 2 B-Frames, GOP Closure
   [ 1438.668475] pvrusb2: Audio:  48 kHz, MPEG-1/2 Layer II, 224 kbps, Stereo, No Emphasis, No CRC
   [ 1438.668494] pvrusb2: Spatial Filter:  Manual, Luma 1D Horizontal, Chroma 1D Horizontal, 0
   [ 1438.668509] pvrusb2: Temporal Filter: Manual, 8
   [ 1438.668522] pvrusb2: Median Filter:   Off, Luma [0, 255], Chroma [0, 255]
   [ 1438.668541] pvrusb2_a driver: <ok> <init> <connected> <mode=analog>
   [ 1438.668555] pvrusb2_a pipeline: <idle> <configok>
   [ 1438.668567] pvrusb2_a worker: <decode:quiescent> <encode:virgin> <encode:waitok> <usb:stop> <pathway:ok>
   [ 1438.668581] pvrusb2_a state: ready
   [ 1438.668597] pvrusb2_a Hardware supported inputs: television, dtv, composite, s-video; allowed inputs: television, composite, s-video
   [ 1438.668622] pvrusb2_a Bytes streamed=0 URBs: queued=0 idle=0 ready=0 processed=0 failed=0
   [ 1438.668636] pvrusb2_a ir scheme: id=2 Zilog
   [ 1438.668650] pvrusb2_a Associated v4l2-subdev drivers and I2C clients:
   [ 1438.668664] pvrusb2_a   cx25840: cx25840 @ 44
   [ 1438.668676] pvrusb2_a   tuner: tuner @ 42
   [ 1438.668686] pvrusb2: ==================  END STATUS CARD #0  ==================


And this is the output for openSuSE 12.3... let's look for the difference!

  [31341.497675] pvrusb2: =================  START STATUS CARD #0  =================
   [31341.500021] cx25840 0-0044: Video signal:              not present
   [31341.500041] cx25840 0-0044: Detected format:           NTSC-M
   [31341.500053] cx25840 0-0044: Specified standard:        automatic detection
   [31341.500065] cx25840 0-0044: Specified video input:     Composite 7
   [31341.500077] cx25840 0-0044: Specified audioclock freq: 48000 Hz
   [31341.515412] cx25840 0-0044: Detected audio mode:       forced mode
   [31341.515423] cx25840 0-0044: Detected audio standard:   forced audio standard
   [31341.515429] cx25840 0-0044: Audio microcontroller:     detecting
   [31341.515436] cx25840 0-0044: Configured audio standard: undefined
   [31341.515443] cx25840 0-0044: Configured audio mode:     MONO1 (LANGUAGE A/Mono L+R channel for BTSC, EIAJ, A2)
   [31341.515449] cx25840 0-0044: Specified audio input:     Tuner (In8)
   [31341.515455] cx25840 0-0044: Preferred audio mode:      mono/language A
   [31341.523377] cx25840 0-0044: IR Receiver:
   [31341.523383] cx25840 0-0044:     Enabled:                           no
   [31341.523387] cx25840 0-0044:     Demodulation from a carrier:       disabled
   [31341.523391] cx25840 0-0044:     FIFO:                              disabled
   [31341.523395] cx25840 0-0044:     Pulse timers' start/stop trigger:  disabled
   [31341.523399] cx25840 0-0044:     FIFO data on pulse timer overflow: overflow marker
   [31341.523404] cx25840 0-0044:     FIFO interrupt watermark:          half full or greater
   [31341.523407] cx25840 0-0044:     Loopback mode:                     normal receive
   [31341.523422] cx25840 0-0044:     Max measurable pulse width:        318144512 us, 318144512000 ns
   [31341.523427] cx25840 0-0044:     Low pass filter:                   disabled
   [31341.523431] cx25840 0-0044:     Pulse width timer timed-out:       no
   [31341.523435] cx25840 0-0044:     Pulse width timer time-out intr:   enabled
   [31341.523440] cx25840 0-0044:     FIFO overrun:                      no
   [31341.523443] cx25840 0-0044:     FIFO overrun interrupt:            enabled
   [31341.523447] cx25840 0-0044:     Busy:                              no
   [31341.523451] cx25840 0-0044:     FIFO service requested:            no
   [31341.523454] cx25840 0-0044:     FIFO service request interrupt:    enabled
   [31341.523457] cx25840 0-0044: IR Transmitter:
   [31341.523460] cx25840 0-0044:     Enabled:                           no
   [31341.523464] cx25840 0-0044:     Modulation onto a carrier:         disabled
   [31341.523467] cx25840 0-0044:     FIFO:                              disabled
   [31341.523471] cx25840 0-0044:     FIFO interrupt watermark:          half full or less
   [31341.523475] cx25840 0-0044:     Carrier polarity:                  space:noburst mark:burst
   [31341.523483] cx25840 0-0044:     Max pulse width:                   318144512 us, 318144512000 ns
   [31341.523487] cx25840 0-0044:     Busy:                              no
   [31341.523490] cx25840 0-0044:     FIFO service requested:            yes
   [31341.523493] cx25840 0-0044:     FIFO service request interrupt:    enabled
   [31341.523509] cx25840 0-0044: Brightness: 128
   [31341.523515] cx25840 0-0044: Contrast: 68
   [31341.523522] cx25840 0-0044: Saturation: 64
   [31341.523528] cx25840 0-0044: Hue: 0
   [31341.523534] cx25840 0-0044: Volume: 62225
   [31341.523541] cx25840 0-0044: Mute: false
   [31341.523547] cx25840 0-0044: Balance: 0
   [31341.523553] cx25840 0-0044: Bass: 0
   [31341.523559] cx25840 0-0044: Treble: 0
   [31341.523565] pvrusb2: cx2341x config:
   [31341.523576] pvrusb2: Stream: MPEG-2 Program Stream
   [31341.523582] pvrusb2: VBI Format: No VBI
   [31341.523590] pvrusb2: Video:  720x480, 30 fps
   [31341.523605] pvrusb2: Video:  MPEG-2, 4x3, Variable Bitrate, 6000000, Peak 8000000
   [31341.523610] pvrusb2: Video:  GOP Size 12, 2 B-Frames, GOP Closure
   [31341.523627] pvrusb2: Audio:  48 kHz, MPEG-1/2 Layer II, 224 kbps, Stereo, No Emphasis, No CRC
   [31341.523636] pvrusb2: Spatial Filter:  Manual, Luma 1D Horizontal, Chroma 1D Horizontal, 0
   [31341.523641] pvrusb2: Temporal Filter: Manual, 8
   [31341.523649] pvrusb2: Median Filter:   Off, Luma [0, 255], Chroma [0, 255]
   [31341.523663] pvrusb2_a driver: <ok> <init> <connected> <mode=analog>
   [31341.523669] pvrusb2_a pipeline: <idle> <configok>
   [31341.523681] pvrusb2_a worker: <decode:quiescent> <encode:virgin> <encode:waitok> <usb:stop> <pathway:ok>
   [31341.523687] pvrusb2_a state: ready
   [31341.523703] pvrusb2_a Hardware supported inputs: television, dtv, composite, s-video; allowed inputs: television, composite, s-video
   [31341.523715] pvrusb2_a Bytes streamed=0 URBs: queued=0 idle=0 ready=0 processed=0 failed=0
   [31341.523721] pvrusb2_a ir scheme: id=2 Zilog
   [31341.523736] pvrusb2_a Associated v4l2-subdev drivers and I2C clients:
   [31341.523739] pvrusb2_a   cx25840: cx25840 @ 44
   [31341.523743] pvrusb2_a   tuner: tuner @ 42
   [31341.523747] pvrusb2: ==================  END STATUS CARD #0  ==================


The second line of the output reveals the cause of the problem.
For some strange reason, the default format for the cx25840 was changed from PAL-BDGHI to NTSC-M. (probably some default setting change between kernel 3.4 and 3.6/3.7)
This results in the behaviour described above. You still get a decent image but no sound.

To change the format back to PAL I added the following line to my script:
v4l2-ctl -s pal-B
Seems like an unimportant post but when looking for the problem I found a lot of people with a similar problem but no fix. 
I hope some people use the to resolve the same problem... quicker... ;-)

Tuesday, March 19, 2013

Installing openSuSE 12.3 on an external USB HDD

Another openSuSE version... another post about installing it...

This time I used the 32-bit DVD version but the procedure should also work for the live CD's.
Make sure you uncheck the "use automatic configuration" box when prompted.

I created a root partition on the external disk and formatted it with EXT4.
As you can see on the screenshot it is called /dev/sdb1


That means that the disk was detected while booting from DVD as the SECOND DISK.
However, when you boot from USB, the BIOS will report the USB disk as the FIRST disk.
This is important for the Grub configuration.

You will have to change the proposed Grub configuration (by clicking on the BOOTING link)
First, make sure you select GRUB and not GRUB2 (doesn't play nice with this setup)
Then make sure you only tick the box: "Boot from root partition"
And finally open the advanced section and move the USB disk to the top so that the disk order represents the BIOS order when booting from USB.



All this should result in the following summary:


Now resume your installation as you would normally do and enjoy this new release...