[mythtv-users] Jack capabilities in mythtv SVN? + AO lib resampling defect + Nvidia textures?

Luke McKee hojuruku at gmail.com
Sat Dec 30 08:55:41 UTC 2006


Just a final repost as nobody touched this and I got no acknowledgment.

Cheers,

Luke

---------- Forwarded message ----------
From: Luke McKee <hojuruku at gmail.com>
Date: 27-Dec-2006 18:19
Subject: Jack capabilities in mythtv SVN? + AO lib resampling defect +
Nvidia textures?
To: mythtv-users at mythtv.org


Hi There,

I wish to use jack with mythtv. I use my soundcard for a lot of
different purposes, and I've got one of those lame BTTV cards that
doesn't have the ability to capture audio as the pin from the tuner is
not connected to the bt878 chip. I have a leadtek 2000 XP RM card.
This is confirmed on the V4L wiki, and I tried myself using the
analogue input. It's never going to work as an audio capture source.

I have a via card that I had to hack alsa lib's config files (just the
channel assignments only).

I invoke jack like this: /usr/bin/jackd --silent -s -c s -R --driver
alsa -d jack51 -i 2 -o 6 -p2048
but portaudio usually does this through a .jackdrc when gnome starts
up. Jack works with this configuration with mplayer.

My goal is to not have mythbackend trying to lock the audio input on
my card. I don't know if mythbackend supports using jack, but I am
assuming it does, because if I'm not mistaken mythtv uses bio2jack lib
to remap all their OSS functions.

I run mythbackend under the same user I use for mythfronend (my own
account) not having it run as root. In the mythtv-setup I only see the
option to select /dev/dsp /dev/adsp, /dev/sound/dsp and
/dev/sound/adsp. I have to use mysql to set the input to ALSA:jackplug
(not preferred) or JACK: or JACK:default. Maybe I could make another
version of ALSA:jackplug that set's capture and mutes the AUX input I
use for the TV card whenever mythtv starts recording.... :) I'll do
this the in future. I think mythtv does this anyway.
Notice my attempt to change the default input method to use dsnoop if
for some reason a program doesn't run through a sound server.

