个人工具

UbuntuHelp:FireWire

来自Ubuntu中文

跳转至: 导航, 搜索

There are three entries for 'FireWire'

  1. https://help.ubuntu.com/community/Firewire deals with 1394 video devices
  2. UbuntuStudioPreparation in the section Firewire (ieee1394 / raw1394) sound cards and cameras
  3. FireWire (FireWire Audio in Ubuntu Studio)

FireWire Audio in Ubuntu Studio

For a list of supported devices, check this page: http://ffado.org/?q=devicesupport/list

Step 1 - Ubuntu Studio Controls

First, enable raw1394 and related permissions using Ubuntu Studio Controls. An excellent graphical how-to is at UbuntuStudioControls

Step 2 - Users and Groups

Next, enable your username to access Audio and Video devices.

  • In the System menu, open Users and Groups. Click on the keyring icon and enter your password when prompted.

FireWire?action=AttachFile&do=get&target=users_unlock.png

In Jaunty and Intrepid:

  • Click 'Manage Groups'.
  • Create a group named 'audio' and add yourself as a member.
  • Create a group named 'video' and add yourself as a member.
  • Click 'OK' and exit.

In Karmic:

  • Click on your username, then click Properties.
  • Click on the User Privileges tab.
  • Make sure the boxes labeled 'Use audio devices' and 'Use video devices' are checked.

FireWire?action=AttachFile&do=get&target=user_privs.png

  • Click 'OK' and exit.

Step 3 - Reboot and Test

  • Plug in your !FireWire audio interface and turn it on.

You will need either to unload and reload the raw1394 kernel module or to reboot for the permissions settings to take effect. There are instances where it seems to be necessary to reboot with the interface connected. Also, there is currently a bug in Ubuntu Studio Controls that results in firewire permissions being overwritten with certain updates. If this happens, run Ubuntu Studio Controls, disable raw1394 permissions, re-enable them, unload and reload raw1394 or reboot.

  • Open a terminal and run:
 ls -al /dev/raw1394

You should see something like this:

 crw-rw---- 1 root video 171, 0 2009-10-16 05:30 /dev/raw1394

'video' must be shown in this report.

  • Then run:
 groups

You should see something like this:

 <username> adm dialout fax cdrom tape audio dip video plugdev lpadmin sambashare admin netdev

Audio and video must be listed in this report.

Step 5 - Start Jack

  • In the Sound & Video/Audio Production menu, open Jack Control.
  • Click 'Setup'. Here are some good settings to start with:

. Driver: firewire (This selects the Ffado drivers) . Interface: hw:0 . Audio:Duplex . Check Realtime . Priority: 70 . Frames/Period: 128 . Sample Rate: 44100 . Periods/Buffer: 2

  • Click OK, then click 'Start'. After a few seconds Jack Control should display CPU percentage, RT should be yellow and blinking, and x-runs should be at 0/0.

FireWire?action=AttachFile&do=get&target=jack_control.png . Note: You should adjust your Sample Rate based on the type of work you will be doing. 44100 for CD quality audio, 48000 for video work, higher for studio quality. . Frames/Period can be lowered as well. A lower number will yield lower latencies and use more processor power. If you start getting x-runs, increase this number. . Periods/Buffer can be set to 3 for intermediate latencies.

Step 6 (Advanced/Optional) Set IRQ Priorities

For ultra-low latencies, we can take full advantage of the real time kernel and give higher priority to certain interrupt handlers, or IRQ's. This should give an increase in performance stability. Real-time IRQ priorities are set on boot-up by the rtirq script. The rtirq script in Karmic has not been updated for the current kernel. Please update it, as outlined in this thread: http://ubuntuforums.org/showthread.php?t=1328175 By default in Ubuntu Studio, sound cards and USB devices are given a high priority but firewire devices are not. We want to change this:

sudo gedit /etc/default/rtirq

The priorities are set, in order from highest to lowest, by this line:

RTIRQ_NAME_LIST="rtc snd usb i8042"

Add ohci1394 second in this list, so it looks like this:

RTIRQ_NAME_LIST="rtc ohci1394 snd usb i8042"

Also add it to the non-threaded list:

RTIRQ_NON_THREADED="rtc ohci1394 snd"

Upon reboot, your IRQ priorities will be configured properly. Note: If your firewire card is handled by a controller (for instance, if you are using a PC-Card), you will need to add it to the RTIRQ_NAME_LIST in front of ochi1394 (giving it a higher priority). There are more IRQ adjustments that can be made and may be a benefit, but they are not easily automated by the rtirq script. To learn how to tweak things even further, see http://subversion.ffado.org/wiki/IrqPriorities for more detailed information.

Step 7 - Have Fun and Happy Audio Production!

For ideas on where to go from here, see UbuntuStudio/Audio