AVLinux Default Sound Card How-To

What other apps and distros do you use to round out your studio?

Moderators: MattKingUSA, khz

oldboxenav
Established Member
Posts: 7
Joined: Tue Jan 07, 2014 6:20 am

AVLinux Default Sound Card How-To

Postby oldboxenav » Tue Jan 07, 2014 6:36 am

AVLinux 6.0.2 live DVD on PC with two (2) sound cards. How to set the default card?

1. Bad motherboard sound (some Realtek, VIA chips on 10-yr-old mobo)
2. Good Creative SB Live! 5.1 board in PCI slot.

I disabled (1) in BIOS, so it should not even show up. But it does, and AVLinux wants to use it as the default.

Pablo
Established Member
Posts: 1269
Joined: Thu Apr 17, 2008 9:57 pm

Re: AVLinux Default Sound Card How-To

Postby Pablo » Tue Jan 07, 2014 10:43 pm

http://alsa.opensrc.org/MultipleCards

Also, in the jack setup, you can always call the card by its short name instead of by its number. I.e., hw:CARD where CARD is the name shown between square brackets in the output of "cat /proc/asound/cards".

oldboxenav
Established Member
Posts: 7
Joined: Tue Jan 07, 2014 6:20 am

Re: AVLinux Default Sound Card How-To

Postby oldboxenav » Wed Jan 08, 2014 1:08 am

Pablo wrote:http://alsa.opensrc.org/MultipleCards

Also, in the jack setup, you can always call the card by its short name instead of by its number. I.e., hw:CARD where CARD is the name shown between square brackets in the output of "cat /proc/asound/cards".

Thank you Pablo, but a live DVD comes preconfigured. Yes I know about ALSA conf files. I was wondering about a simple GUI widget to set the default sound card.

I looked into the various control panel and mixer apps but nothing obvious jumped out. I can set conf files but they will disappear at reboot. And some may need a reboot just to take effect.

I would be surprised if the AVLinux dev did not include such a "picker" util? He did such an amazing job. I could not however even find a simple "sound check" util to pipe some beeps out the audio ports. Do you know of one on the live DVD 6.0.2? Is it possible to use one of the mixer utils for the purpose? Thanks again.

varpa
Established Member
Posts: 433
Joined: Fri Feb 25, 2011 6:40 pm

Re: AVLinux Default Sound Card How-To

Postby varpa » Wed Jan 08, 2014 1:55 am

It seems like with a live DVD you cannot set anything since there is no way to store the configuration. It would be better to run from USB stick or install to hard drive. Also, you should be able to pick which card to use with QJackCtl, but with a live DVD you won't be able to save this configuration.

oldboxenav
Established Member
Posts: 7
Joined: Tue Jan 07, 2014 6:20 am

Re: AVLinux Default Sound Card How-To

Postby oldboxenav » Wed Jan 08, 2014 5:20 am

varpa wrote:It seems like with a live DVD you cannot set anything since there is no way to store the configuration. It would be better to run from USB stick or install to hard drive. Also, you should be able to pick which card to use with QJackCtl, but with a live DVD you won't be able to save this configuration.

Well, yes. But I'd like to boot AVLinux on N machines and select between cards wherever. I am new to AVLinux and not a JACK or audio guru. I'm trying to avail such work others have done.

The main thing for this one old PC was testing pure JACK/ALSA by booting the DVD. Right now, the PC runs PulseAudio. I spent time fiddling with that, including dbus handoff jazz for JACK2, so I don't want to change the config willy-nilly. I want a reason to do so.

I can use a live DVD without changing the box. I may even remove the boot disk and make it an AV appliance. I would be willing to start using USB boot sticks after I have proven such effort worthwhile from a live DVD or otherwise.

I am unclear why AVLinux even finds its mobo sound, which is disabled in BIOS. I guess either BIOS doesn't quite disable it enough, or AVLinux is really good at finding hardware, or both.