To date I have not been able to get mythbackend to use jack or coexist
with a jackd running in full duplex mode.(I bet it works in 1/2 duplex
but it's not what I want...)

My latest attempt as you can see below is to keep the default /dev/dsp
configuration and use alsa dsnoop to allow multiple apps to share
capture capability. Does mythbackend support plain alsa? E.g. in
capturecards table set AudioDevice to ALSA:dsnooponly or something
like that?

This may not be desired behavior but some people only have one
computer and capture card and are happy to stop using the microphone
etc when they realize mythbackend kicks in rather than having no audio
for a whole recording.

Thats the problem getting the sheduler to record at the same time
jackd is running.

On playback I have discovered a defect where there audio is jittery if
you don't set the recording to the same frequency jackd uses (which is
48000 - by default - and for good reason because some via cards have
problems resampling multi channels in hardware with DXS enabled. In
the terminal window that spawned mythtfronend i see : AO: resampling
to 48000 HZ - but the audio comes out in jitters. If I set my
recording profile to use 48Khz I'm ok. Audio resampling perfect when I
use plain old Alsa. Ask me and I'll post the output from mythtv.

I'm running gentoo AMD64 2006.1. Here's the version of myth I run.

[ebuild   R   ] media-tv/mythtv-0.20_p12288-r1  USE="alsa crciprec dts
dvb dvd ieee1394 ivtv jack joystick lcd lirc mmx opengl perl vorbis
xvmc (-altivec) -autostart -backendonly -dbox2 -debug -freebox
-frontendonly -hdhomerun" VIDEO_CARDS="nvidia -i810 -via" 0 kB

Also I've disabled XVMCUsesTextures because it kills opengl
performance - even with composite disabled. I need a cold reboot to
enable GLX so that glxgears doesn't stop and start. How many lines
should I uncomment / add to make XVMC textures needed to get the
colour OSD working nice?

I've applied the necessary option via mysql command line client for
the OSD fix. Has anyone had success with GL and textures?

#       Option      "Overlay" "True"
        Option      "UseEdidFreqs" "True"
        Option      "IgnoreEDID" "False"
        Option      "LoadKernelModule" "True"
        Option      "NvAGP" "3"
        Option      "SLI" "Off"
        #Option      "AddARGBGLXVisuals" "true"
        #Option "XvmcUsesTextures" "true"
#       Option          "TVStandard"            "PAL-B"
#       Option          "TVOutFormat"           "COMPOSITE"
#       Option "Twinview" "False"
#       Option "AllowGLXWithComposite" "1"
        Option  "Xinerama" "False"
#Option "RandRRotation" "True"

        #Option "TwinView" "true"
        #Option "MetaModes" "1280x1024; 1280x1024"
        #Option "SecondMonitorHorizSync" "30-50"
        #Option "SecondMonitorVertRefresh" "60"
        Option "VertRefresh" "60"
        #Option "TwinViewOrientation" "Clone"
        #Option "ConnectedMonitor" "CRT, TV"

My card:
(--) PCI:*(1:0:0) nVidia Corporation NV34 [GeForce FX 5200] rev 161,
Mem @ 0xfb000000/24, 0xc8000000/27, BIOS @ 0xfcc00000/17
(Your favourite card - hehe I read the wiki)

Here is my asound.conf.


pcm.snd-via8233 {
   type hw
   card 0
}

ctl.snd-via8237 {
        type hw
        card 0
}
pcm.!input {
     type dsnoop
     ipc_key 34521
     slave {
                pcm "hw:0,0"
          period_time 0
          period_size 1024
          buffer_size 8192
          rate 48000
     }
        bindings {
                0 0
                1 1
        }
}
pcm.ch51dup {
         slave.pcm surround51
         slave.channels 6
         type route
         ttable.0.0 1
         ttable.1.1 1
         ttable.0.2 1
         ttable.1.3 1
         ttable.0.4 0.5
         ttable.1.4 0.5
         ttable.0.5 0.5
         ttable.1.5 0.5
}

pcm.s51switch {
        slave.pcm surround51
        slave.channels 6
        type route
        ttable.0.0 1
        ttable.1.1 1
        ttable.2.2 1
        ttable.3.3 1
        ttable.4.5 1
        ttable.5.4 1
}
ctl.s51switch {
        type hw
        card 0
}

ctl.jack51 {
    type hw
        card 0
}

pcm.captureonly {
        type plug
        slave { pcm "input" }
}


pcm.jack51 {
    # "asym" allows for different
    # handling of in/out devices
    type asym
    playback.pcm {
    # route for mmap workaround
        type plug
        slave { pcm "surround51" }
    }
    capture.pcm  {
        type pulg
        slave { pcm "input"}
    }
    #capture.pcm {
    # 2 channels only
    #   type hw
   #    card 0
   # }
}
# Allow reading from the default device.
# # Also known as record or capture.

pcm.jackplug {
        type plug
        slave { pcm "jack" }
}
pcm.jack {
        type jack
        playback_ports {
                0 alsa_pcm:playback_1
                1 alsa_pcm:playback_2
        }
        capture_ports {
                0 alsa_pcm:capture_1
                1 alsa_pcm:capture_2
        }
}
#
#pcm.!default {
#       type plug
#       slave { pcm "jack" }
#}
#ctl.!default {
#       type hw
#       card 0
#}
pcm.!spdif {
    type plug
    slave.pcm "hw:0,1"
}

pcm.pulse {
   type pulse
}

ctl.pulse {
    type pulse
}

pcm.!dsp0 {
   type asym
   playback.pcm "output"
   capture.pcm "input"
}

Finally the only other problem is I can't get mythfilldatabase to take
more than 7 days of TVguide importing from an xmltv grabber, even with
the appropriate command line options for the grabber as well as --max
days 30 being defined. Where's the setting to fix this...

Thanks in advance for your help guys! I really love your software. Go
the EFF! They plugged mythtv because the Feds didn't like commercial
flagging and high definition recording. Thank god im not in America
anymore. Also can't wait to fix my kernel issues with an ivtv encoder
I have....

Cheers,

Luke


More information about the mythtv-users mailing list