Log in Register FAQ Memberlist Search pcHDTV Forum Index
pcHDTV Forum

pcHDTV Forum Index -> General Topics -> Sound on analog portion of the 5500
Post new topic  Reply to topic View previous topic :: View next topic 
Sound on analog portion of the 5500
PostPosted: Sat Mar 01, 2008 9:24 am Reply with quote
hdevine
 
Joined: 13 Aug 2007
Posts: 4




I saw 1 or 2 posts about this in the forums, but they didn't really have any answers, so I was hoping I could ask this question. I have a pcHD5500 running in a MythTV SVN 20071119 FC6 setup. I just got the analog portion working and can tune channels.

Now, I have the sound device setup as /dev/dsp and have the sound cable plugged into my Line In on my MBs sound card. However, it's on all the time, even if I'm not using the Watch TV feature. I can go into alsamixer and mute the Line In, but that doesn't help me when I want to record.

How can I get the sound working in a more "on-demand" type of way? Basically, have the Line In unmute itself when I tune an analog channel (either manually or when recording), and re-mute itself when not in use.

Thanks,
Harry
View user's profile Send private message
PostPosted: Sat Mar 01, 2008 11:50 am Reply with quote
rjp
 
Joined: 27 Feb 2008
Posts: 9




You can actually get the sound directly, as long as the cx88_alsa module is loaded. If it is, the analog section's sound output will be available (typically as /dev/dsp1). Take a look at /proc/asound/cards:

Code:
russ@labrat:~$ cat /proc/asound/cards
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfe020000 irq 18
 1 [CX8801         ]: CX88x - Conexant CX8801
                      Conexant CX8801 at 0xfb000000
 2 [CX8801_1       ]: CX88x - Conexant CX8801
                      Conexant CX8801 at 0xf7000000
 3 [NX             ]: USB-Audio - SB Audigy 2 NX
                      Creative Technology Ltd SB Audigy 2 NX at usb-0000:00:04.0-2, full speed


In my setup (this is with two HD-5500s on an Ubuntu 7.10 box), I needed to have the following in /etc/modprobe.d/alsa-base to insure that both cards would load in the proper order, and that the USB Audigy would be last:

Code:
options cx88-alsa index=1,2
options snd-usb-audio index=3


If you have just a single HD-5500, and no additional sound cards, you won't need to do that. Just configure your analog tuner to use /dev/dsp1 for sound. In my case, with two cards, the first card uses /dev/dsp1 and the second card uses /dev/dsp2.

Of course, that still doesn't solve the problem with the analog section activating into choppy audio/skipped frames mode - but that's a different rant. That problem isn't so bad for live TV (where I can switch out of analog and then back into analog), but it's a deal-killer for unattended recording purposes, so I've lowered the priority on the HD-5500 analog tuners since I still have an old Hauppauge bt878 card in a secondary backend that works like a charm.

_________________
Oh no! You have walked into the slavering fangs of a lurking grue!
View user's profile Send private message
PostPosted: Fri Jan 02, 2009 4:30 am Reply with quote
TrinitronX
 
Joined: 20 Dec 2008
Posts: 7




I'm attempting to get the analog audio out of /dev/dsp1, but have been unable to. I can only get white noise out of it. Plugging the audio cable on the breakout cable into my sound card's line in results in A/V being out of sync (audio leading the video). Plus, the problem of the line input not being muted while watching ATSC broadcasts is there. I'd prefer getting sound through the card over the PCI bus rather than the sound card loop into line input.

I do have a card with the analog audio enabled, as evidenced by lspci:

Code:
03:06.1 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port] (rev 05)


I have set all audio sampling rates that I could find for the v4l analog to 48000 Hz as well.

Using the following sox command line to play /dev/dsp1 to the default sound device, I get the same white noise (after installing libsox-fmt-all package in mythbuntu):
Code:
 sox -c 2 -s -w -r 48000 -t ossdsp /dev/dsp1 -t ossdsp -w -r 48000 /dev/dsp


The CX8801 is seen by alsa, cx88_alsa module is loaded.
Code:
$ cat /proc/asound/cards
 0 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xfe024000 irq 16
 1 [CX8801         ]: CX88x - Conexant CX8801
                      Conexant CX8801 at 0xf5000000

cat /proc/asound/modules
 0 snd_hda_intel
 1 cx88_alsa

$ lsmod | grep alsa
cx88_alsa              21512  0
snd_pcm                99208  3 snd_hda_intel,cx88_alsa,snd_pcm_oss
cx88xx                 83624  4 cx88_dvb,cx88_alsa,cx8800,cx8802
snd                    79432  14 snd_hda_intel,snd_seq_oss,cx88_alsa,snd_pcm_oss,snd_mixer_oss,snd_rawmidi,snd_pcm,snd_seq,snd_seq_device,snd_timer
videobuf_dma_sg        22788  5 cx88_dvb,cx88_alsa,cx8800,cx8802,cx88xx
btcx_risc              13448  4 cx88_alsa,cx8800,cx8802,cx88xx


Some extra stuff, possible problems?
Code:

# Asking arecord to list devices, I see this
# Should the CX8801 be set to digital, or is /dev/dsp1 currently being used for the ATSC input?

$ arecord --list-devices
**** List of CAPTURE Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC888 Analog [ALC888 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: ALC888 Digital [ALC888 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 2: ALC888 Analog [ALC888 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: CX8801 [Conexant CX8801], device 0: CX88 Digital [CX88 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


Trying to play video with mplayer still has white noise audio, but video is fine
Code:

# Are either of these lines the problem?
# v4l2: ioctl set format failed: Invalid argument
# AO: [pulse] Failed to connect to server: Connection refused

$ mplayer tv:// -tv driver=v4l2:alsa:adevice=hw.1:amode=1iorate=48000:volume=100:width=640:height=480:immediatemode=0:norm=ntsc:input=2
MPlayer 1.0rc2-4.3.2 (C) 2000-2007 MPlayer Team
CPU: AMD Athlon(tm) Dual Core Processor 4050e (Family: 15, Model: 107, Stepping: 2)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
Selected device: pcHDTV HD5500 HDTV
 Tuner cap:
 Tuner rxs:
 Capabilites:  video capture  VBI capture device  tuner  read/write  streaming
 supported norms: 0 = NTSC-M; 1 = NTSC-M-JP; 2 = NTSC-443; 3 = PAL-BG; 4 = PAL-I; 5 = PAL-DK; 6 = PAL-M; 7 = PAL-N; 8 = PAL-Nc; 9 = PAL-60; 10 = SECAM-DK; 11 = SECAM-L;
 inputs: 0 = Television; 1 = Composite1; 2 = S-Video;
 Current input: 2
 Current format: BGR24
v4l2: current audio mode is : STEREO
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
tv.c: norm_from_string(ntsc): Bogus norm parameter, setting default.
xscreensaver_disable: Could not find XScreenSaver window.
GNOME screensaver disabled
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred colorspace: Packed UYVY)
VDec: using Packed UYVY as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 640x480 => 640x480 Packed UYVY
Selected video codec: [rawuyvy] vfm: raw (RAW UYVY)
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
AO: [pulse] Failed to connect to server: Connection refused
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
v4l2: 116 frames successfully processed, 0 frames dropped.0.1% 0 0
GNOME screensaver enabled

Exiting... (Quit)
View user's profile Send private message
Sound on analog portion of the 5500
  pcHDTV Forum Index -> General Topics
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 7 Hours  
Page 1 of 1  

  
  
 Post new topic  Reply to topic  


Powered by phpBB © 2001-2003 phpBB Group
Theme created by Vjacheslav Trushkin