The PCI sound and AGP video are old but decent cards, and the CPU may be the main bottleneck. The hard disk is an SSD, and major runtime dirs mount tmpfs, so those aren't issues. I am even content to play vids only from RAM not SSD.

With the right tuning it'll work fine. I am just trying to find the sweet spot for this box. AVLinux seemed good for testing "the pro way to do it." I guess I might just ask anyone out there if JACK/ALSA as per AVLinux makes more sense for old hardware than PulseAudio. I am completely agnostic and ignorant of the issues but have read up on them somewhat. Any sort of diagnostic regimen you can recommend would be useful too I guess.

Thanks very much.

User avatar
GMaq
Established Member
Posts: 1336
Joined: Fri Sep 25, 2009 1:42 pm

Re: AVLinux Default Sound Card How-To

Postby GMaq » Wed Jan 08, 2014 5:23 am

@oldboxenav



Hi, On the LiveDVD it is probably best to select the card you want in Qjackctl, as of AV 6.0.2 starting JACK with Qjackctl will also automatically start A2JMIDID and the aloop-daemon so all sound whether ALSA or JACK will be routed through whichever JACK device you have selected. If you create a persistent USB Key (as shown in the AV Linux Manual) then I would think you could create a config that is persistent but I haven't tested that personally.

*Note PulseAudio is avoided like the plague on AV Linux and is not really missed thanks to the routing flexibility provided by the aloop-daemon.

oldboxenav
Established Member
Posts: 7
Joined: Tue Jan 07, 2014 6:20 am

Re: AVLinux Default Sound Card How-To

Postby oldboxenav » Wed Jan 08, 2014 6:49 am

GMaq wrote:select the card you want in Qjackctl, as of AV 6.0.2

Thank you GMaq. And thank you for AVLinux. I will send a $5 donation (postal address?).

Gads I love those icons you used. Can you tell me where to get them for KDE?

Your tip makes sense now that you explain it. I still recommend a simple-minded tester app for basic hardware output checks.

My worry is A-V sync for heavier (say, 720p) vids. Either A or V alone works fine by itself. With both active, the player logs (mild) complaints.

PulseAudio may be the culprit, and/or my tuning, but I don't know. The box has Creative SB on PCI bus, open-source radeon ati on AGP bus, i686 class AMD CPU, 2 GB RAM.

Would this old box be better with JACK2+aloop than PulseAudio? Some docs said PulseAudio leaves more CPU headroom, but this box need do scant else but play vids and make them. I mainly want to extract the best A-V sync it can produce.

Thanks again; take a nice rest after the 6.0.2 push.

User avatar
GMaq
Established Member
Posts: 1336
Joined: Fri Sep 25, 2009 1:42 pm

Re: AVLinux Default Sound Card How-To

Postby GMaq » Wed Jan 08, 2014 3:35 pm

Hi,

A few notes on what you've said,

I don't think the audio sound server on the software side of things is going to make any difference or improve AV Sync, in other words using JACK2 or PulseAudio shouldn't improve this, if there is a difference in CPU consumption it will be negligible. On the hardware side of things Creative Labs Soundblaster cards are obviously well regarded on Windows however on Linux they are not really a great choice mostly because they are hardwired at a 48Kz sample rate and using them at any other sample rate requires on-the-fly sample rate conversions which both introduce potential latency and quality concerns. As far as AV Linux detecting the disabled audio card in the BIOS that is odd because it shouldn't unless some component of your audio device (ie HDMI out) is still enabled. Another concern is with the Video side of things, if I'm not mistaken with the Open Source ATi drivers you are not getting full hardware acceleration on the Video card so the main system CPU is doing the heavy lifting which on 720p video could be enough of a load to compromise AV Sync, proprietary video drivers for ATi are equally frustrating as they are routinely pulling support for cards and their 32bit current Video Card drivers are broken, there is a workaround for this if you install AV Linux but that is peripheral to this conversation.

On the editing side of things you can do yourself a huge favour by either editing with proxies in Kdenlive OR converting 720p input sources to DNxHD either of which bring HD Editing capabilities to modest spec machines.

