Bug 498167 - OSS is obsolete, needs to be ported to ALSA
OSS is obsolete, needs to be ported to ALSA
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: tvtime (Show other bugs)
11
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Tomas Smetana
Fedora Extras Quality Assurance
:
: 510105 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-29 05:17 EDT by Jan Kovats
Modified: 2009-07-22 17:48 EDT (History)
9 users (show)

See Also:
Fixed In Version: 1.0.2-8.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-22 17:48:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Kovats 2009-04-29 05:17:30 EDT
Description of problem:

I Can't get TVTime to output audio. I accesed the soundcard config with "alsamixer -c0" and turned the line-in all the way up. But i still can't get
audio from my TVTime. It used to work on any previous Fedora and i haven't touched the configuration. So its not a hardware problem.
Also i would like to mentione if it is standard in the new fedora that anyone
using a tvcard has to search through the documentation find out how to use alsamixer -c0 just to use it, is not really a good end user experience.


Version-Release number of selected component (if applicable):

pulseaudio 0.9.15
tvtime 1.0.2
AlsaMixer v1.0.19
Comment 1 Matthias Clasen 2009-04-29 10:08:10 EDT
You'd think it would be up to the tvtime packager to make sure that his package works with the default sound setup of the distro....
Comment 2 Lennart Poettering 2009-04-29 10:25:00 EDT
tvtime seems to use the old OSS interface we have obsoleted in F11.

tvtime needs to be ported to ALSA.
Comment 3 Jan Kovats 2009-04-29 10:33:58 EDT
Since the last release of TVtime was on the 8 September 2005 i doubht anyone is still working on this project, and won't be ported soon.

Does this mean it will be removed from the repos?

Are there other TV applications wich i could use wich don't need all of the KDE dependencies to be installed aswell?
Comment 4 Tomas Smetana 2009-04-29 10:44:18 EDT
Yes, tvtime should be ported to use the ALSA mixer... I'll see what I can do.
Comment 5 Tomas Smetana 2009-04-29 10:58:38 EDT
Sorry. I answered too hastily. tvtime doesn't do much with the sound -- it controls the mixer settings only (usually line-in, depending on how one has the TV card output set up), so if you couldn't set the volume with alsamixer there might be also something else wrong.

According to your description it looks like you have the TV card's line output connected to the line-in of the sound card. If it's really so, could you please verify that there is some sound coming out of the TV card?  Or can you try to plug some other device (portable player...) to your sound card's line-in and verify that works (i.e. you are able to hear the sound and change its volume using alsamixer)?

Thank you.
Comment 6 Jan Kovats 2009-04-29 12:09:50 EDT
Yes it is in fact only a cable connecting the video card to the line in of my audio card.

I tested now that the TV Cards audio is working fine. I plugged in my headset and i got audio just fine.

I hooked up and external player to the line in but couldn't get any sound from that.

I checked alsamixer again and line playback was on 100.

Also i had fedora 9 on this machine before i installed the F11 preview release. It worked back then and i haven't touched the configuration on the hardware side.

