How to configure the JACK audio server to automatically use a specific card?

I am running Ubuntu 12.04 studio on an HP Pavilion dm1 4200sg netbook. This is a fairly recent installation. I am trying to start the Jackd server by running

jackd -R -d alsa 

and it does not work with output:

 JACK server starting in realtime mode with priority 10 control device hw:0 control device hw:0 audio_reservation_init Acquire audio card Audio0 creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit control device hw:0 ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode Cannot initialize driver JackServer::Open() failed with -1 Failed to open server 

Running aplay -l gives the following result:

 **** List of PLAYBACK Hardware Devices **** card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: SB [HDA ATI SB], device 0: STAC92xx Analog [STAC92xx Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 

I find that by running

 jackd -R -d alsa -d hw:1 

jackd starts up successfully. I would like to configure my machine so that hw: 1 is the default parameter (i.e., so that the original command "jackd -R -d alsa" works). Can someone help me do this?

I tried editing ~ / .asoundrc to be

 pcm.!default { type hw card 1 } ctl.!default { type hw card 1 } 

but this does not seem to work. I feel good here, and any help will be appreciated. Thanks!

+4
source share
3 answers

I found a workaround. It does not configure the JACK server, but changes the display order of sound cards.

First I entered the terminal:

 sudo lshw -c multimedia 

which showed which modules used the two cards. They both used snd-hda-intel.

Then I went to the terminal:

 cat /proc/asound/card0/id cat /proc/asound/card1/id 

which gave the identifiers "General" and "SB" for cards 0 and 1. respectively.

Then I added the following two lines to the end of the file '/etc/modprobe.d./alsa-base.conf'

 options snd-hda-intel id=SB index=0 options snd-hda-intel id=Generic index=1 

After rebooting the machine, the SB card was loaded at position 0 and

 jackd -R -d alsa 

launched correctly.

+2
source
  • First open alsa-base.conf: sudo gedit / etc / modprobe.d / alsa-base.conf

  • Find the following line: "snd-hda-intel index = -2 options"
    And change it to: "#options snd-hda-intel index = -2"

Restart your computer and try again. You may need to install the correct sound device (alsa) for your programs.

0
source

First, in the terminal window, run cat/proc/asound/cards. command: cat/proc/asound/cards. You will see the output something like this:

  0 [SB ]: HDA-Intel - HDA ATI SB HDA ATI SB at 0xfcef8000 irq 16 1 [DSP ]: H-DSP - Hammerfall DSP RME Hammerfall DSP + Digiface at 0xfcff0000, irq 20 2 [NVidia ]: HDA-Intel - HDA NVidia HDA NVidia at 0xfe57c000 irq 32 

The "name" of each sound card in square brackets.

Having received this information, you can now refer to a specific device, for example, hw: DSP, now you can run the command:

 jackd -d alsa -d hw:DSP 

And that’s all, taken from: http://www.jackaudio.org/faq/device_naming.html

EDIT: code tags added

0
source

Source: https://habr.com/ru/post/1438193/


All Articles