BTW the icon set is the great 'Faenza' by tiheum, I don't know if there is a KDE version or not :)

oldboxenav
Established Member
Posts: 7
Joined: Tue Jan 07, 2014 6:20 am

Re: AVLinux Default Sound Card How-To

Postby oldboxenav » Thu Jan 09, 2014 3:42 am

Linux ATI open source video support is superb for older cards. In fact 720p plays pretty well on the old box. But mplayer and mpv report the odd mis-sync. All the box needs is proper tuning. I think the sync issues are more video than sound. Whether CPU or GPU does processing depends on encoding support on the vid board, I guess. So results could vary by video.

On SB audio, yeah I know about 48 KHz, but you're wrong about Linux support for SoundBlasters. They are roundly considered one of the best-supported sound cards for Linux. Linux kernel SB driver does up/down resampling onboard IIUC, not on CPU. So although one may critique the whole SB hardware design (and some do), it's got very good support in Linux.

Unless user confs mess things up, which mine may do, trying to calculate hardware bufs to put in PulseAudio confs. Divide this by that with rounding up or down, etc. gives me headaches. So /etc/pulse/daemon.conf for the SB0060 board has

default-sample-format = s16le
default-sample-rate = 48000
default-fragmets = 3
default-fragment-size-msec = 4
resample-method=speex-float-0
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 1

Anyway I tried your tip on the default board with mixed results. Running QJackCtl, setting the JACK board, then starting JACK, then a player: still no output from the SB board. What did work was setting the SB board inside VLC prefs, bypassing JACK altogether.

BTW I'm more fond of SMPlayer or (better?) CMPlayer than VLC, which although very nice, has just enough buggy quirks to annoy, particularly with playlist and CDDB handling. Raw mpv has a very nice OSD, much better than mplayer, much better seeking too, and the codebase is cleaner.

Thanks for the DNxHD tip, nice.

icons

oldboxenav
Established Member
Posts: 7
Joined: Tue Jan 07, 2014 6:20 am

Re: AVLinux Default Sound Card How-To

Postby oldboxenav » Thu Jan 09, 2014 4:41 am

Related thread may still be apropos if 2.5 years old, though my problem is video falling behind audio not vice-versa.
The ALSA output was designed with (10-years old) audio hardware in mind. Its buffering characteristics don't really work with PulseAudio in my experience. I suspect the buffers are too short/late.

So a 10-year-old box maybe wants plain ALSA without PulseAudio. The box would need aloop like AVLinux to run JACK programs.

User avatar
GMaq
Established Member
Posts: 1336
Joined: Fri Sep 25, 2009 1:42 pm

Re: AVLinux Default Sound Card How-To

Postby GMaq » Thu Jan 09, 2014 7:32 pm

Hi,

Hmmm if you have the Soundblaster selected in Qjackctl's setup and start JACK (with the aloop-daemon running automatically) ANY application you use that is set for ALSA output should playback through the Soundblaster via the a2j and j2a loop unless if perhaps you have specified a particular 'hw:X' device in the ALSA output settings of the app. The exception would be apps that use Gstreamer (ie Clementine, Totem) and they will automatically connect directly to JACK through the Gstreamer audiosink. There is no need at all for PulseAudio in this configuration it works imperfectly with ALSA and even worse with JACK, PulseAudio is fine for general Desktop use but it is an unneeded hindrance and obstacle in a Audio-Specific Linux context, both AV Linux and KXStudio ship without it for very good reason..

oldboxenav
Established Member
Posts: 7
Joined: Tue Jan 07, 2014 6:20 am

Re: AVLinux Default Sound Card How-To

Postby oldboxenav » Fri Jan 10, 2014 2:19 am

Thanks. Please add a postal mailing address on your website for donations even c/o someplace. I want AVLinux to continue.


Return to “Linux Distributions & Other Software”

Who is online

Users browsing this forum: gamora77 and 1 guest