Opened 11 years ago
Closed 8 years ago
Last modified 8 years ago
#3405 closed enhancement (fixed)
ALSA input for analog capture
| Reported by: | anonymous | Owned by: | janne |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.22 |
| Component: | mythtv | Version: | head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
Currently, mythtv only supports OSS for analog capture. Since ALSA is the main audio system for Linux (2.6.0+), mythtv should alsa support ALSA capture.
Attachments (8)
Change History (25)
Changed 11 years ago by amistry@…
Changed 11 years ago by amistry@…
Further adhere to coding standards
comment:1 Changed 11 years ago by stuarta
- Milestone changed from unknown to 0.21
- Version changed from unknown to head
OSSAudioInput::OpenDevice?() is broken.
If the device open fails it throws a verbose error but then continues on it's merry way.
It repeatedly checks if (0 <= retval) and while it is reusing retval it just looks plain wrong.
Stuart
comment:2 Changed 11 years ago by amistry@…
Stuart: You're right, it is broken, but only with respect to logging info. The point of the repeated checking is to give the function a single return point at the end of the function. This way, I only have to do any potential cleanup at one point, at the end. All the 'if (0 <= retval)' is there to make sure further code only executes if everything up until that point is OK. If it's not, it'll be skipped and a return code of < 0 (usually -1) will signify an error. You'll notice all the functions I've wrote are like that inclusing the alsa input. If for some reason this is unacceptable, I can rework the patch to put returns after each error instead of just at the end.
comment:3 Changed 10 years ago by danielk
- Owner changed from ijr to danielk
- Type changed from patch to enhancement
Changed 10 years ago by danielk
Cleans up error handling, moves from libmythtv to libmyth so mythphone can use it evenually.
comment:4 Changed 10 years ago by danielk
- Milestone changed from 0.21 to 0.22
Changed 10 years ago by danielk
This just updates the patch for the current trunk. It still needs to handle error conditions better.
comment:5 Changed 9 years ago by Alan Calvert <cal@…>
Presenting patch alsa_input_3405-v3-trunk-18043:
I've use this patch on three systems for over a year, so I'm interested in it's welfare. This little effort started as a refresh to current trunk, but it sort of morphed beyond that. Perhaps I've addressed some of danielk's concerns over error handling. Subjectively, I believe it holds synch better than anything else I've tried. Objectively, it seems to work ok, and does pretty much all the things it needs to do to perform respectably. Enjoy.
Changed 9 years ago by Alan Calvert <cal@…>
Changed 9 years ago by Alan Calvert <cal@…>
@ 18856
comment:6 Changed 9 years ago by Alan Calvert <cal@…>
v3 was pretty rough, v4 is a bit nicer.
comment:7 Changed 9 years ago by Dibblah
- Status changed from new to assigned
comment:8 Changed 9 years ago by janne
- Owner changed from danielk to janne
- Status changed from assigned to accepted
Changed 9 years ago by Alan Calvert <cal@…>
@ 19944
comment:9 Changed 9 years ago by Alan Calvert <cal@…>
3405-v5 refresh to 19944, some tweaks & tidies, and reinstate alsa device selection (it fell off).
comment:10 in reply to: ↑ description Changed 9 years ago by anonymous
Any update on this?
Kernels built without OSS support are becoming more common (like in Fedora 11) so it's an actual problem now.
comment:11 Changed 9 years ago by anonymous
And software-based analogue capture cards are becoming less common, antiquated tech ...
Actually that's an understatement, they were surpassed by hardware capture cards years ago.
comment:12 Changed 9 years ago by anonymous
Maybe so, but I have such a card and I'm not afraid to use it. ;)
I'm compiling svn+patch now, to test it.
comment:13 Changed 9 years ago by anonymous
Been using the patch for a while now and it seems to work.
Changed 9 years ago by Alan Calvert <cal@…>
refresh @ 20846, lightly tested.
comment:14 Changed 8 years ago by janne
- Resolution set to fixed
- Status changed from accepted to closed
(In [21448]) adds alsa audio input to analog cards. Fixes #3405
factors the audio device handling code out of NuppelVideoRecorder? into a AudioInput? class with OSS and new ALSA implementation.
based on patches by: Alan Calvert, Anand K. Mistry and Daniel Kristjansson

Patch for alsa capture