(In reply to comment #5)
> Sorry. I answered too hastily. tvtime doesn't do much with the sound -- it
> controls the mixer settings only (usually line-in, depending on how one has the
> TV card output set up), so if you couldn't set the volume with alsamixer there
> might be also something else wrong.
> 
> According to your description it looks like you have the TV card's line output
> connected to the line-in of the sound card. If it's really so, could you please
> verify that there is some sound coming out of the TV card?  Or can you try to
> plug some other device (portable player...) to your sound card's line-in and
> verify that works (i.e. you are able to hear the sound and change its volume
> using alsamixer)?
> 
> Thank you.
Comment 7 Tomas Smetana 2009-04-29 13:42:14 EDT
(In reply to comment #6)
> Yes it is in fact only a cable connecting the video card to the line in of my
> audio card.
> 
> I tested now that the TV Cards audio is working fine. I plugged in my headset
> and i got audio just fine.

OK. Then tvtime just can't set the volume level because it's using the obsolete OSS mixer.  This is what I'll try to fix in this Bugzilla.
 
> I hooked up and external player to the line in but couldn't get any sound from
> that.
> 
> I checked alsamixer again and line playback was on 100.

This is also wrong but it has nothing to do with tvtime.
Comment 8 Jan Kovats 2009-04-29 14:29:52 EDT
(In reply to comment #7)
> OK. Then tvtime just can't set the volume level because it's using the obsolete
> OSS mixer.  This is what I'll try to fix in this Bugzilla.

Well aslong as i can use TVTime again i'm happy. don't need the line in for anything else atm.


 
> This is also wrong but it has nothing to do with tvtime. 

I did open up the ticket as a a problem in pulse not tvtime originally. Cause I thought it was just the line in wich doesn't work and my soundcard has been supported on previous version so it couldn't have been alsa. So when you fix the problem with OSS my audio is still comming in through the line-in and won't work cause of a different problem?
Comment 9 Lennart Poettering 2009-04-30 16:08:48 EDT
Hmm, so this specific card relies on input feedback? We don't really support this anymore, unless you go to the low level ALSA mixer (alsamixer -c0)

Does your TV card provide a PCM device? i.e. what's the contents of /proc/asound/pcm?
Comment 10 Jan Kovats 2009-04-30 17:31:59 EDT
(In reply to comment #9)
> Hmm, so this specific card relies on input feedback? We don't really support
> this anymore, unless you go to the low level ALSA mixer (alsamixer -c0)
> 
> Does your TV card provide a PCM device? i.e. what's the contents of
> /proc/asound/pcm?  

The contents of my /proc/asound/pcm is:

00-00: Intel ICH : Intel ICH5 : playback 1 : capture 1
00-01: Intel ICH - MIC ADC : Intel ICH5 - MIC ADC : capture 1
00-02: Intel ICH - MIC2 ADC : Intel ICH5 - MIC2 ADC : capture 1
00-03: Intel ICH - ADC2 : Intel ICH5 - ADC2 : capture 1
00-04: Intel ICH - IEC958 : Intel ICH5 - IEC958 : playback 1
02-00: Bt87x Digital : Bt87x Digital : capture 1
02-01: Bt87x Analog : Bt87x Analog : capture 1


Bt87x Digital/Analog i think are there cause of my TVcard but they never seemed to do anything.
The card shipped with a loop cable to connect the card to the line-in and dind't mention it beeing possible another way.

And i did go to the alsamixer -c0 and turned line-in all the way up and still didn't get any audio.

But if there's a way to use my tvcard directly, would of course bee even better than that halfe baked line-in solution.
Comment 11 Tomas Smetana 2009-05-04 03:45:22 EDT
(In reply to comment #10)

> Bt87x Digital/Analog i think are there cause of my TVcard but they never seemed
> to do anything.

These are capture-only devices.  You may try to play with sox(1) and see if you can get some sound of them.  You will however want to set the recording level or switch recording on the devices, so I guess you'll have to use alsamixer anyway.

> The card shipped with a loop cable to connect the card to the line-in and
> dind't mention it beeing possible another way.
> 
> And i did go to the alsamixer -c0 and turned line-in all the way up and still
> didn't get any audio.
> 
> But if there's a way to use my tvcard directly, would of course bee even better
> than that halfe baked line-in solution.  

The "line-in solution" is standard on *all* analogue TV cards AFAIK.  There is not much point in having the sound output of the tuner software processed (yes, you may want to capture or filter it, but this is still possible with the line-in).  In case you just want to watch the TV, which is task tvtime was written for, it really makes sense to use line-in since it's more resource friendly and the image processing is CPU intensive enough.

I think there are applications that might be able to use the sound devices on your TV card directly (mplayer comes to my mind).
Comment 12 Jan Kovats 2009-05-04 07:37:05 EDT

(In reply to comment #11)
> The "line-in solution" is standard on *all* analogue TV cards AFAIK.  There is
> not much point in having the sound output of the tuner software processed (yes,
> you may want to capture or filter it, but this is still possible with the
> line-in).  In case you just want to watch the TV, which is task tvtime was
> written for, it really makes sense to use line-in since it's more resource
> friendly and the image processing is CPU intensive enough.

So.. i'm getting confused. Cause on comment #9 Lennart Poettering posted:

"Hmm, so this specific card relies on input feedback? We don't really support
this anymore"

So will it now be possible in the future to use the line-in? Is it supported? Or do i have to switch to mplayer, wich isn't as confortable to watch tv with. 

And most of all when i have line-in set on 100 per alsamixer -c0 shouldn't it playback anything comming in to the line-in anyway? even my tv card as it is atm?
Comment 13 Lennart Poettering 2009-05-05 12:25:39 EDT
Relying on line in like this sucks. It physically ties the tv card to a specific sound card and makes audio not directly available for monitoring, ... The correct way I believe is to digitally transmit the audio data from the tv card to sound card.

But anyway, line-in feeedback is supported via alsamixer -c0 only. if that doesn't work then this is a driver issue (and should be moved to the kernel).
Comment 14 Tomas Smetana 2009-05-31 12:09:58 EDT
Just FYI: tvtime-1.0.2-7 in rawhide contains the ALSA mixer patch.
Comment 15 Bug Zapper 2009-06-09 10:46:03 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 16 duni.bg 2009-06-14 11:25:18 EDT
After upgrading from Fedora 10 to the new release Fedora 11, I can confirm this bug, too.

One can use the following workaround:
according to /etc/modprobe.d/dist-oss.conf just uncomment the last line.

However I don't consider this to be a proper solution. We all want to move away from OSS at the end of the day.

Here is also my "cat /proc/asound/pcm" :
00-00: Intel ICH : SiS SI7012 : playback 1 : capture 1
00-01: Intel ICH - MIC ADC : SiS SI7012 - MIC ADC : capture 1
01-00: SAA7134 PCM : SAA7134 PCM : capture 1

The development package tvtime-1.0.2-8.fc12.i586.rpm doesn't solve this bug out of the box. Are there some manual changes one has to perform for the alsa support to work?
Comment 17 duni.bg 2009-06-14 12:04:12 EDT
Well, the patch works for alsa with the following addition to ~/.tvtime/tvtime.xml:
<option name="MixerDevice" value="hw:0/Line"/>

But the mixer is somewhat ugly - one must set the main pulseaudio volume to at least 50% or about -45dB for the tvtime internal volume control to work at all. It does a good job after that. 

Unfortunately the tvtime application is not listed in the Sound Preferences-> Application tab.
Comment 18 Jan Kovats 2009-06-14 16:21:16 EDT
Your card works now? I still can't get mine to utter a sound on F11. And it would be wierd if its a driver issue like mentioned earlier cause i haven't changed the configuration of this computer since at least fedora 8 and i never had problems with my tv card audio before.
But meaby i'm just in over my head.
Do you use now an digital output of your tv card or per line-in?
Mine doesn't relyie anything through line-in for some reason. even though its on 100 on alsamixer -c0 and the hardware is defently not broken cause it works on this computer still on a different OS.
Comment 19 duni.bg 2009-06-14 17:17:14 EDT
The card works in the following configuration:
- the line-in is connected to the card physically via cable
- the package tvtime-1.0.2-8.fc12.i586.rpm is installed - found only in the development repos
- the option listed above "<option name="MixerDevice" value="hw:0/Line"/>" is included in the ~/.tvtime/tvtime.xml configuration file.

Regarding to the bug - the best solution for future tvtime updates would be a native digital transfer from the tvtuner to the soundcard via alsa and pulseaudio. The alsa-patch is anyway a big programming contribution to tvtime, so more new and upstream features could also be included. 

I suppose, that the more important question for further development is whether this issue concerns that many users. The newer DVB-cards supersede this tuners nowadays, at least in Europe.
Comment 20 Fedora Update System 2009-06-17 10:47:52 EDT
tvtime-1.0.2-6.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/tvtime-1.0.2-6.fc11
Comment 21 Michael Schwendt 2009-06-17 15:38:12 EDT
Is anything else needed to get the pending update to work?

$ rpm -q tvtime
tvtime-1.0.2-6.fc11.i586

Error messages in console:

| ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL 
| mixer: attach error: No such file or directory
| mixer: Can't open mixer , mixer volume and mute unavailable.
| mixer: Can't open device /dev/mixer, mixer volume and mute unavailable.

My work-around is to run "alsamixer -c0", then un-mute "Line" input with key "m" and level it up.
Comment 22 Fedora Update System 2009-06-19 09:40:21 EDT
tvtime-1.0.2-6.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update tvtime'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-6735
Comment 23 Tomas Smetana 2009-06-19 10:03:47 EDT
(In reply to comment #21)
> Is anything else needed to get the pending update to work?

Yes. You need to re-configure tvtime to use the ALSA mixer: in ~/.tvtime/tvtime.xml you should change the "MixerDevice" option node to this:

<option name="MixerDevice" value="default/Line"/>

This should help...
Comment 24 Michael Schwendt 2009-06-19 10:30:26 EDT
Doesn't work yet. I've added such an entry, because no older "MixerDevice" was in the file. tvtime says:

mixer: find error: Success
mixer: Can't open mixer default, mixer volume and mute unavailable.
mixer: Can't open device default/Line, mixer volume and mute unavailable.
Comment 25 Michael Schwendt 2009-06-19 10:32:25 EDT
From-scratch configuration leads to problems, too, with default mixer setup not working either. Shouldn't it default to ALSA?

$ mv ~/.tvtime ~/.tvtime.BAK
$ tvtime
...
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL 
mixer: attach error: No such file or directory
mixer: Can't open mixer , mixer volume and mute unavailable.
mixer: Can't open device /dev/mixer, mixer volume and mute unavailable.
...
Comment 26 Tomas Smetana 2009-06-26 02:42:36 EDT
Sorry for neglecting this bug for so long -- I'm swamped with other work.  (Hopefully) I will release a new testing version over the weekend that would document the new features and make ALSA output the default.

Michael, please make sure you have specified the right soundcard in your config file: try "hw:0/Line" instead of "default/Line".
Comment 27 Fedora Update System 2009-06-28 06:57:33 EDT
tvtime-1.0.2-7.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/tvtime-1.0.2-7.fc11
Comment 28 Fedora Update System 2009-06-30 17:29:20 EDT
tvtime-1.0.2-7.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update tvtime'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7103
Comment 29 Michael Schwendt 2009-07-02 16:14:21 EDT
The  tvtime-1.0.2-alsamixer2.patch  contains a typo: "defaut" should be "default"

Other than that it works (even with "default/Line" and with/without pulseaudio).
Comment 30 Nick Lee 2009-07-04 04:45:31 EDT
tvtime-1.0.2-7.fc11.i586

in /etc/tvtime/tvtime.xml.rpmnew contains
 <option name="MixerDevice" value="defaut/Line"/>

in ~/.tvtime/tvtime.xml
<option name="MixerDevice" value="default/CD"/> not work
<option name="MixerDevice" value="defaut/CD"/> not work
<option name="MixerDevice" value="hw:0/CD"/> works fine
Comment 31 Michael Schwendt 2009-07-08 14:48:11 EDT
*** Bug 510105 has been marked as a duplicate of this bug. ***
Comment 32 Fedora Update System 2009-07-09 10:08:56 EDT
tvtime-1.0.2-8.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/tvtime-1.0.2-8.fc11
Comment 33 Bill Case 2009-07-10 15:46:56 EDT
Carried over from duplicate bug 510105.

"Continue to assume that it is a problem with tvtime and not pulseaudio. I
believe you're affected by bug 498167"

"Is it worth trying to get mplayer or xawtv going to see if they have the same
problem?"


Tried mplayer and got the following:

mplayer -v \
-tv driver=v4l2:norm=ntsc:chanlist=us-cable:outfmt=uyvy\
:immediatemode=0:amode=1\
:alsa:audiorate=44100\
 -vo xv\
 -aspect 16:9\
 tv://33

got

....

==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
dec_audio: Allocating 2048 + 65536 = 67584 bytes for output buffer.
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy 
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Trying preferred audio driver 'pulse', options '[none]'
[pulse] working around probably broken pause functionality,
        see http://www.pulseaudio.org/ticket/440
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
AO: Description: PulseAudio audio output
AO: Author: Lennart Poettering
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Starting playback...
Increasing filtered audio buffer size from 0 to 46144
....

tried xawtv but has documented font problems bug 472307.  Not worth fooling around with.
Comment 34 Tomas Smetana 2009-07-13 02:32:24 EDT
Hello Bill,
  I added a comment to the original bug #510105.  I don't believe much your problem is a duplicate of this bug...  As stated in the original bug: please make sure there is some sound going out of your tv card and that you have the line-in pass-through working.  Only when these two things work we might be able to debug something.

Regards.
Comment 35 Tomas Smetana 2009-07-13 03:41:40 EDT
Forget the comment #34.  If the card doesn't provide analogue sound output then tvtime can't do much with the sound.  It can really just control a volume slider: there is no sound playback in the tvtime.
Comment 36 Fedora Update System 2009-07-16 02:51:43 EDT
tvtime-1.0.2-8.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update tvtime'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7553
Comment 37 Fedora Update System 2009-07-22 17:48:44 EDT
tvtime-1.0.2-8.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.