Page 1 of 2
Setting up external audio card and audio priorities
Posted: Wed May 22, 2013 12:58 pm
by briandc
Hi all,
on an older PC with BodhiLinux, I thought I'd take advantage of a better USB audio card I had laying around. However, I'm not finding how to get it recognized.
Here are the results of cat /proc/asound/cards ~/.jackdrc:
Code: Select all
cat /proc/asound/cards ~/.jackdrc 0 [V8237 ]: VIA8237 - VIA 8237
VIA 8237 with ALC655 at 0xee00, irq 22
1 [CODEC ]: USB-Audio - USB Audio CODEC
Burr-Brown from TI USB Audio CODEC at usb-0000:00:10.0-2,
full speed
/usr/bin/jackd -dalsa -dhw:0 -r44100 -p1024 -n2 -D -Phw:1
and the output of arecord -l && aplay -l:
Code: Select all
**** List of CAPTURE Hardware Devices ****
card 0: V8237 [VIA 8237], device 0: VIA 8237 [VIA 8237]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: V8237 [VIA 8237], device 1: VIA 8237 [VIA 8237]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
**** List of PLAYBACK Hardware Devices ****
card 0: V8237 [VIA 8237], device 0: VIA 8237 [VIA 8237]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 0: V8237 [VIA 8237], device 1: VIA 8237 [VIA 8237]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
I also can't adjust the CPU for performance (I get "no such file or directory" for scaling governor), I can't seem to set swappiness, etc.
Any suggestions?
brian
Re: Setting up external audio card and audio priorities
Posted: Wed May 22, 2013 2:38 pm
by autostatic
briandc wrote:1 [CODEC ]: USB-Audio - USB Audio CODEC
Burr-Brown from TI USB Audio CODEC at usb-0000:00:10.0-2[/code]
There it is, the interface is called CODEC so you can address it as
-d hw:CODEC when using it with JACK.
briandc wrote:I also can't adjust the CPU for performance (I get "no such file or directory" for scaling governor), I can't seem to set swappiness, etc.
swappiness can be set in the
/etc/sysctl.conf file. It might well be that the CPU of your older PC does not do CPU frequency scaling. Did you check the BIOS for a SpeedStep/PowerNow option? And could you post the outcome of
cat /proc/cpuinfo?
Re: Setting up external audio card and audio priorities
Posted: Wed May 22, 2013 3:02 pm
by briandc
AutoStatic wrote:briandc wrote:1 [CODEC ]: USB-Audio - USB Audio CODEC
Burr-Brown from TI USB Audio CODEC at usb-0000:00:10.0-2[/code]
There it is, the interface is called CODEC so you can address it as
-d hw:CODEC when using it with JACK.
briandc wrote:I also can't adjust the CPU for performance (I get "no such file or directory" for scaling governor), I can't seem to set swappiness, etc.
swappiness can be set in the
/etc/sysctl.conf file. It might well be that the CPU of your older PC does not do CPU frequency scaling. Did you check the BIOS for a SpeedStep/PowerNow option? And could you post the outcome of
cat /proc/cpuinfo?
Hi AutoStatic,
for the general activation of the audio card, I got it solved just now, at this page for Bodhi:
http://wiki.bodhilinux.com/doku.php?id=2nd_sound_card
I don't know how it'll behave with Jack yet, but we'll see.
I think the swappiness question is, as you said, not available on this PC. The .conf file exists but there's no mention of swappiness, although I do know that it's set at 60.
The output of cat /proc/cpuinfo is the following:
for CPU0:
Code: Select all
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 3.06GHz
stepping : 9
microcode : 0x3
cpu MHz : 3060.647
cache size : 1024 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl tm2 cid cx16 xtpr lahf_lm
bogomips : 6121.29
clflush size : 64
cache_alignment : 128
address sizes : 36 bits physical, 48 bits virtual
power management:
for CPU1:
Code: Select all
processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 3.06GHz
stepping : 9
microcode : 0x3
cpu MHz : 3060.647
cache size : 1024 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 0
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl tm2 cid cx16 xtpr lahf_lm
bogomips : 6121.29
clflush size : 64
cache_alignment : 128
address sizes : 36 bits physical, 48 bits virtual
power management:
brian
Re: Setting up external audio card and audio priorities
Posted: Wed May 22, 2013 6:26 pm
by autostatic
Thanks briandc! That's a Pentium 4 CPU you have there and it probably supports CPU scaling but what kind of kernel are you using? I wouldn't be surprised if support for CPU scaling is not compiled within your kernel. Which means it will always run at its maximum clock freq. If you have a sysctl.conf file you can add a line to decrease the swappiness:
And reboot.
Re: Setting up external audio card and audio priorities
Posted: Wed May 22, 2013 6:31 pm
by briandc
AutoStatic wrote:Thanks briandc! That's a Pentium 4 CPU you have there and it probably supports CPU scaling but what kind of kernel are you using? I wouldn't be surprised if support for CPU scaling is not compiled within your kernel. Which means it will always run at its maximum clock freq. If you have a sysctl.conf file you can add a line to decrease the swappiness:
And reboot.
Unfortunately it's a generic kernel:
Code: Select all
Linux bodhi-briandc 3.5.0-11-generic #11 SMP Wed Aug 22 14:45:14 CDT 2012 i686 i686 i386 GNU/Linux
I'm guessing I should install a better kernel. Can I find a better kernel repository to add to Bodhi?
brian
Re: Setting up external audio card and audio priorities
Posted: Wed May 22, 2013 6:36 pm
by briandc
I'm also having problems getting QJackCtl to work. It runs, but no audio...
brian
Re: Setting up external audio card and audio priorities
Posted: Wed May 22, 2013 6:39 pm
by autostatic
If your CPU doesn't scale it's not that bad in the case where you want to use the performance governor since it will run at its maximum frequency. swappines and CPU frequency scaling are unrelated by the way.
Re: Setting up external audio card and audio priorities
Posted: Wed May 22, 2013 7:16 pm
by tux99
The Pentium 4 is definitely capable of cpu scaling, I used to have a P4 years ago and had cpu scaling working with Linux.
It actually scales to far lower frequencies than modern cpus, I remember in idle it went all the way down to 200MHz (mine was a 2.56GHz version).
Don't ask me how to configure it though as I can't remember (way too long ago).
Re: Setting up external audio card and audio priorities
Posted: Wed May 22, 2013 7:44 pm
by briandc
AutoStatic wrote:If your CPU doesn't scale it's not that bad in the case where you want to use the performance governor since it will run at its maximum frequency. swappines and CPU frequency scaling are unrelated by the way.
Thanks AutoStatic. It's not so much the scaling, as I have another identical PC but it seems to run faster. I don't know if I did something different with that one..
But it's Jack that isn't working, and using Alsa would be fine except that latency is quite high. But if I can reduce the latency for Alsa I wouldn't mind using that. Any thoughts?
brian
Re: Setting up external audio card and audio priorities
Posted: Wed May 22, 2013 7:47 pm
by autostatic
How does your JACK config look like? Could you post a QjackCtl screenshot of your Settings window?
Re: Setting up external audio card and audio priorities
Posted: Thu May 23, 2013 6:51 am
by briandc
AutoStatic wrote:How does your JACK config look like? Could you post a QjackCtl screenshot of your Settings window?
Here:
Re: Setting up external audio card and audio priorities
Posted: Thu May 23, 2013 9:35 am
by autostatic
Try using the same input and output device. And I doubt if hw:2 exists, it's not in the dropdown list. Also, USB interfaces generally perform better when using a Periods/Buffer setting of 3.
Re: Setting up external audio card and audio priorities
Posted: Thu May 23, 2013 9:51 am
by briandc
AutoStatic wrote:Try using the same input and output device. And I doubt if hw:2 exists, it's not in the dropdown list. Also, USB interfaces generally perform better when using a Periods/Buffer setting of 3.
Ok; I'll try it tonight and see what happens.
BTW, have you ever used Alsa for audio production? Is there a way to tweak settings for it, to reduce latency? I wouldn't mind seeing how it behaves. Some people seem to use it without relying on Jack at all..
brian
Re: Setting up external audio card and audio priorities
Posted: Thu May 23, 2013 9:58 am
by autostatic
I've used ALSA on some occassions. Some applications that use ALSA allow you to set latency related settings, if they don't you have to resort to hacking together a custom asoundrc file. What application(s) would you like to use?
Re: Setting up external audio card and audio priorities
Posted: Thu May 23, 2013 11:25 am
by briandc
AutoStatic wrote:I've used ALSA on some occassions. Some applications that use ALSA allow you to set latency related settings, if they don't you have to resort to hacking together a custom asoundrc file. What application(s) would you like to use?
Just the usual synths. I was thinking it would be nice to stay familiar with it, since it might be a good alternative to suggest to others if they see Jack as too complicated or problematic for some reason or another. I've even read of people using PulseAudio, but I have no idea if Alsa/Pulse developers are working to make these competitive with Jack, for music production purposes. Aisi, the more the merrier.
brian