https://wiki.archlinux.org/api.php?action=feedcontributions&user=Hinrich&feedformat=atomArchWiki - User contributions [en]2024-03-28T20:44:29ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=IOS&diff=156126IOS2011-09-05T21:17:32Z<p>Hinrich: </p>
<hr />
<div>{{Lowercase_title}}<br />
[[Category:Sound (English)]]<br />
<br />
== Introduction ==<br />
<br />
In general, use of an iPod can be accomplished by simply mounting it somewhere and then pointing a libgpod-compatible program at that mountpoint. Amarok, Rhythmbox, and gtkpod are all capable of this.<br />
<br />
=== Changing iPod Mountpoint ===<br />
<br />
HAL will mount an attached iPod to /media/<iPod name>. If the volume label of your iPod is long, or contains a mixture of spaces, and/or lower-case and capital letters, it may present an inconvenience. You may easily change the volume label for more expedient access using <tt>mlabel</tt> from the <tt>mtools</tt> package:<br />
<br />
* Get and confirm the current volume label:<br />
# mlabel -i /dev/sd''xx'' -s ::<br />
* Set the new volume label (as iPod)<br />
# mlabel -i /dev/sd''xx'' -s ::iPod<br />
Where ''/dev/sdxx'' is the current mountpoint of your iPod.<br />
<br />
HAL will now automount iPod to /media/iPod.<br />
<br />
== Converting video for iPod ==<br />
=== Gen 5/5.5 ===<br />
==== DVD to iPod ====<br />
'''Get with:''' http://diveintomark.org/public/2007/06/podencoder.txt<br><br />
'''Depends on:''' aur/gpac mplayer<br />
<br />
Has detailed help, and is fairly self explanatory.<br />
<br />
Mirrored at http://src.iphitus.org/scripts/podencoder.txt{{Linkrot|2011|09|04}}<br />
<br />
An alternative is to use a method suggested at [DVD Ripping] then use one of the programs listed below to convert that to an iPod-friendly format.<br />
<br />
==== Video File to iPod ====<br />
'''Get with:''' http://src.iphitus.org/scripts/mp4ize.txt{{Linkrot|2011|09|04}}<br><br />
'''Depends on:''' mplayer<br />
<br />
I originally found this script here: http://thomer.com/howtos/ipod_video.html http://thomer.com/howtos/mp4ize <br />
It has been modified to properly handle filenames with unusual characters. Thanks to Thomer for the great script.<br />
<br />
=== Handbrake ===<br />
<br />
[http://handbrake.fr/ Handbrake] is a nifty tool with presets for a variety of iPod versions. A CLI version is available from pacman by:<br />
pacman -S handbrake<br />
or a version with a GTK interface is available in the [[AUR]]. See {{Package AUR|handbrake-gtk-svn}}<br />
The version within the package managers seem to be broken though (ie Handbrake version 0.9.3<br />
visit here http://forum.handbrake.fr/viewtopic.php?f=6&t=12464#p61835<br />
or here http://aur.archlinux.org/packages.php?ID=29320<br />
<br />
If you do decide to take the CLI way, a good guide is available at http://trac.handbrake.fr/wiki/CLIGuide,<br />
<br />
=== More Advanced/Configurable Methods ===<br />
<br />
==== Avidemux ====<br />
'''Get with:''' pacman -S avidemux<br />
<br />
This can convert to mp4 files. If you enforce a hard max of bitrate @ 700ish and keep the video size to 720x480 or 320x240 than it works fine for video file exporting.<br />
<br />
==== Mencoder ====<br />
<br />
'''Get with:''' pacman -S mplayer<br />
<br />
Has ''extremely'' comprehensive configuration support, which will be able to spit out iPod-compatible video files. Check out <tt>man mencoder</tt>; a lot of mplayer opts will also affect encoding.<br />
<br />
A basic guide is also available at [[Mencoder]].<br />
<br />
An example command to encode iPhone/iPod Touch-compatible video:<br />
<br />
mencoder INPUT -o output.mp4 \<br />
-vf scale=480:-10,harddup \<br />
-oac faac -faacopts mpeg=4:object=2:raw:br=128 \<br />
-of lavf -lavfopts format=mp4 \<br />
-ovc x264 -x264encopts nocabac:level_idc=30:bframes=0<br />
<br />
==== FFMpeg ====<br />
<br />
'''Get with:''' pacman -S ffmpeg<br />
<br />
Another encoder with comprehensive configuration support. Example command to encode for 5G iPod:<br />
<br />
ffmpeg -vcodec xvid -b 300 -qmin 3 -qmax 5 -bufsize 4096 \<br />
-g 300 -acodec aac -ab 96 -i INPUT -s 320x240 \<br />
-aspect 4:3 output.mp4<br />
<br />
or iPod Touch/iPhone compatible video output:<br />
<br />
ffmpeg -f mp4 -vcodec mpeg4 -maxrate 1000 -b 700 -qmin 3 -qmax 5\<br />
-bufsize 4096 -g 300 -acodec aac -ab 192 -s 480×320 -aspect 4:3 -i INPUT output.mp4<br />
<br />
== iPhone/iPod Touch ==<br />
<br />
=== Introduction ===<br />
By default, neither the iPhone nor the iPod Touch present mass storage capability over USB, though there exist two solutions for accessing your files.<br />
<br />
The first is to mount your device through the FUSE filesystem SSHFS. This requires jailbreaking, which at the moment requires access to a computer running Mac OS or a recent version of Windows, and [http://www.quickpwn.com/ QuickPwn]. After jailbreaking, an SSH server will also need to be installed on the device, which can be done through the Cydia program, installed on the device during the jailbreak process.<br />
<br />
The second is to use a different FUSE filesystem called [http://www.libimobiledevice.org/ iFuse], which allows you to mount your device through USB, as you normally would. This method requires no hacking and is in general the better solution, though be aware that the software is still under heavy development. As of late, however, it has proven to be rather reliable and stable.<br />
<br />
Note: '''The current releases of libgpod and gtkpod from the "extra" repository support the iPod Touch and the Iphone OS 3.1.x up to iOS 4.3.x. It's possible to transfer pictures and music without limitations'''<br />
<br />
Refer to this page:[https://help.ubuntu.com/community/PortableDevices/iPhone]<br />
<br />
=== Making Friends with the Device ===<br />
<br />
==== The SSHFS Way ====<br />
<br />
After this the easiest way to properly initialise a few things on the device's side is with the [http://launchpad.net/ipod-convenience iPod convenience script]. This is available in the AUR as {{Package AUR|ipod-convenience}}<br />
<br />
Next do <tt>modprobe fuse</tt> to actually load the fuse module. You may also want to add it to your MODULES array in /etc/rc.conf to have it loaded on boot.<br />
<br />
A few things may need changing in the script, depending on your setup. If you don't use sudo, replace:<br />
sudo lsusb -v -d 05ac: | grep iSerial | awk '{print $3}' | cut -b1-16 | xargs printf "FirewireGuid: 0x%s" >> $MOUNTPOINT/iTunes_Control/Device/SysInfo<br />
with:<br />
su -c "lsusb -v -d 05ac: | grep iSerial | awk '{print $3}' | cut -b1-16 | xargs printf \"FirewireGuid: 0x%s\" >> $MOUNTPOINT/iTunes_Control/Device/SysInfo"<br />
in the file /usr/share/ipod-convenience/mount-umount. You may also need to replace:<br />
PROCESS=`ssh root@$IPADDRESS ps x | grep MobileMusicPlayer | grep -v grep | awk '{print $1}'`<br />
with:<br />
PROCESS=`ssh root@$IPADDRESS ps ax | grep MobileMusicPlayer | grep -v grep | awk '{print $1}'`<br />
(I'm not sure under what circumstances this is necessary; it was on my iPod Touch running 2.2.1, and it won't have any adverse affect under other firmware version)<br />
<br />
After that, edit the <tt>/etc/default/ipod-convenience</tt> file with details of your device's IP address, and create the mount pount, which is <tt>/media/ipod</tt> by default (make sure to set the permissions correctly if you want it accessible by a regular user)<br />
<br />
To actually mount the device, run <tt>ipod-touch-mount</tt> or <tt>iphone-mount</tt> (they both do exactly the same thing so it doesn't matter which). This should prompt for the root password of the device twice, which is 'alpine' by default in firmware versions 1.1 and up. This will need to be done every time you want to sync. (This can be done without having to type the password each time by using SSH keys - see [[Using SSH Keys]] for more information)<br />
<br />
==== The iFuse Way ====<br />
<br />
You will need to install '''usbmuxd''', '''libplist''', '''libimobiledevice''', '''ifuse'''. You can pull in all four with:<br />
# pacman -S ifuse<br />
Now make sure that you have the fuse module loaded by doing <tt>modprobe fuse</tt>, assuming that you don't have it in /etc/rc.conf already.<br />
<br />
You can now mount your device. Make sure it is unlocked before you plug it in, or it won't be recognized.<br />
# ifuse <mountpoint><br />
The mountpoint field is where you want to have it mounted.<br />
<br />
And you're done! You should be able to point your syncing software of choice to the mountpoint and be able to transfer files.<br />
<br />
To unmount your device:<br />
# umount <mountpoint><br />
<br />
You can also try adding this to your udev rules for automounting:<br />
{{File|name=/etc/udev/rules.d/91-iphone-automount.rules|content=<nowiki><br />
#Detect type of iPhoneOS it is<br />
SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/129[13]/*", ENV{INTERFACE}=="255/*", ENV{dir_name}="ipod"<br />
SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/129[024]/*", ENV{INTERFACE}=="255/*", ENV{dir_name}="iphone"<br />
SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[13]", ENV{dir_name}="ipod"<br />
SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[024]", ENV{dir_name}="iphone"<br />
<br />
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[0-9]", RUN+="/bin/mkdir -p '/media/%E{dir_name}'", RUN+="/usr/bin/ifuse '/media/%E{dir_name}' -u '%s{serial}' -o sync,allow_other"<br />
<br />
ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/129[0-9]/*", ENV{INTERFACE}=="255/*", RUN+="/bin/umount -l '/media/%E{dir_name}'", RUN+="/bin/rmdir '/media/%E{dir_name}'"<br />
</nowiki>}}<br />
<br />
=== Unobfuscating the Database ===<br />
<br />
Since firmware version 2.0, Apple has obfuscated the music database. If you are using recent firmware, the file <tt>/System/Library/Lockdown/Checkpoint.xml</tt> can be modified to enable use of the older, non-obfuscated database. Replace:<br />
<key>DBVersion</key><br />
<integer>4</integer><br />
with:<br />
<key>DBVersion</key><br />
<integer>2</integer><br />
Then reboot your device.<br />
<br />
=== Syncing ===<br />
<br />
Use your favourite iPod-compatible program. Individual configuration will vary, but in general, pointing your program to your specified mount point should yield good results.<br />
<br />
After you've synced, run <tt>ipod-touch-umount</tt> (or <tt>iphone-umount</tt>, depending on your taste) to unmount the SSHFS file system and restart the <tt>MobileMusicPlayer</tt> process on the device, so that the new music database is read.<br />
<br />
If you used iFuse, simply type:<br />
# umount <mountpoint><br />
You will still need to reload the MobileMusicPlayer process. If your device is not jailbroken, then you are stuck restarting it.<br />
<br />
=== The iFuse Way - iPhone OS 3.x and 4.x ===<br />
''Warning: this software is considered unstable and should probably not be used in a productive environment''<br />
<br />
Make sure you already installed base-devel, which contains several programs needed to compile your new components. If you did not, just run:<br />
<br />
# pacman -S base-devel<br />
<br />
which will install everything you will need.<br />
<br />
You will need to install {{Package Official|libplist}}, {{Package Official|libimobiledevice}}, {{Package Official|libgpod}}, {{Package Official|usbmuxd}} and {{Package Official|ifuse}}.<br />
<br />
Now make sure that you have the fuse module loaded by doing <tt>modprobe fuse</tt>, assuming that you don't have it in /etc/rc.conf already.<br />
Check if the group "usbmux" has been created and add your user using<br />
# gpasswd -a <user> usbmux<br />
<br />
To make sure the new rules apply, execute<br />
$ udevadm control --reload-rules<br />
and plug in your iPod/iPhone. <br />
<br />
Run as ROOT:<br />
# usbmuxd<br />
Now you should the be able to mount your device by running<br />
$ ifuse ~/ipod<br />
or similar. Make sure the directory used exists and is accessible to your user.<br />
<br />
Mount the device and create the iTunes_Control/Device directory. Then, get your UUID. It should be in the syslog from usbmuxd, or you can find it by running <br />
$ lsusb -v | egrep "iSerial.*[a-f0-9]{40}"<br />
It should be 40 characters long. Then, run <br />
$ ipod-read-sysinfo-extended <uuid> <mountpoint>. <br />
This should generate a file named iTunes_Control/Device/SysInfoExtended.<br />
<br />
Now, start up your favourite app, it should detect the device via libgpod.<br />
I recommend using gtkpod-git for the time being, as that's what the libgpod devs seem to be using for debugging purposes.<br />
<br />
=== Rhythmbox ===<br />
<br />
Rhythmbox uses the Gnome Virtual File System to detect mobile devices. If using the iFuse way, gvfs-afc needs to be installed:<br />
# pacman -S gvfs-afc<br />
<br />
== iPod Classic/Nano3g ==<br />
<br />
You need to set up the iPod to make libgpod able to find its firewire id. For this, you will need to get your firewire id manually<br />
<br />
1) Mount the iPod as a rw mountpoint. In the following example, I will use /mnt/ipod.<br />
<br />
2 ) Find the serial number by typing<br />
<br />
sudo lsusb -v | grep -i Serial <br />
<br />
this should print a 16 character long string like 00A1234567891231 (it will have no colons or hyphens) <br />
<br />
3) Once you have that number, create or edit /mnt/ipod/iPod_Control/Device/SysInfo. Add to that file the line below:<br />
<br />
FirewireGuid: 0xffffffffffffffff<br />
<br />
(replace ffffffffffffffff with the 16 digit string you obtained at the previous step and don't forget the trailing 0x before the string)<br />
<br />
Your iPod can now be managed with amarok or gtkpod.<br />
<br />
== iPod management apps ==<br />
*[http://live.gnome.org/Rhythmbox Rhythmbox]{{Linkrot|2011|09|04}}<br />
**GTK interface (Gnome)<br />
**Is part of the official Gnome projects.<br />
**Fast, light interface.<br />
**Manage music on your computer and iPod<br />
**Download or stream podcasts and video podcasts<br />
**Queue up songs and podcasts<br />
**last.fm integration<br />
**Live radio stations<br />
**Jamendo and Magnatune support<br />
**Audio CD burning<br />
**Album cover display<br />
**Song lyrics display<br />
**DAAP sharing<br />
<br />
*[http://banshee.fm Banshee]<br />
**GTK interface (Gnome)<br />
**Uses Mono so it is slower and more resource hogging than rhythmbox<br />
**Device Sync: Sync your music and videos to your Android, iPod, or other device - or import its media<br />
**Podcasts: Download or stream podcasts and video podcasts<br />
**Play Queue: Queue up songs, videos, and podcasts, or let the Auto DJ take over<br />
**Shuffle Modes: Shuffle (or Auto DJ) by artist, album, rating, or even songs' acoustic similarity<br />
**Album Art: Artwork is automatically fetched as you listen<br />
**Powerful Search, Smart Playlists: Find exactly what you want, fast<br />
**Video Support: All the power of Banshee, now for your videos<br />
<br />
*[http://www.yamipod.com Yamipod]<br />
**GTK interface (Gnome)<br />
**super lightweight app for managing ONLY music on your iPod (not on your computer)<br />
**easy ratings edit<br />
**PC to iPod synchronization<br />
**News RSS and podcasts to iPod upload<br />
**Last.fm support <br />
**playlist support<br />
<br />
*[http://www.gtkpod.org gtkpod]<br />
**GTK interface (Gnome)<br />
**Read your existing iTunesDB (i.e. import the existing contents of your iPod including playcounts, ratings and on-the-go playlists).<br />
**Add MP3, WAV, M4A (non-protected AAC), M4B (audio book), podcasts, and various video files (single files, directories or existing playlists) to the **iPod. You need a third party product to download podcasts, like 'bashpodder' or 'gpodder'<br />
**View, add and modify Cover Art<br />
**Browse the contents of your local harddisk by album/artist/genre by adding all your songs to the 'local' database. From there the tracks can be **dragged over to the iPod/Shuffle easily.<br />
**Create and modify playlists, including smart playlists.<br />
**You can choose the charset the ID3 tags are encoded in from within gtkpod. The default is the charset currently used by your locale setting.<br />
**Extract tag information (artist, album, title...) from the filename if you supply a template.<br />
**Detect duplicates when adding songs (optional).<br />
**Remove and export tracks from your iPod.<br />
**Modify ID3 tags -- changes are also updated in the original file (optional).<br />
**Refresh ID3 tags from file (if you have changed the tags in the original file).<br />
**Sync directories.<br />
**Normalize the volume of your tracks (uses mp3gain or the replay-gain tag)<br />
**Write the updated iTunesDB and added songs to your iPod.<br />
**Work offline and synchronize your new playlists / songs with the iPod at a later time.<br />
**Export your korganizer/kaddressbook/thunderbird/evocalendar/evolution/webcalendar... data to the iPod (scripts for other programs can be added).<br />
<br />
*[http://www.floola.com Floola]<br />
**GTK interface (Gnome)<br />
<br />
*[http://amarok.kde.org/ Amarok]<br />
**KDE/qt interface<br />
<br />
*[http://qpod.sourceforge.net qPod]<br />
**KDE/qt interface<br />
**frontend for GNUpod<br />
<br />
*[http://www.gnu.org/software/gnupod/ GNUpod]<br />
**command-line only<br />
<br />
== See also ==<br />
<br />
http://help.ubuntu.com/community/PortableDevices/iPhone for more information about iPhone/iPod Touch support</div>Hinrichhttps://wiki.archlinux.org/index.php?title=Open_Sound_System&diff=124231Open Sound System2010-12-06T19:02:20Z<p>Hinrich: </p>
<hr />
<div>[[Category:Sound (English)]]<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|OSS}}<br />
<br />
This article will show you how to install and configure the '''O'''pen '''S'''ound '''S'''ystem (OSS) on you computer.<br />
<br />
The [http://en.wikipedia.org/wiki/Open_Sound_System Open Sound System] is an alternative sound architecture for Unix-like and POSIX-compatible systems. OSS version 3 was the original sound system for Linux and is in the kernel but was superceded by ALSA in 2002 when OSS version 4 became proprietary software. OSSv4 became free software again in 2007 when [http://www.opensound.com/ 4Front Technologies] released its source code and provided it under the GPL license.<br />
<br />
== Comparisons with ALSA ==<br />
<br />
Some advantages and disadvantages compared to using the Advanced Linux Sound Architecture.<br />
<br />
=== OSS Advantages (users) ===<br />
<br />
* Includes a transparent software mixer (vmix in kernel space). Having a transparent software mixer means that multiple applications can access the sound device at the same time.<br />
* Control for each application sound volume.<br />
* Some legacy cards are supported better (e.g. Creative X-Fi).<br />
* Initial response time in sound applications is usually better.<br />
* Better support for applications that use the OSS API. Many applications still use this API, and do not require an emulation layer like ALSA uses.<br />
<br />
=== OSS Advantages (developers) ===<br />
<br />
* Cleaner and easier to use API, and better API [http://manuals.opensound.com/developer documentation].<br />
* Support for drivers in userspace.<br />
* Accesibility. OSS runs on BSDs and Solaris.<br />
* Portability. OSS is [http://revolf.free.fr/Alchimie-7/Alchimie7_OSS_Haiku.en.pdf easier] to port to other operating systems.<br />
<br />
=== ALSA Advantages ===<br />
<br />
* Better support for USB audio devices. With OSS output is experimental, input is not implemented.<br />
* Support for Bluetooth audio devices.<br />
* Support for AC'97 and HDAudio dial-up soft-modems such as Si3055.<br />
* Better support for MIDI devices. With OSS you'll have to use a software synthesizer such as Timidity or Fluidsynth.<br />
* Support for suspend. OSS and associated programs will need to be closed first.<br />
* Better support for jack detection. On some HD motherboards users will need to turn down the speaker volume when plugging in their earphones.<br />
<br />
== Install ==<br />
<br />
Install OSS by running:<br />
<br />
# pacman -S oss<br />
<br />
This will install the OSS files and run the OSS install script that will temporarily disable the ALSA modules, and install the OSS kernel modules. Since ALSA is enabled by default in the boot scripts, you need to disable it for it not to conflict with OSS when booting. You can do this by editing {{Filename|rc.conf}} and adding:<br />
<br />
MODULES=(!soundcore ...<br />
<br />
Then add OSS to the daemon array:<br />
<br />
DAEMONS=(crond hal @oss...<br />
<br />
If your user is not part of the audio group, add your user by:<br />
<br />
# gpasswd -a username audio<br />
<br />
Then start OSS by:<br />
<br />
# /etc/rc.d/oss start<br />
<br />
In the case OSS is not able to detect your card when starting it, run:<br />
<br />
# ossdetect -v<br />
<br />
Then {{Codeline|soundoff && soundon}} to reactivate it.<br />
<br />
== Testing ==<br />
<br />
Beware the default volume is very loud, avoid using earphones and physically lower the volume of your speakers (if possible) before running the test.<br />
<br />
'''Test OSS by running:'''<br />
<br />
$ osstest<br />
<br />
You should be able to hear music during the test process. If there is no audio, try to adjust the volume or refer to the troubleshooting section.<br />
<br />
If you want to hear sounds from more than one application simultaneously, you need vmix, OSS's software mixer. <br />
<br />
'''Check that vmix is enabled by running:'''<br />
<br />
$ ossmix -a | grep -i vmix<br />
<br />
You should see a line like 'vmix0-enable ON|OFF (currently ON)'. If you don't see any lines beginning with 'vmix', it probably means that vmix hasn't been attached to your sound device. To attach vmix, issue the command<br />
<br />
$ vmixctl attach device<br />
<br />
where ''device'' is your sound device, eg., /dev/oss/oss_envy240/pcm0 .<br />
<br />
To avoid having to issue this command manually in the future, you can add it to /usr/lib/oss/soundon.user, as suggested at http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Changing_the_default_sound_output .<br />
<br />
If you get "Device or resource busy" error, you need to add "vmix_no_autoattach=1" in /usr/lib/oss/conf/osscore.conf, and then reboot. <br />
<br />
'''See which devices are detected by running:'''<br />
<br />
$ ossinfo<br />
<br />
You should be able to see your devices listed under Device objects or Audio Devices. If the device that you want to use is not at the top on Audio devices or Device objects sections, /usr/lib/oss/etc/installed_drivers needs to be edited. The driver for the device that needs to be used should be at the very top. A soundoff, soundoff is probably required. If this does not work, comment all drivers listed that are not your preferred device.<br />
<br />
== Volume Control ==<br />
<br />
To control the volume of various devices, mixers levels will need to be set. The command line mixer is called {{Codeline|ossmix}}. It's very like the BSD audio mixer (mixerctl). The graphical mixer is called {{Codeline|ossxmix}} and will require {{Package Official|gtk2}} to be installed.<br />
<br />
The basic <tt>ossxmix</tt> controls:<br />
<br />
<pre><br />
/ High Definition Audio ALC262 \ --------------------------------> 1<br />
/________________________________\________________________________<br />
| \<br />
| [x] vmix0-enable [vmix0-rate: 48.000kHz] vmix0-channels |--> 2<br />
| [ Stereo [v] ] |<br />
| |<br />
| __codec1______________________________________________________ |<br />
| | _jack______________________________________________________ ||--> 3<br />
| | | _int-speaker_________________ _green_________________ |||<br />
| | | | | | | |||<br />
| | | | _mode_____ | | | | _mode_____ | | | |||<br />
| | | | [ mix [v] ] o o [x] [ ]mute | | [ mix [v] ] o o [x] | |||<br />
| | | | | | | | | | | |||<br />
| | | |_____________________________| |_______________________| |||<br />
| | |___________________________________________________________|||<br />
| |______________________________________________________________||<br />
| ___vmix0______________________________________________________ |<br />
| | __mocp___ O O _firefox_ O O __pcm7___ O O | |--> 4<br />
| | | | O O | | x x | | O O | |<br />
| | | | | | x O | | | | x x | | | | O O | |<br />
| | | o o [x] | x x | o o [x] | x x | o o [x] | O O | |<br />
| | | | | | x x | | | | x x | | | | O O | |<br />
| | |_________| x x |_________| x x |_________| O O | |<br />
| |_____________________________________________________________| |<br />
|_________________________________________________________________|<br />
</pre><br />
<br />
# One tab for each sound card<br />
# The vmix (virtual mixer) special configurations appear at the top. These include sampling rate and mixer priority.<br />
# These are your sound card jack configurations (input and output). Every mixer control that is shown here is provided by your sound card.<br />
# Application vmix mixer controls and sound meters. If the application isn't actively playing a sound it will be labeled pcm08, pcm09..., when the application is playing the application name will be shown.<br />
<br />
=== Color Definitions ===<br />
<br />
For high definition (HD) audio, {{Codeline|ossxmix}} will color jack configurations by their pre-defined jack colors:<br />
<br />
{| style="border: 1px solid #CCCCCC; background-color: #dddddf"<br />
! Color<br />
! Type<br />
! Connector<br />
|- style=color:black;background:lightgreen<br />
|green<br />
| front channels (stereo output)<br />
| 3.5mm TRS<br />
|- style=color:white;background:black <br />
|black<br />
| rear channels (stereo output)<br />
| 3.5mm TRS<br />
|- style=color:white;background:gray<br />
|grey<br />
| side channels (stereo output)<br />
|3.5mm TRS<br />
|- style=color:black;background:gold<br />
|gold<br />
| center and subwoofer (dual output)<br />
|3.5mm TRS<br />
|- style=color:black;background:lightblue<br />
|blue<br />
| line level (stereo input)<br />
|3.5mm TRS<br />
|- style=color:black;background:pink <br />
|pink<br />
| microphone (mono input)<br />
|3.5mm TS<br />
|}<br />
<br />
=== Saving Mixer Levels ===<br />
<br />
Mixer levels are saved when you shut off your computer. If you want to save the mixer level immediately, as root:<br />
<br />
# savemixer<br />
<br />
{{Codeline|savemixer}} can be used to write mixer levels to a file with the {{Codeline|-f}} switch and restore by the {{Codeline|-L}} switch.<br />
<br />
=== Other Mixers ===<br />
<br />
Other mixers that have support for OSS:<br />
<br />
* GNOME - Gnome volume control<br />
* KDE - Kmix - OSS support is being developed.<br />
<br />
==Configuring Applications for OSS==<br />
<br />
===Skype===<br />
<br />
The <tt>skype</tt> package only includes support for ALSA. To get an OSS-capable Skype, install the <tt>skype-oss</tt> package:<br />
<br />
# pacman -S skype-oss<br />
<br />
If you are using x86_64, you can get the [http://aur.archlinux.org/packages.php?ID=18312 bin32-skype-oss] package from AUR.<br />
<br />
===Wine===<br />
<br />
* Run <tt>winecfg</tt>.<br />
<br />
$ winecfg<br />
<br />
* Go to the <tt>Audio</tt> tab.<br />
<br />
* Select <tt>OSS Driver</tt>.<br />
<br />
===Gajim===<br />
By default Gajim uses {{Codeline|aplay -q}} to play a sound. To change this go in Advanced Settings and search for the {{Codeline|soundplayer}} variable. The ossplay program included in the oss package is a good replacement:<br />
<br />
{{Codeline|ossplay -qq}}<br />
<br />
===MOC===<br />
<br />
To use MOC with OSS v4.1 you must change section OSSMixerDevice to OSSMixerDevice==/dev/ossmix in your config (located in /home/yourusername/.moc).<br />
And now MOC should work with OSS v4.1.<br />
Or you can compile moc-svn package from AUR (he got support for new vmix).<br />
For issue with interface change OSSMixerChannel===to OSSMixerChannel===Any channel and after start mocp press w (change to sofware mixex) that will help and you can change the volume power.<br />
<br />
===Applications that use Gstreamer===<br />
<br />
Remove pulseaudio and gstreamer*-pulse programs and libraries.<br />
<br />
To change the gstreamer setting to output the sound to OSS instead of the default ALSA, run:<br />
<br />
gstreamer-properties<br />
<br />
Change the '''Default Output''' plugin to custom and the change the pipeline to:<br />
<br />
oss4sink<br />
<br />
For the input:<br />
<br />
oss4src<br />
<br />
{{Note|It's not certain that the input will sound better with oss4src compared to osssrc, so change this only if it improves your input sound. < confirmation on this please >}}<br />
<br />
{{Note|For some applications (e.g. Rhythmbox, Totem) the gstreamer-properties have no effect, as they rely on "musicaudiosink" instead of "audiosink" (which is modified by gstreamer-properties). Workaround: Set audiosink with gstreamer-properties and use gconf-editor to copy the value of "/system/gstreamer/0.10/default/audiosink" to "musicaudiosink" (at the same location) }}<br />
<br />
If you are using phonon with the gstreamer backend you will need to set the environmental variable. To add to your current user:<br />
<br />
export PHONON_GST_AUDIOSINK=oss4sink<br />
<br />
Add this to your {{Filename|~/.bashrc}} to be loaded on login.<br />
<br />
===Firefox >=3.5===<br />
<br />
Firefox 3.5 introduces the <video> and <audio> tag support and can play ogg media out of the box. However, it currently can't be compiled with ALSA and OSS support at the same time. So you need to install the [http://aur.archlinux.org/packages.php?ID=28110 xulrunner-oss] package.<br />
<br />
1. Stop firefox.<br />
2. Remove the xulrunner package without dependency check: sudo pacman -Rd xulrunner<br />
3. Install xulrunner-oss package from AUR or [http://wiki.archlinux.org/index.php/ABS ABS].<br />
4. Start firefox.<br />
<br />
===Mplayer===<br />
<br />
If you are using gui (smplayer etc.) you will find the oss output at the audio settings. Using on cli you should specify the sound output: mplayer -ao oss /some/file/to/play.mkv If you don't want to brother typing it over and over again add "ao=oss" to your config file. (/home/$USER/.mplayer/config)<br />
<br />
===Music Player Daemon===<br />
<br />
MPD is configured through /etc/mpd.conf or ~/.mpdconf. Check both of these files, looking for something that looks like:<br />
<br />
audio_output {<br />
type "alsa"<br />
name "Some Device Name"<br />
}<br />
<br />
If you find an uncommented (the lines do not begin with #'s) ALSA configuration like the one above, comment all of it out, or delete it, and add the following:<br />
<br />
audio_output {<br />
type "oss"<br />
name "My OSS Device"<br />
}<br />
<br />
{{Note|I had to put this configuration in my ~/.mpdconf for it to work properly, but it ought to work in /etc/mpd.conf as well.}}<br />
Further configuration might not be necessary for all users. However, if you experience issues (in that MPD doesn't work properly after it's been restarted), or if you like having specific (i.e. more user-configured, less auto-configured) config files, the audio output for OSS can be more specifically configured as follows: First, run:<br />
<br />
ossinfo | grep /dev/dsp<br />
<br />
Look for the line that says something similar to {{Codeline|/dev/dsp -> /dev/oss/<SOME_CARD_IDENTIFIER>/pcm0}}. Take note of what your <SOME_CARD_IDENTIFIER> is, and add bolded lines to your OSS audio output in your mpd config file:<br />
<br />
audio_output {<br />
type "oss"<br />
name "My OSS Device"<br />
'''device "/dev/oss/<SOME_CARD_IDENTIFIER>/pcm0"'''<br />
'''mixer_device "/dev/oss/<SOME_CARD_IDENTIFIER>/mix0"'''<br />
}<br />
<br />
===Other applications===<br />
<br />
* If you can't get sound from an application not listed here, try looking at the [http://www.4front-tech.com/wiki/index.php/Configuring_Applications_for_OSSv4 Configuring Applications for OSSv4] page.<br />
* Search OSS specific packages by using {{Codeline|pacman -Ss -- '-oss'}} and [http://aur.archlinux.org/packages.php?K=-oss&start=0&PP=100| in AUR].<br />
<br />
==Troubleshooting==<br />
<br />
===Troubleshooting HDAudio devices===<br />
<br />
====Understanding why problems arise====<br />
<br />
If you have a HDAudio sound device, it's very likely that you will have to adjust some mixer settings before your sound works.<br />
<br />
HDAudio devices are very powerful in the sense that they can contain a lot of small circuits (called ''widgets'') that can be adjusted by software at any time. These controls are exposed to the mixer, and they can be used, for example, to turn the earphone jack into a sound input jack instead of a sound output jack.<br />
<br />
However, there is a side effect, mainly because the HDAudio standard is more flexible than it perhaps should be, and because the vendors often only care to get their ''official drivers'' working.<br />
<br />
Then, when using HDAudio devices, you often find disorganized mixer controls, that doesn't work at all by default, and you are forced to try every mixer control combination, until it works.<br />
<br />
====How to solve====<br />
<br />
Open <tt>ossxmix</tt> and try to change every mixer control in the ''middle area'', that contains the sound card specific controls, as explained in the previous "[[OSS#The_mixer|The mixer]]" section.<br />
<br />
You'll probably want to setup a program to record/play continously in the background (e.g. {{Codeline|ossrecord - | ossplay -}} for recording or {{Codeline|osstest -lV}} for playing), while changing mixer settings in ossxmix in the foreground.<br />
<br />
* Raise every volume control slider.<br />
* In each option box, try to change the selected option, trying all the possible combinations.<br />
* If you get noise, try to lower and/or mute some volume controls, until you find the source of the noise.<br />
<br />
Please note again that you do '''not''' need to change any controls in the ''top area'' nor in the ''bottom area'', as they are virtual <tt>vmix</tt>-related mixer controls.<br />
<br />
* Editing {{Codeline|/usr/lib/oss/conf/oss_hdaudio.conf}} uncommenting and changing ''hdaudio_noskip=0'' to a value from 0-7 can give you more jack options in ossxmix<br />
I had to edit mine to ''hdaudio_noskip=7'' for my sub/rear speaker to work on my laptop, restart oss for the changes to take effect {{Codeline|/etc/rc.d/oss restart}}<br />
<br />
===MMS sound cracking in totem===<br />
If your stream sounds with cracks or strange noise in totem like it did with me then you could try to play it with another backend like ffmpeg (mplayer). That "fixed" the issue for me. This will not fix the issue that somehow pops up in gstreamer when playing MMS streams but it will give you the option to play it with good sound quality. Playing it in mplayer is simple:<br />
# mplayer mmsh://yourstreamurl<br />
<br />
===Microphone playing through output channels===<br />
<br />
OSS by default plays back the microphone through the speakers. To disable this in ossxmix find the misc section. Check off every "input-mix-mute" to disable this.<br />
<br />
===Troubleshooting other issues===<br />
<br />
* If you get distorted sound, try lowering some volume control sliders.<br />
<br />
* If you need to change the default sound card, look at [http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Changing_the_default_sound_output here].<br />
<br />
* If you have another issues, try searching or asking for help at the [http://www.4front-tech.com/forum 4front forums].<br />
<br />
==Tips and tricks==<br />
<br />
===Using multimedia keys with OSS===<br />
An easy way to mute/unmute and increase/decrease the volume is to use the [http://www.opensound.com/wiki/index.php/Tips_And_Tricks#ossvol {{Codeline|ossvol}} script] available in [[AUR]].<br />
<br />
Once you installed it try to toggle the sound:<br />
$ ossvol -t<br />
<br />
Type {{Codeline|ossvol -h}} for the other commands.<br />
<br />
If you don't know how to assign commands to your multimedia keys, see [[Extra Keyboard Keys]].<br />
<br />
==={{Codeline|ossvol}} troubleshooting===<br />
If you get an error like:<br />
Bad mixer control name(987) 'vol'<br />
you need to edit the script ({{Filename|/usr/bin/ossvol}}) and change the value of the {{Codeline|CHANNEL}} variable which is at the beginning of the script. For example mine is {{Codeline|CHANNEL<nowiki>=</nowiki>"vmix0-outvol"}}.<br />
<br />
*'''Note''' if you are using xbindkeys for your multimedia keys adding this<br />
"ossmix vmix0-outvol -- +1"<br />
raise volume<br />
"ossmix vmix0-outvol -- -1"<br />
lower volume<br />
<br />
to the raise/lower volume section of your .xbindkeysrc file is an easy way to adjust the volume<br />
<br />
===Changing the Sample Rate===<br />
<br />
Changing the output sample rate is not obvious at first. Sample rates can only be changed by the superuser and vmix must be unused by any programs when a change is requested. Before you follow any of these steps, ensure you are going through a receiver/amplifier and using quality speakers and not simply computer speakers. If you are only using computer speakers, don't bother changing anything here as you won't notice a difference.<br />
<br />
By default the sample rate is 48000hz. There are several conditions in which you may want to change this. This all depends on your usage patterns. You want the sample rate you are using to match the media you use the most. If your computer has to change the sampling rate of the media to suit the hardware it is likely, though not guaranteed that you will have a loss in audio quality. This is most noticable in downsampling (ie. 96000hz &rarr; 48000hz). There is an article about this issue in [http://www.stereophile.com/news/121707lucky/ "Stereophile"] which was [http://lists.apple.com/archives/coreaudio-api/2008/Jan/msg00272.html discussed] on Apple's "CoreAudio API" mailing list if you wish to learn more about this issue. <br />
<br />
Some example sample rates:<br />
<br />
* 44100hz - Sample rate of standard [http://en.wikipedia.org/wiki/Red_Book_%28audio_CD_standard%29 Red Book] audio cds.<br />
* 88000hz - Sample rate of [http://en.wikipedia.org/wiki/Super_Audio_CD SACD] high definition audio discs/downloads. It is rare that your motherboard will support this sample rate.<br />
* 96000hz - Sample rate of most high definition audio downloads. If your motherboard is an [http://en.wikipedia.org/wiki/AC%2797 AC'97] motherboard, this is likely to be your highest bitrate.<br />
* 192000hz - Sample rate of BluRay, and some (very few) high definition downloads. Support for external audio reciever equipment is limited to high end audio. Not all motherboards support this. An example of a motherboard chipset that would support this includes [http://en.wikipedia.org/wiki/Intel_High_Definition_Audio Intel HDA audio]. <br />
<br />
To check what your sample rate is currently set to:<br />
<br />
# Run <code>"ossmix | grep rate"</code>. <br />
<br />
You are likely to see <code>"vmix0-rate <decimal value> (currently 48000) (Read-only)"</code>.<br />
<br />
If you do not see a "vmix0-rate" (or "vmix1-rate", etc.) being outputted, than it probably means that vmix is disabled. In that case, OSS will use the rate requested by the program which uses the device, so this section doesn't apply. Exception: envy24(ht) cards have a setting envy24.rate which has a similiar function (see "oss_envy24" manpage). You can follow these steps, but at step 2, change with ossmix the value of "envy24.rate" as well.<br />
<br />
Steps to affect the change:<br />
<br />
# First, make sure your card is able to use the new rate. Run "ossinfo -v2" and see if the wanted rate is in the "Native sample rates" output.<br />
# As root, run <code>"/usr/lib/oss/scripts/killprocs.sh"</code>. Be aware, this will close any program that currently has an open sound channel (examples being media players, Firefox as of 3.5 if you have xulrunner-oss installed, and the gnome volume control).<br />
# After all programs occupying vmix are terminated, run as root: <code>"vmixctl rate /dev/dsp 96000"</code> replacing the rate with your desired sample rate.<br />
# Run <code>"ossmix | grep rate"</code> and check for <code>"vmix0-rate <decimal value> (currently 96000) (Read-only)"</code> to see if you were successful.<br />
#''' Make changes permanent''' use the soundon.user file to set the rate for every soundon<br />
write <code>"vmixctl rate /dev/dsp 96000" in the file /usr/lib/oss/soundon.user</code> and make it executable.<br />
<br />
===Changing the Default Sound Output===<br />
<br />
When running osstest, the first test passes for the first channel, but not for the stereo or right channel, it sounds distorted/hisses. If this is what your sound is like, then it's set to the wrong output.<br />
<br />
*** Scanning sound adapter #-1 ***<br />
/dev/oss/oss_hdaudio0/pcm0 (audio engine 0): HD Audio play front<br />
- Performing audio playback test... <br />
<left> OK <right> OK <stereo> OK <measured srate 47991.00 Hz (-0.02%)> <br />
<br />
The left sounded good, the right and stereo were the distorted ones.<br />
<br />
Let the test continue until you get a working output:<br />
/dev/oss/oss_hdaudio0/spdout0 (audio engine 5): HD Audio play spdif-out <br />
- Performing audio playback test... <br />
<left> OK <right> OK <stereo> OK <measured srate 47991.00 Hz (-0.02%)> <br />
<br />
If this passed the test on all left, right and stereo, proceed to next step.<br />
<br />
So from here:<br />
[http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Changing_the_default_sound_output Changing_the_default_sound_output]<br />
you get the command to change the default output; change according to what works for you<br />
sudo ln -sf /dev/oss/oss_hdaudio0/spdout0 /dev/dsp_multich<br />
With 5.1 surround, chose dsp_multichannel; with 2 channel, dsp should work.<br />
<br />
===Creative Sound Blaster X-Fi Surround 5.1 SB1090 USB===<br />
<br />
This information is completely from [http://www.4front-tech.com/forum/viewtopic.php?f=3&t=3423 4front-tech.com] ; courtesy of kristian and Maxa. Thanks!!<br />
<br />
It's surprising to learn that the external card does not work just because of a missing true return value in the function write_control_value(...) in ossusb_audio.c.<br />
<br />
To fix this, a recompile of oss is nessasary, for now.<br />
<br />
1. Grab the latest oss from the Arch Repo<br />
http://repos.archlinux.org/wsvn/community/oss/repos/community-x86_64/<br />
<br />
2. Extract it<br />
<br />
3. cd to the folder, I renamed the folder to oss<br />
<br />
4. run makepkg --nobuild<br />
<br />
5. cd to src/kernel/drv/oss_usb/ ; '''edit the ossusb_audio.c''' ; '''add a Return 1''' ; should look like so and '''SAVE'''<br />
static int<br />
write_control_value (ossusb_devc * devc, udi_endpoint_handle_t * endpoint,<br />
int ctl, int l, unsigned int v)<br />
{<br />
return 1;<br />
<br />
6. cd to src/kernel/setup and edit srcconf_linux.inc, search for -Werror and remove it, otherwise OSS will not compile.<br />
<br />
7. do a makepkg --noextract<br />
<br />
Now you must install the package with pacman -U ; remove oss first if already installed <nowiki>(pacman -Rd oss)</nowiki><br />
<br />
===A simple systray applet===<br />
Want a applet to control volume like in GNOME? From [http://bbs.archlinux.org/viewtopic.php?id=77440 here] I got a usable [http://pastebin.furver.se/0xflchkfz/ one]. <br />
<br />
Download [http://pastebin.furver.se/0xflchkfz/0xflchkfz.txt this] script and rename whatever you want, e.g.: ossvolctl. run the following command:<br />
$chmod +x ossvolctl<br />
#cp ossvolctl /usr/bin/ossvolctl<br />
or<br />
#install -Dm755 ossvolctl /usr/bin/ossvolctl<br />
<br />
===Start ossxmix docked to systray on startup===<br />
<br />
'''KDE 4'''<br />
<br />
Create an application launcher file named <code>ossxmix.desktop</code> in you local application launchers directory (<code>~/.local/share/applications/</code> then enter:<br />
<br />
<pre>[Desktop Entry]<br />
Name=Open Sound System Mixer<br />
GenericName=Audio Mixer<br />
Exec=ossxmix -b<br />
Icon=audio-card<br />
Categories=Application;GTK;AudioVideo;Player;<br />
Terminal=false<br />
Type=Application<br />
Encoding=UTF-8</pre><br />
<br />
To add it to autostart when loading the desktop environment:<br />
<br />
System Settings > Advanced tab > Autostart. Then click add program and choose it from the 'Multimedia' list.<br />
<br />
'''Gnome''' <br />
<br />
*As Root create a file /usr/local/bin/ossxmix_bg with the following content:<br />
<br />
<pre><br />
#!/bin/bash<br />
exec /usr/bin/ossxmix -b<br />
</pre><br />
<br />
Goto System > Preferences > Start Up Applications<br />
<br />
*Click Add, Type OSSMIX in Name field and <code>/usr/local/bin/ossxmix_bg</code> in Command field then click Add button.<br />
<br />
*Login and Logout to see the changes.<br />
<br />
===Record sound output from a program===<br />
<br />
* [http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Recording_sound_output_of_a_program Recording sound output of a program].<br />
<br />
===Suspend and Hibernation===<br />
<br />
OSS does not automatically support suspend meaning that OSS must be manually stopped prior to suspending or hibernating.<br />
<br />
OSS provides <tt>soundon</tt> and <tt>soundoff</tt> to enable and disable OSS, although any processes that use sound must be terminated first.<br />
<br />
The following script is a rather basic method of automatically unloading OSS prior to suspending and reloading afterwards.<br />
<br />
#!/bin/sh<br />
. "${PM_FUNCTIONS}"<br />
<br />
suspend_osssound()<br />
{<br />
/usr/lib/oss/scripts/killprocs.sh<br />
/usr/sbin/soundoff<br />
}<br />
<br />
resume_osssound()<br />
{<br />
/usr/sbin/soundon<br />
}<br />
<br />
case "$1" in<br />
hibernate|suspend)<br />
suspend_osssound<br />
;;<br />
thaw|resume)<br />
resume_osssound<br />
;;<br />
*) exit $NA<br />
;;<br />
esac<br />
<br />
Save the contents of the script (as root) into {{Filename|/etc/pm/sleep.d/50ossound}} and make it executable. {{Filename| chmod a+x /etc/pm/sleep.d/50ossound}}<br />
<br />
{{Note|This script is rather basic and will terminate any application directly accessing OSS, save your work prior to suspending/hibernating.}}<br />
<br />
OSS does not support suspending but we don't care or better [[Suspend_to_RAM|s2ram]] works fine without stopping OSS.<br />
Just create a nice suspend script to /sbin/suspend and make it executable.<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
if [ [ $EUID -ne 0 ] ]; then<br />
## Checking if you are a root or not<br />
echo "This script must be run as root" 1>&2<br />
exit 1<br />
fi<br />
<br />
s2ram -f<br />
<br />
sleep 2<br />
<br />
/etc/rc.d/oss restart 2>/tmp/oss.txt<br />
<br />
if [ $? -gt 0 ]; then<br />
echo "OSS restart failed check /tmp/oss.txt for advice"<br />
fi<br />
<br />
exit 0<br />
</pre><br />
<br />
That's all your apps are fine and suspend works. \o/<br />
<br />
{{Note | If you are using Opera you must kill operapluginwrapper before suspend. To do this add '''<nowiki>PID=`pidof operapluginwrapper`;kill -9 $PID</nowiki>''' before s2ram -f. }}<br />
<br />
===ALSA emulation===<br />
You can instruct <tt>alsa-lib</tt> to use OSS as its audio output system. This works as a sort of ALSA emulation.<br />
<br />
Note, however, that this method may introduce additional latency in your sound output, and that the emulation is not complete and doesn't work with all applications. It doesn't work, for example, with programs that try to detect devices using ALSA.<br />
<br />
So, as most applications support OSS directly, use this method only as a last resort.<br />
<br />
In the future, more complete methods may be available for emulating ALSA, such as <tt>libsalsa</tt> and <tt>cuckoo</tt>.<br />
<br />
====Instructions====<br />
<br />
* Install the <tt>alsa-plugins</tt> package.<br />
<br />
# pacman -S alsa-plugins<br />
<br />
* Edit {{Filename|/etc/asound.conf}} as follows.<br />
<br />
pcm.oss {<br />
type oss<br />
device /dev/dsp<br />
}<br />
<br />
pcm.!default {<br />
type oss<br />
device /dev/dsp<br />
}<br />
<br />
ctl.oss {<br />
type oss<br />
device /dev/mixer<br />
}<br />
<br />
ctl.!default {<br />
type oss<br />
device /dev/mixer<br />
}<br />
<br />
{{Note | If you don't want to use OSS anymore, don't forget to revert changes that you do here in {{Filename|/etc/asound.conf}}.}}<br />
<br />
==Experimental packages==<br />
<br />
===Mercurial repository version===<br />
<br />
There is a [http://aur.archlinux.org/packages.php?ID=21126 oss-mercurial package] in AUR. This package compiles and installs the latest OSS development version direcly from the Mercurial repository.<br />
<br />
You can try this package if you want to contribute code to OSS or if only a very recent change in OSS code introduced support to your sound device.<br />
<br />
If you want oss to take care of your flash sound (as well as the sound in Adobe-Air applications) you will need to install libflashsupport:<br />
<br />
# pacman -S libflashsupport</div>Hinrichhttps://wiki.archlinux.org/index.php?title=Open_Sound_System&diff=124230Open Sound System2010-12-06T19:01:33Z<p>Hinrich: </p>
<hr />
<div>[[Category:Sound (English)]]<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|OSS}}<br />
<br />
This article will show you how to install and configure the '''O'''pen '''S'''ound '''S'''ystem (OSS) on you computer.<br />
<br />
The [http://en.wikipedia.org/wiki/Open_Sound_System Open Sound System] is an alternative sound architecture for Unix-like and POSIX-compatible systems. OSS version 3 was the original sound system for Linux and is in the kernel but was superceded by ALSA in 2002 when OSS version 4 became proprietary software. OSSv4 became free software again in 2007 when [http://www.opensound.com/ 4Front Technologies] released its source code and provided it under the GPL license.<br />
<br />
== Comparisons with ALSA ==<br />
<br />
Some advantages and disadvantages compared to using the Advanced Linux Sound Architecture.<br />
<br />
=== OSS Advantages (users) ===<br />
<br />
* Includes a transparent software mixer (vmix in kernel space). Having a transparent software mixer means that multiple applications can access the sound device at the same time.<br />
* Control for each application sound volume.<br />
* Some legacy cards are supported better (e.g. Creative X-Fi).<br />
* Initial response time in sound applications is usually better.<br />
* Better support for applications that use the OSS API. Many applications still use this API, and do not require an emulation layer like ALSA uses.<br />
<br />
=== OSS Advantages (developers) ===<br />
<br />
* Cleaner and easier to use API, and better API [http://manuals.opensound.com/developer documentation].<br />
* Support for drivers in userspace.<br />
* Accesibility. OSS runs on BSDs and Solaris.<br />
* Portability. OSS is [http://revolf.free.fr/Alchimie-7/Alchimie7_OSS_Haiku.en.pdf easier] to port to other operating systems.<br />
<br />
=== ALSA Advantages ===<br />
<br />
* Better support for USB audio devices. With OSS output is experimental, input is not implemented.<br />
* Support for Bluetooth audio devices.<br />
* Support for AC'97 and HDAudio dial-up soft-modems such as Si3055.<br />
* Better support for MIDI devices. With OSS you'll have to use a software synthesizer such as Timidity or Fluidsynth.<br />
* Support for suspend. OSS and associated programs will need to be closed first.<br />
* Better support for jack detection. On some HD motherboards users will need to turn down the speaker volume when plugging in their earphones.<br />
<br />
== Install ==<br />
<br />
Install OSS by running:<br />
<br />
# pacman -S oss<br />
<br />
This will install the OSS files and run the OSS install script that will temporarily disable the ALSA modules, and install the OSS kernel modules. Since ALSA is enabled by default in the boot scripts, you need to disable it for it not to conflict with OSS when booting. You can do this by editing {{Filename|rc.conf}} and adding:<br />
<br />
MODULES=(!soundcore ...<br />
<br />
Then add OSS to the daemon array:<br />
<br />
DAEMONS=(crond hal @oss...<br />
<br />
If your user is not part of the audio group, add your user by:<br />
<br />
# gpasswd -a username audio<br />
<br />
Then start OSS by:<br />
<br />
# /etc/rc.d/oss start<br />
<br />
In the case OSS is not able to detect your card when starting it, run:<br />
<br />
# ossdetect -v<br />
<br />
Then {{Codeline|soundoff && soundon}} to reactivate it.<br />
<br />
== Testing ==<br />
<br />
Beware the default volume is very loud, avoid using earphones and physically lower the volume of your speakers (if possible) before running the test.<br />
<br />
'''Test OSS by running:'''<br />
<br />
$ osstest<br />
<br />
You should be able to hear music during the test process. If there is no audio, try to adjust the volume or refer to the troubleshooting section.<br />
<br />
If you want to hear sounds from more than one application simultaneously, you need vmix, OSS's software mixer. <br />
<br />
'''Check that vmix is enabled by running:'''<br />
<br />
$ ossmix -a | grep -i vmix<br />
<br />
You should see a line like 'vmix0-enable ON|OFF (currently ON)'. If you don't see any lines beginning with 'vmix', it probably means that vmix hasn't been attached to your sound device. To attach vmix, issue the command<br />
<br />
$ vmixctl attach device<br />
<br />
where ''device'' is your sound device, eg., /dev/oss/oss_envy240/pcm0 .<br />
<br />
To avoid having to issue this command manually in the future, you can add it to /usr/lib/oss/soundon.user, as suggested at http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Changing_the_default_sound_output .<br />
<br />
If you get "Device or resource busy" error, you need to add "vmix_no_autoattach=1" in /usr/lib/oss/conf/osscore.conf, and then reboot. <br />
<br />
'''See which devices are detected by running:'''<br />
<br />
$ ossinfo<br />
<br />
You should be able to see your devices listed under Device objects or Audio Devices. If the device that you want to use is not at the top on Audio devices or Device objects sections, /usr/lib/oss/etc/installed_drivers needs to be edited. The driver for the device that needs to be used should be at the very top. A soundoff, soundoff is probably required. If this does not work, comment all drivers listed that are not your preferred device.<br />
<br />
== Volume Control ==<br />
<br />
To control the volume of various devices, mixers levels will need to be set. The command line mixer is called {{Codeline|ossmix}}. It's very like the BSD audio mixer (mixerctl). The graphical mixer is called {{Codeline|ossxmix}} and will require {{Package Official|gtk2}} to be installed.<br />
<br />
The basic <tt>ossxmix</tt> controls:<br />
<br />
<pre><br />
/ High Definition Audio ALC262 \ --------------------------------> 1<br />
/________________________________\________________________________<br />
| \<br />
| [x] vmix0-enable [vmix0-rate: 48.000kHz] vmix0-channels |--> 2<br />
| [ Stereo [v] ] |<br />
| |<br />
| __codec1______________________________________________________ |<br />
| | _jack______________________________________________________ ||--> 3<br />
| | | _int-speaker_________________ _green_________________ |||<br />
| | | | | | | |||<br />
| | | | _mode_____ | | | | _mode_____ | | | |||<br />
| | | | [ mix [v] ] o o [x] [ ]mute | | [ mix [v] ] o o [x] | |||<br />
| | | | | | | | | | | |||<br />
| | | |_____________________________| |_______________________| |||<br />
| | |___________________________________________________________|||<br />
| |______________________________________________________________||<br />
| ___vmix0______________________________________________________ |<br />
| | __mocp___ O O _firefox_ O O __pcm7___ O O | |--> 4<br />
| | | | O O | | x x | | O O | |<br />
| | | | | | x O | | | | x x | | | | O O | |<br />
| | | o o [x] | x x | o o [x] | x x | o o [x] | O O | |<br />
| | | | | | x x | | | | x x | | | | O O | |<br />
| | |_________| x x |_________| x x |_________| O O | |<br />
| |_____________________________________________________________| |<br />
|_________________________________________________________________|<br />
</pre><br />
<br />
# One tab for each sound card<br />
# The vmix (virtual mixer) special configurations appear at the top. These include sampling rate and mixer priority.<br />
# These are your sound card jack configurations (input and output). Every mixer control that is shown here is provided by your sound card.<br />
# Application vmix mixer controls and sound meters. If the application isn't actively playing a sound it will be labeled pcm08, pcm09..., when the application is playing the application name will be shown.<br />
<br />
=== Color Definitions ===<br />
<br />
For high definition (HD) audio, {{Codeline|ossxmix}} will color jack configurations by their pre-defined jack colors:<br />
<br />
{| style="border: 1px solid #CCCCCC; background-color: #dddddf"<br />
! Color<br />
! Type<br />
! Connector<br />
|- style=color:black;background:lightgreen<br />
|green<br />
| front channels (stereo output)<br />
| 3.5mm TRS<br />
|- style=color:white;background:black <br />
|black<br />
| rear channels (stereo output)<br />
| 3.5mm TRS<br />
|- style=color:white;background:gray<br />
|grey<br />
| side channels (stereo output)<br />
|3.5mm TRS<br />
|- style=color:black;background:gold<br />
|gold<br />
| center and subwoofer (dual output)<br />
|3.5mm TRS<br />
|- style=color:black;background:lightblue<br />
|blue<br />
| line level (stereo input)<br />
|3.5mm TRS<br />
|- style=color:black;background:pink <br />
|pink<br />
| microphone (mono input)<br />
|3.5mm TS<br />
|}<br />
<br />
=== Saving Mixer Levels ===<br />
<br />
Mixer levels are saved when you shut off your computer. If you want to save the mixer level immediately, as root:<br />
<br />
# savemixer<br />
<br />
{{Codeline|savemixer}} can be used to write mixer levels to a file with the {{Codeline|-f}} switch and restore by the {{Codeline|-L}} switch.<br />
<br />
=== Other Mixers ===<br />
<br />
Other mixers that have support for OSS:<br />
<br />
* GNOME - Gnome volume control<br />
* KDE - Kmix - OSS support is being developed.<br />
<br />
==Configuring Applications for OSS==<br />
<br />
===Skype===<br />
<br />
The <tt>skype</tt> package only includes support for ALSA. To get an OSS-capable Skype, install the <tt>skype-oss</tt> package:<br />
<br />
# pacman -S skype-oss<br />
<br />
If you are using x86_64, you can get the [http://aur.archlinux.org/packages.php?ID=18312 bin32-skype-oss] package from AUR.<br />
<br />
===Wine===<br />
<br />
* Run <tt>winecfg</tt>.<br />
<br />
$ winecfg<br />
<br />
* Go to the <tt>Audio</tt> tab.<br />
<br />
* Select <tt>OSS Driver</tt>.<br />
<br />
===Gajim===<br />
By default Gajim uses {{Codeline|aplay -q}} to play a sound. To change this go in Advanced Settings and search for the {{Codeline|soundplayer}} variable. The ossplay program included in the oss package is a good replacement:<br />
<br />
{{Codeline|ossplay -qq}}<br />
<br />
===MOC===<br />
<br />
To use MOC with OSS v4.1 you must change section OSSMixerDevice to OSSMixerDevice==/dev/ossmix in your config (located in /home/yourusername/.moc).<br />
And now MOC should work with OSS v4.1.<br />
Or you can compile moc-svn package from AUR (he got support for new vmix).<br />
For issue with interface change OSSMixerChannel===to OSSMixerChannel===Any channel and after start mocp press w (change to sofware mixex) that will help and you can change the volume power.<br />
<br />
===Applications that use Gstreamer===<br />
<br />
Remove pulseaudio and gstreamer*-pulse programs and libraries.<br />
<br />
To change the gstreamer setting to output the sound to OSS instead of the default ALSA, run:<br />
<br />
gstreamer-properties<br />
<br />
Change the '''Default Output''' plugin to custom and the change the pipeline to:<br />
<br />
oss4sink<br />
<br />
For the input:<br />
<br />
oss4src<br />
<br />
{{Note|It's not certain that the input will sound better with oss4src compared to osssrc, so change this only if it improves your input sound. < confirmation on this please >}}<br />
<br />
{{Note|For some applications (e.g. Rhythmbox, Totem) the gstreamer-properties have no effect, as they rely on "musicaudiosink" instead of "audiosink" (which is modified by gstreamer-properties). Workaround: Set audiosink with gstreamer-properties and use gconf-editor to copy the value of "/system/gstreamer/0.10/default/audiosink" to "musicaudiosink" (at the same location) >}}<br />
<br />
If you are using phonon with the gstreamer backend you will need to set the environmental variable. To add to your current user:<br />
<br />
export PHONON_GST_AUDIOSINK=oss4sink<br />
<br />
Add this to your {{Filename|~/.bashrc}} to be loaded on login.<br />
<br />
===Firefox >=3.5===<br />
<br />
Firefox 3.5 introduces the <video> and <audio> tag support and can play ogg media out of the box. However, it currently can't be compiled with ALSA and OSS support at the same time. So you need to install the [http://aur.archlinux.org/packages.php?ID=28110 xulrunner-oss] package.<br />
<br />
1. Stop firefox.<br />
2. Remove the xulrunner package without dependency check: sudo pacman -Rd xulrunner<br />
3. Install xulrunner-oss package from AUR or [http://wiki.archlinux.org/index.php/ABS ABS].<br />
4. Start firefox.<br />
<br />
===Mplayer===<br />
<br />
If you are using gui (smplayer etc.) you will find the oss output at the audio settings. Using on cli you should specify the sound output: mplayer -ao oss /some/file/to/play.mkv If you don't want to brother typing it over and over again add "ao=oss" to your config file. (/home/$USER/.mplayer/config)<br />
<br />
===Music Player Daemon===<br />
<br />
MPD is configured through /etc/mpd.conf or ~/.mpdconf. Check both of these files, looking for something that looks like:<br />
<br />
audio_output {<br />
type "alsa"<br />
name "Some Device Name"<br />
}<br />
<br />
If you find an uncommented (the lines do not begin with #'s) ALSA configuration like the one above, comment all of it out, or delete it, and add the following:<br />
<br />
audio_output {<br />
type "oss"<br />
name "My OSS Device"<br />
}<br />
<br />
{{Note|I had to put this configuration in my ~/.mpdconf for it to work properly, but it ought to work in /etc/mpd.conf as well.}}<br />
Further configuration might not be necessary for all users. However, if you experience issues (in that MPD doesn't work properly after it's been restarted), or if you like having specific (i.e. more user-configured, less auto-configured) config files, the audio output for OSS can be more specifically configured as follows: First, run:<br />
<br />
ossinfo | grep /dev/dsp<br />
<br />
Look for the line that says something similar to {{Codeline|/dev/dsp -> /dev/oss/<SOME_CARD_IDENTIFIER>/pcm0}}. Take note of what your <SOME_CARD_IDENTIFIER> is, and add bolded lines to your OSS audio output in your mpd config file:<br />
<br />
audio_output {<br />
type "oss"<br />
name "My OSS Device"<br />
'''device "/dev/oss/<SOME_CARD_IDENTIFIER>/pcm0"'''<br />
'''mixer_device "/dev/oss/<SOME_CARD_IDENTIFIER>/mix0"'''<br />
}<br />
<br />
===Other applications===<br />
<br />
* If you can't get sound from an application not listed here, try looking at the [http://www.4front-tech.com/wiki/index.php/Configuring_Applications_for_OSSv4 Configuring Applications for OSSv4] page.<br />
* Search OSS specific packages by using {{Codeline|pacman -Ss -- '-oss'}} and [http://aur.archlinux.org/packages.php?K=-oss&start=0&PP=100| in AUR].<br />
<br />
==Troubleshooting==<br />
<br />
===Troubleshooting HDAudio devices===<br />
<br />
====Understanding why problems arise====<br />
<br />
If you have a HDAudio sound device, it's very likely that you will have to adjust some mixer settings before your sound works.<br />
<br />
HDAudio devices are very powerful in the sense that they can contain a lot of small circuits (called ''widgets'') that can be adjusted by software at any time. These controls are exposed to the mixer, and they can be used, for example, to turn the earphone jack into a sound input jack instead of a sound output jack.<br />
<br />
However, there is a side effect, mainly because the HDAudio standard is more flexible than it perhaps should be, and because the vendors often only care to get their ''official drivers'' working.<br />
<br />
Then, when using HDAudio devices, you often find disorganized mixer controls, that doesn't work at all by default, and you are forced to try every mixer control combination, until it works.<br />
<br />
====How to solve====<br />
<br />
Open <tt>ossxmix</tt> and try to change every mixer control in the ''middle area'', that contains the sound card specific controls, as explained in the previous "[[OSS#The_mixer|The mixer]]" section.<br />
<br />
You'll probably want to setup a program to record/play continously in the background (e.g. {{Codeline|ossrecord - | ossplay -}} for recording or {{Codeline|osstest -lV}} for playing), while changing mixer settings in ossxmix in the foreground.<br />
<br />
* Raise every volume control slider.<br />
* In each option box, try to change the selected option, trying all the possible combinations.<br />
* If you get noise, try to lower and/or mute some volume controls, until you find the source of the noise.<br />
<br />
Please note again that you do '''not''' need to change any controls in the ''top area'' nor in the ''bottom area'', as they are virtual <tt>vmix</tt>-related mixer controls.<br />
<br />
* Editing {{Codeline|/usr/lib/oss/conf/oss_hdaudio.conf}} uncommenting and changing ''hdaudio_noskip=0'' to a value from 0-7 can give you more jack options in ossxmix<br />
I had to edit mine to ''hdaudio_noskip=7'' for my sub/rear speaker to work on my laptop, restart oss for the changes to take effect {{Codeline|/etc/rc.d/oss restart}}<br />
<br />
===MMS sound cracking in totem===<br />
If your stream sounds with cracks or strange noise in totem like it did with me then you could try to play it with another backend like ffmpeg (mplayer). That "fixed" the issue for me. This will not fix the issue that somehow pops up in gstreamer when playing MMS streams but it will give you the option to play it with good sound quality. Playing it in mplayer is simple:<br />
# mplayer mmsh://yourstreamurl<br />
<br />
===Microphone playing through output channels===<br />
<br />
OSS by default plays back the microphone through the speakers. To disable this in ossxmix find the misc section. Check off every "input-mix-mute" to disable this.<br />
<br />
===Troubleshooting other issues===<br />
<br />
* If you get distorted sound, try lowering some volume control sliders.<br />
<br />
* If you need to change the default sound card, look at [http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Changing_the_default_sound_output here].<br />
<br />
* If you have another issues, try searching or asking for help at the [http://www.4front-tech.com/forum 4front forums].<br />
<br />
==Tips and tricks==<br />
<br />
===Using multimedia keys with OSS===<br />
An easy way to mute/unmute and increase/decrease the volume is to use the [http://www.opensound.com/wiki/index.php/Tips_And_Tricks#ossvol {{Codeline|ossvol}} script] available in [[AUR]].<br />
<br />
Once you installed it try to toggle the sound:<br />
$ ossvol -t<br />
<br />
Type {{Codeline|ossvol -h}} for the other commands.<br />
<br />
If you don't know how to assign commands to your multimedia keys, see [[Extra Keyboard Keys]].<br />
<br />
==={{Codeline|ossvol}} troubleshooting===<br />
If you get an error like:<br />
Bad mixer control name(987) 'vol'<br />
you need to edit the script ({{Filename|/usr/bin/ossvol}}) and change the value of the {{Codeline|CHANNEL}} variable which is at the beginning of the script. For example mine is {{Codeline|CHANNEL<nowiki>=</nowiki>"vmix0-outvol"}}.<br />
<br />
*'''Note''' if you are using xbindkeys for your multimedia keys adding this<br />
"ossmix vmix0-outvol -- +1"<br />
raise volume<br />
"ossmix vmix0-outvol -- -1"<br />
lower volume<br />
<br />
to the raise/lower volume section of your .xbindkeysrc file is an easy way to adjust the volume<br />
<br />
===Changing the Sample Rate===<br />
<br />
Changing the output sample rate is not obvious at first. Sample rates can only be changed by the superuser and vmix must be unused by any programs when a change is requested. Before you follow any of these steps, ensure you are going through a receiver/amplifier and using quality speakers and not simply computer speakers. If you are only using computer speakers, don't bother changing anything here as you won't notice a difference.<br />
<br />
By default the sample rate is 48000hz. There are several conditions in which you may want to change this. This all depends on your usage patterns. You want the sample rate you are using to match the media you use the most. If your computer has to change the sampling rate of the media to suit the hardware it is likely, though not guaranteed that you will have a loss in audio quality. This is most noticable in downsampling (ie. 96000hz &rarr; 48000hz). There is an article about this issue in [http://www.stereophile.com/news/121707lucky/ "Stereophile"] which was [http://lists.apple.com/archives/coreaudio-api/2008/Jan/msg00272.html discussed] on Apple's "CoreAudio API" mailing list if you wish to learn more about this issue. <br />
<br />
Some example sample rates:<br />
<br />
* 44100hz - Sample rate of standard [http://en.wikipedia.org/wiki/Red_Book_%28audio_CD_standard%29 Red Book] audio cds.<br />
* 88000hz - Sample rate of [http://en.wikipedia.org/wiki/Super_Audio_CD SACD] high definition audio discs/downloads. It is rare that your motherboard will support this sample rate.<br />
* 96000hz - Sample rate of most high definition audio downloads. If your motherboard is an [http://en.wikipedia.org/wiki/AC%2797 AC'97] motherboard, this is likely to be your highest bitrate.<br />
* 192000hz - Sample rate of BluRay, and some (very few) high definition downloads. Support for external audio reciever equipment is limited to high end audio. Not all motherboards support this. An example of a motherboard chipset that would support this includes [http://en.wikipedia.org/wiki/Intel_High_Definition_Audio Intel HDA audio]. <br />
<br />
To check what your sample rate is currently set to:<br />
<br />
# Run <code>"ossmix | grep rate"</code>. <br />
<br />
You are likely to see <code>"vmix0-rate <decimal value> (currently 48000) (Read-only)"</code>.<br />
<br />
If you do not see a "vmix0-rate" (or "vmix1-rate", etc.) being outputted, than it probably means that vmix is disabled. In that case, OSS will use the rate requested by the program which uses the device, so this section doesn't apply. Exception: envy24(ht) cards have a setting envy24.rate which has a similiar function (see "oss_envy24" manpage). You can follow these steps, but at step 2, change with ossmix the value of "envy24.rate" as well.<br />
<br />
Steps to affect the change:<br />
<br />
# First, make sure your card is able to use the new rate. Run "ossinfo -v2" and see if the wanted rate is in the "Native sample rates" output.<br />
# As root, run <code>"/usr/lib/oss/scripts/killprocs.sh"</code>. Be aware, this will close any program that currently has an open sound channel (examples being media players, Firefox as of 3.5 if you have xulrunner-oss installed, and the gnome volume control).<br />
# After all programs occupying vmix are terminated, run as root: <code>"vmixctl rate /dev/dsp 96000"</code> replacing the rate with your desired sample rate.<br />
# Run <code>"ossmix | grep rate"</code> and check for <code>"vmix0-rate <decimal value> (currently 96000) (Read-only)"</code> to see if you were successful.<br />
#''' Make changes permanent''' use the soundon.user file to set the rate for every soundon<br />
write <code>"vmixctl rate /dev/dsp 96000" in the file /usr/lib/oss/soundon.user</code> and make it executable.<br />
<br />
===Changing the Default Sound Output===<br />
<br />
When running osstest, the first test passes for the first channel, but not for the stereo or right channel, it sounds distorted/hisses. If this is what your sound is like, then it's set to the wrong output.<br />
<br />
*** Scanning sound adapter #-1 ***<br />
/dev/oss/oss_hdaudio0/pcm0 (audio engine 0): HD Audio play front<br />
- Performing audio playback test... <br />
<left> OK <right> OK <stereo> OK <measured srate 47991.00 Hz (-0.02%)> <br />
<br />
The left sounded good, the right and stereo were the distorted ones.<br />
<br />
Let the test continue until you get a working output:<br />
/dev/oss/oss_hdaudio0/spdout0 (audio engine 5): HD Audio play spdif-out <br />
- Performing audio playback test... <br />
<left> OK <right> OK <stereo> OK <measured srate 47991.00 Hz (-0.02%)> <br />
<br />
If this passed the test on all left, right and stereo, proceed to next step.<br />
<br />
So from here:<br />
[http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Changing_the_default_sound_output Changing_the_default_sound_output]<br />
you get the command to change the default output; change according to what works for you<br />
sudo ln -sf /dev/oss/oss_hdaudio0/spdout0 /dev/dsp_multich<br />
With 5.1 surround, chose dsp_multichannel; with 2 channel, dsp should work.<br />
<br />
===Creative Sound Blaster X-Fi Surround 5.1 SB1090 USB===<br />
<br />
This information is completely from [http://www.4front-tech.com/forum/viewtopic.php?f=3&t=3423 4front-tech.com] ; courtesy of kristian and Maxa. Thanks!!<br />
<br />
It's surprising to learn that the external card does not work just because of a missing true return value in the function write_control_value(...) in ossusb_audio.c.<br />
<br />
To fix this, a recompile of oss is nessasary, for now.<br />
<br />
1. Grab the latest oss from the Arch Repo<br />
http://repos.archlinux.org/wsvn/community/oss/repos/community-x86_64/<br />
<br />
2. Extract it<br />
<br />
3. cd to the folder, I renamed the folder to oss<br />
<br />
4. run makepkg --nobuild<br />
<br />
5. cd to src/kernel/drv/oss_usb/ ; '''edit the ossusb_audio.c''' ; '''add a Return 1''' ; should look like so and '''SAVE'''<br />
static int<br />
write_control_value (ossusb_devc * devc, udi_endpoint_handle_t * endpoint,<br />
int ctl, int l, unsigned int v)<br />
{<br />
return 1;<br />
<br />
6. cd to src/kernel/setup and edit srcconf_linux.inc, search for -Werror and remove it, otherwise OSS will not compile.<br />
<br />
7. do a makepkg --noextract<br />
<br />
Now you must install the package with pacman -U ; remove oss first if already installed <nowiki>(pacman -Rd oss)</nowiki><br />
<br />
===A simple systray applet===<br />
Want a applet to control volume like in GNOME? From [http://bbs.archlinux.org/viewtopic.php?id=77440 here] I got a usable [http://pastebin.furver.se/0xflchkfz/ one]. <br />
<br />
Download [http://pastebin.furver.se/0xflchkfz/0xflchkfz.txt this] script and rename whatever you want, e.g.: ossvolctl. run the following command:<br />
$chmod +x ossvolctl<br />
#cp ossvolctl /usr/bin/ossvolctl<br />
or<br />
#install -Dm755 ossvolctl /usr/bin/ossvolctl<br />
<br />
===Start ossxmix docked to systray on startup===<br />
<br />
'''KDE 4'''<br />
<br />
Create an application launcher file named <code>ossxmix.desktop</code> in you local application launchers directory (<code>~/.local/share/applications/</code> then enter:<br />
<br />
<pre>[Desktop Entry]<br />
Name=Open Sound System Mixer<br />
GenericName=Audio Mixer<br />
Exec=ossxmix -b<br />
Icon=audio-card<br />
Categories=Application;GTK;AudioVideo;Player;<br />
Terminal=false<br />
Type=Application<br />
Encoding=UTF-8</pre><br />
<br />
To add it to autostart when loading the desktop environment:<br />
<br />
System Settings > Advanced tab > Autostart. Then click add program and choose it from the 'Multimedia' list.<br />
<br />
'''Gnome''' <br />
<br />
*As Root create a file /usr/local/bin/ossxmix_bg with the following content:<br />
<br />
<pre><br />
#!/bin/bash<br />
exec /usr/bin/ossxmix -b<br />
</pre><br />
<br />
Goto System > Preferences > Start Up Applications<br />
<br />
*Click Add, Type OSSMIX in Name field and <code>/usr/local/bin/ossxmix_bg</code> in Command field then click Add button.<br />
<br />
*Login and Logout to see the changes.<br />
<br />
===Record sound output from a program===<br />
<br />
* [http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Recording_sound_output_of_a_program Recording sound output of a program].<br />
<br />
===Suspend and Hibernation===<br />
<br />
OSS does not automatically support suspend meaning that OSS must be manually stopped prior to suspending or hibernating.<br />
<br />
OSS provides <tt>soundon</tt> and <tt>soundoff</tt> to enable and disable OSS, although any processes that use sound must be terminated first.<br />
<br />
The following script is a rather basic method of automatically unloading OSS prior to suspending and reloading afterwards.<br />
<br />
#!/bin/sh<br />
. "${PM_FUNCTIONS}"<br />
<br />
suspend_osssound()<br />
{<br />
/usr/lib/oss/scripts/killprocs.sh<br />
/usr/sbin/soundoff<br />
}<br />
<br />
resume_osssound()<br />
{<br />
/usr/sbin/soundon<br />
}<br />
<br />
case "$1" in<br />
hibernate|suspend)<br />
suspend_osssound<br />
;;<br />
thaw|resume)<br />
resume_osssound<br />
;;<br />
*) exit $NA<br />
;;<br />
esac<br />
<br />
Save the contents of the script (as root) into {{Filename|/etc/pm/sleep.d/50ossound}} and make it executable. {{Filename| chmod a+x /etc/pm/sleep.d/50ossound}}<br />
<br />
{{Note|This script is rather basic and will terminate any application directly accessing OSS, save your work prior to suspending/hibernating.}}<br />
<br />
OSS does not support suspending but we don't care or better [[Suspend_to_RAM|s2ram]] works fine without stopping OSS.<br />
Just create a nice suspend script to /sbin/suspend and make it executable.<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
if [ [ $EUID -ne 0 ] ]; then<br />
## Checking if you are a root or not<br />
echo "This script must be run as root" 1>&2<br />
exit 1<br />
fi<br />
<br />
s2ram -f<br />
<br />
sleep 2<br />
<br />
/etc/rc.d/oss restart 2>/tmp/oss.txt<br />
<br />
if [ $? -gt 0 ]; then<br />
echo "OSS restart failed check /tmp/oss.txt for advice"<br />
fi<br />
<br />
exit 0<br />
</pre><br />
<br />
That's all your apps are fine and suspend works. \o/<br />
<br />
{{Note | If you are using Opera you must kill operapluginwrapper before suspend. To do this add '''<nowiki>PID=`pidof operapluginwrapper`;kill -9 $PID</nowiki>''' before s2ram -f. }}<br />
<br />
===ALSA emulation===<br />
You can instruct <tt>alsa-lib</tt> to use OSS as its audio output system. This works as a sort of ALSA emulation.<br />
<br />
Note, however, that this method may introduce additional latency in your sound output, and that the emulation is not complete and doesn't work with all applications. It doesn't work, for example, with programs that try to detect devices using ALSA.<br />
<br />
So, as most applications support OSS directly, use this method only as a last resort.<br />
<br />
In the future, more complete methods may be available for emulating ALSA, such as <tt>libsalsa</tt> and <tt>cuckoo</tt>.<br />
<br />
====Instructions====<br />
<br />
* Install the <tt>alsa-plugins</tt> package.<br />
<br />
# pacman -S alsa-plugins<br />
<br />
* Edit {{Filename|/etc/asound.conf}} as follows.<br />
<br />
pcm.oss {<br />
type oss<br />
device /dev/dsp<br />
}<br />
<br />
pcm.!default {<br />
type oss<br />
device /dev/dsp<br />
}<br />
<br />
ctl.oss {<br />
type oss<br />
device /dev/mixer<br />
}<br />
<br />
ctl.!default {<br />
type oss<br />
device /dev/mixer<br />
}<br />
<br />
{{Note | If you don't want to use OSS anymore, don't forget to revert changes that you do here in {{Filename|/etc/asound.conf}}.}}<br />
<br />
==Experimental packages==<br />
<br />
===Mercurial repository version===<br />
<br />
There is a [http://aur.archlinux.org/packages.php?ID=21126 oss-mercurial package] in AUR. This package compiles and installs the latest OSS development version direcly from the Mercurial repository.<br />
<br />
You can try this package if you want to contribute code to OSS or if only a very recent change in OSS code introduced support to your sound device.<br />
<br />
If you want oss to take care of your flash sound (as well as the sound in Adobe-Air applications) you will need to install libflashsupport:<br />
<br />
# pacman -S libflashsupport</div>Hinrichhttps://wiki.archlinux.org/index.php?title=Open_Sound_System&diff=124229Open Sound System2010-12-06T19:00:22Z<p>Hinrich: </p>
<hr />
<div>[[Category:Sound (English)]]<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|OSS}}<br />
<br />
This article will show you how to install and configure the '''O'''pen '''S'''ound '''S'''ystem (OSS) on you computer.<br />
<br />
The [http://en.wikipedia.org/wiki/Open_Sound_System Open Sound System] is an alternative sound architecture for Unix-like and POSIX-compatible systems. OSS version 3 was the original sound system for Linux and is in the kernel but was superceded by ALSA in 2002 when OSS version 4 became proprietary software. OSSv4 became free software again in 2007 when [http://www.opensound.com/ 4Front Technologies] released its source code and provided it under the GPL license.<br />
<br />
== Comparisons with ALSA ==<br />
<br />
Some advantages and disadvantages compared to using the Advanced Linux Sound Architecture.<br />
<br />
=== OSS Advantages (users) ===<br />
<br />
* Includes a transparent software mixer (vmix in kernel space). Having a transparent software mixer means that multiple applications can access the sound device at the same time.<br />
* Control for each application sound volume.<br />
* Some legacy cards are supported better (e.g. Creative X-Fi).<br />
* Initial response time in sound applications is usually better.<br />
* Better support for applications that use the OSS API. Many applications still use this API, and do not require an emulation layer like ALSA uses.<br />
<br />
=== OSS Advantages (developers) ===<br />
<br />
* Cleaner and easier to use API, and better API [http://manuals.opensound.com/developer documentation].<br />
* Support for drivers in userspace.<br />
* Accesibility. OSS runs on BSDs and Solaris.<br />
* Portability. OSS is [http://revolf.free.fr/Alchimie-7/Alchimie7_OSS_Haiku.en.pdf easier] to port to other operating systems.<br />
<br />
=== ALSA Advantages ===<br />
<br />
* Better support for USB audio devices. With OSS output is experimental, input is not implemented.<br />
* Support for Bluetooth audio devices.<br />
* Support for AC'97 and HDAudio dial-up soft-modems such as Si3055.<br />
* Better support for MIDI devices. With OSS you'll have to use a software synthesizer such as Timidity or Fluidsynth.<br />
* Support for suspend. OSS and associated programs will need to be closed first.<br />
* Better support for jack detection. On some HD motherboards users will need to turn down the speaker volume when plugging in their earphones.<br />
<br />
== Install ==<br />
<br />
Install OSS by running:<br />
<br />
# pacman -S oss<br />
<br />
This will install the OSS files and run the OSS install script that will temporarily disable the ALSA modules, and install the OSS kernel modules. Since ALSA is enabled by default in the boot scripts, you need to disable it for it not to conflict with OSS when booting. You can do this by editing {{Filename|rc.conf}} and adding:<br />
<br />
MODULES=(!soundcore ...<br />
<br />
Then add OSS to the daemon array:<br />
<br />
DAEMONS=(crond hal @oss...<br />
<br />
If your user is not part of the audio group, add your user by:<br />
<br />
# gpasswd -a username audio<br />
<br />
Then start OSS by:<br />
<br />
# /etc/rc.d/oss start<br />
<br />
In the case OSS is not able to detect your card when starting it, run:<br />
<br />
# ossdetect -v<br />
<br />
Then {{Codeline|soundoff && soundon}} to reactivate it.<br />
<br />
== Testing ==<br />
<br />
Beware the default volume is very loud, avoid using earphones and physically lower the volume of your speakers (if possible) before running the test.<br />
<br />
'''Test OSS by running:'''<br />
<br />
$ osstest<br />
<br />
You should be able to hear music during the test process. If there is no audio, try to adjust the volume or refer to the troubleshooting section.<br />
<br />
If you want to hear sounds from more than one application simultaneously, you need vmix, OSS's software mixer. <br />
<br />
'''Check that vmix is enabled by running:'''<br />
<br />
$ ossmix -a | grep -i vmix<br />
<br />
You should see a line like 'vmix0-enable ON|OFF (currently ON)'. If you don't see any lines beginning with 'vmix', it probably means that vmix hasn't been attached to your sound device. To attach vmix, issue the command<br />
<br />
$ vmixctl attach device<br />
<br />
where ''device'' is your sound device, eg., /dev/oss/oss_envy240/pcm0 .<br />
<br />
To avoid having to issue this command manually in the future, you can add it to /usr/lib/oss/soundon.user, as suggested at http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Changing_the_default_sound_output .<br />
<br />
If you get "Device or resource busy" error, you need to add "vmix_no_autoattach=1" in /usr/lib/oss/conf/osscore.conf, and then reboot. <br />
<br />
'''See which devices are detected by running:'''<br />
<br />
$ ossinfo<br />
<br />
You should be able to see your devices listed under Device objects or Audio Devices. If the device that you want to use is not at the top on Audio devices or Device objects sections, /usr/lib/oss/etc/installed_drivers needs to be edited. The driver for the device that needs to be used should be at the very top. A soundoff, soundoff is probably required. If this does not work, comment all drivers listed that are not your preferred device.<br />
<br />
== Volume Control ==<br />
<br />
To control the volume of various devices, mixers levels will need to be set. The command line mixer is called {{Codeline|ossmix}}. It's very like the BSD audio mixer (mixerctl). The graphical mixer is called {{Codeline|ossxmix}} and will require {{Package Official|gtk2}} to be installed.<br />
<br />
The basic <tt>ossxmix</tt> controls:<br />
<br />
<pre><br />
/ High Definition Audio ALC262 \ --------------------------------> 1<br />
/________________________________\________________________________<br />
| \<br />
| [x] vmix0-enable [vmix0-rate: 48.000kHz] vmix0-channels |--> 2<br />
| [ Stereo [v] ] |<br />
| |<br />
| __codec1______________________________________________________ |<br />
| | _jack______________________________________________________ ||--> 3<br />
| | | _int-speaker_________________ _green_________________ |||<br />
| | | | | | | |||<br />
| | | | _mode_____ | | | | _mode_____ | | | |||<br />
| | | | [ mix [v] ] o o [x] [ ]mute | | [ mix [v] ] o o [x] | |||<br />
| | | | | | | | | | | |||<br />
| | | |_____________________________| |_______________________| |||<br />
| | |___________________________________________________________|||<br />
| |______________________________________________________________||<br />
| ___vmix0______________________________________________________ |<br />
| | __mocp___ O O _firefox_ O O __pcm7___ O O | |--> 4<br />
| | | | O O | | x x | | O O | |<br />
| | | | | | x O | | | | x x | | | | O O | |<br />
| | | o o [x] | x x | o o [x] | x x | o o [x] | O O | |<br />
| | | | | | x x | | | | x x | | | | O O | |<br />
| | |_________| x x |_________| x x |_________| O O | |<br />
| |_____________________________________________________________| |<br />
|_________________________________________________________________|<br />
</pre><br />
<br />
# One tab for each sound card<br />
# The vmix (virtual mixer) special configurations appear at the top. These include sampling rate and mixer priority.<br />
# These are your sound card jack configurations (input and output). Every mixer control that is shown here is provided by your sound card.<br />
# Application vmix mixer controls and sound meters. If the application isn't actively playing a sound it will be labeled pcm08, pcm09..., when the application is playing the application name will be shown.<br />
<br />
=== Color Definitions ===<br />
<br />
For high definition (HD) audio, {{Codeline|ossxmix}} will color jack configurations by their pre-defined jack colors:<br />
<br />
{| style="border: 1px solid #CCCCCC; background-color: #dddddf"<br />
! Color<br />
! Type<br />
! Connector<br />
|- style=color:black;background:lightgreen<br />
|green<br />
| front channels (stereo output)<br />
| 3.5mm TRS<br />
|- style=color:white;background:black <br />
|black<br />
| rear channels (stereo output)<br />
| 3.5mm TRS<br />
|- style=color:white;background:gray<br />
|grey<br />
| side channels (stereo output)<br />
|3.5mm TRS<br />
|- style=color:black;background:gold<br />
|gold<br />
| center and subwoofer (dual output)<br />
|3.5mm TRS<br />
|- style=color:black;background:lightblue<br />
|blue<br />
| line level (stereo input)<br />
|3.5mm TRS<br />
|- style=color:black;background:pink <br />
|pink<br />
| microphone (mono input)<br />
|3.5mm TS<br />
|}<br />
<br />
=== Saving Mixer Levels ===<br />
<br />
Mixer levels are saved when you shut off your computer. If you want to save the mixer level immediately, as root:<br />
<br />
# savemixer<br />
<br />
{{Codeline|savemixer}} can be used to write mixer levels to a file with the {{Codeline|-f}} switch and restore by the {{Codeline|-L}} switch.<br />
<br />
=== Other Mixers ===<br />
<br />
Other mixers that have support for OSS:<br />
<br />
* GNOME - Gnome volume control<br />
* KDE - Kmix - OSS support is being developed.<br />
<br />
==Configuring Applications for OSS==<br />
<br />
===Skype===<br />
<br />
The <tt>skype</tt> package only includes support for ALSA. To get an OSS-capable Skype, install the <tt>skype-oss</tt> package:<br />
<br />
# pacman -S skype-oss<br />
<br />
If you are using x86_64, you can get the [http://aur.archlinux.org/packages.php?ID=18312 bin32-skype-oss] package from AUR.<br />
<br />
===Wine===<br />
<br />
* Run <tt>winecfg</tt>.<br />
<br />
$ winecfg<br />
<br />
* Go to the <tt>Audio</tt> tab.<br />
<br />
* Select <tt>OSS Driver</tt>.<br />
<br />
===Gajim===<br />
By default Gajim uses {{Codeline|aplay -q}} to play a sound. To change this go in Advanced Settings and search for the {{Codeline|soundplayer}} variable. The ossplay program included in the oss package is a good replacement:<br />
<br />
{{Codeline|ossplay -qq}}<br />
<br />
===MOC===<br />
<br />
To use MOC with OSS v4.1 you must change section OSSMixerDevice to OSSMixerDevice==/dev/ossmix in your config (located in /home/yourusername/.moc).<br />
And now MOC should work with OSS v4.1.<br />
Or you can compile moc-svn package from AUR (he got support for new vmix).<br />
For issue with interface change OSSMixerChannel===to OSSMixerChannel===Any channel and after start mocp press w (change to sofware mixex) that will help and you can change the volume power.<br />
<br />
===Applications that use Gstreamer===<br />
<br />
Remove pulseaudio and gstreamer*-pulse programs and libraries.<br />
<br />
To change the gstreamer setting to output the sound to OSS instead of the default ALSA, run:<br />
<br />
gstreamer-properties<br />
<br />
Change the '''Default Output''' plugin to custom and the change the pipeline to:<br />
<br />
oss4sink<br />
<br />
For the input:<br />
<br />
oss4src<br />
<br />
{{Note|It's not certain that the input will sound better with oss4src compared to osssrc, so change this only if it improves your input sound. < confirmation on this please >}}<br />
<br />
{{Note|For some applications (e.g. Rhythmbox, Totem) the gstreamer-properties have no effect, as the rely on "musicaudiosink" instead of "audiosink" (which is modified by gstreamer-properties. Workaround: Set audiosink with gstreamer-properties and use gconf-editor to copy the value of "/system/gstreamer/0.10/default/audiosink" to "musicaudiosink" (at the same location) >}}<br />
<br />
If you are using phonon with the gstreamer backend you will need to set the environmental variable. To add to your current user:<br />
<br />
export PHONON_GST_AUDIOSINK=oss4sink<br />
<br />
Add this to your {{Filename|~/.bashrc}} to be loaded on login.<br />
<br />
===Firefox >=3.5===<br />
<br />
Firefox 3.5 introduces the <video> and <audio> tag support and can play ogg media out of the box. However, it currently can't be compiled with ALSA and OSS support at the same time. So you need to install the [http://aur.archlinux.org/packages.php?ID=28110 xulrunner-oss] package.<br />
<br />
1. Stop firefox.<br />
2. Remove the xulrunner package without dependency check: sudo pacman -Rd xulrunner<br />
3. Install xulrunner-oss package from AUR or [http://wiki.archlinux.org/index.php/ABS ABS].<br />
4. Start firefox.<br />
<br />
===Mplayer===<br />
<br />
If you are using gui (smplayer etc.) you will find the oss output at the audio settings. Using on cli you should specify the sound output: mplayer -ao oss /some/file/to/play.mkv If you don't want to brother typing it over and over again add "ao=oss" to your config file. (/home/$USER/.mplayer/config)<br />
<br />
===Music Player Daemon===<br />
<br />
MPD is configured through /etc/mpd.conf or ~/.mpdconf. Check both of these files, looking for something that looks like:<br />
<br />
audio_output {<br />
type "alsa"<br />
name "Some Device Name"<br />
}<br />
<br />
If you find an uncommented (the lines do not begin with #'s) ALSA configuration like the one above, comment all of it out, or delete it, and add the following:<br />
<br />
audio_output {<br />
type "oss"<br />
name "My OSS Device"<br />
}<br />
<br />
{{Note|I had to put this configuration in my ~/.mpdconf for it to work properly, but it ought to work in /etc/mpd.conf as well.}}<br />
Further configuration might not be necessary for all users. However, if you experience issues (in that MPD doesn't work properly after it's been restarted), or if you like having specific (i.e. more user-configured, less auto-configured) config files, the audio output for OSS can be more specifically configured as follows: First, run:<br />
<br />
ossinfo | grep /dev/dsp<br />
<br />
Look for the line that says something similar to {{Codeline|/dev/dsp -> /dev/oss/<SOME_CARD_IDENTIFIER>/pcm0}}. Take note of what your <SOME_CARD_IDENTIFIER> is, and add bolded lines to your OSS audio output in your mpd config file:<br />
<br />
audio_output {<br />
type "oss"<br />
name "My OSS Device"<br />
'''device "/dev/oss/<SOME_CARD_IDENTIFIER>/pcm0"'''<br />
'''mixer_device "/dev/oss/<SOME_CARD_IDENTIFIER>/mix0"'''<br />
}<br />
<br />
===Other applications===<br />
<br />
* If you can't get sound from an application not listed here, try looking at the [http://www.4front-tech.com/wiki/index.php/Configuring_Applications_for_OSSv4 Configuring Applications for OSSv4] page.<br />
* Search OSS specific packages by using {{Codeline|pacman -Ss -- '-oss'}} and [http://aur.archlinux.org/packages.php?K=-oss&start=0&PP=100| in AUR].<br />
<br />
==Troubleshooting==<br />
<br />
===Troubleshooting HDAudio devices===<br />
<br />
====Understanding why problems arise====<br />
<br />
If you have a HDAudio sound device, it's very likely that you will have to adjust some mixer settings before your sound works.<br />
<br />
HDAudio devices are very powerful in the sense that they can contain a lot of small circuits (called ''widgets'') that can be adjusted by software at any time. These controls are exposed to the mixer, and they can be used, for example, to turn the earphone jack into a sound input jack instead of a sound output jack.<br />
<br />
However, there is a side effect, mainly because the HDAudio standard is more flexible than it perhaps should be, and because the vendors often only care to get their ''official drivers'' working.<br />
<br />
Then, when using HDAudio devices, you often find disorganized mixer controls, that doesn't work at all by default, and you are forced to try every mixer control combination, until it works.<br />
<br />
====How to solve====<br />
<br />
Open <tt>ossxmix</tt> and try to change every mixer control in the ''middle area'', that contains the sound card specific controls, as explained in the previous "[[OSS#The_mixer|The mixer]]" section.<br />
<br />
You'll probably want to setup a program to record/play continously in the background (e.g. {{Codeline|ossrecord - | ossplay -}} for recording or {{Codeline|osstest -lV}} for playing), while changing mixer settings in ossxmix in the foreground.<br />
<br />
* Raise every volume control slider.<br />
* In each option box, try to change the selected option, trying all the possible combinations.<br />
* If you get noise, try to lower and/or mute some volume controls, until you find the source of the noise.<br />
<br />
Please note again that you do '''not''' need to change any controls in the ''top area'' nor in the ''bottom area'', as they are virtual <tt>vmix</tt>-related mixer controls.<br />
<br />
* Editing {{Codeline|/usr/lib/oss/conf/oss_hdaudio.conf}} uncommenting and changing ''hdaudio_noskip=0'' to a value from 0-7 can give you more jack options in ossxmix<br />
I had to edit mine to ''hdaudio_noskip=7'' for my sub/rear speaker to work on my laptop, restart oss for the changes to take effect {{Codeline|/etc/rc.d/oss restart}}<br />
<br />
===MMS sound cracking in totem===<br />
If your stream sounds with cracks or strange noise in totem like it did with me then you could try to play it with another backend like ffmpeg (mplayer). That "fixed" the issue for me. This will not fix the issue that somehow pops up in gstreamer when playing MMS streams but it will give you the option to play it with good sound quality. Playing it in mplayer is simple:<br />
# mplayer mmsh://yourstreamurl<br />
<br />
===Microphone playing through output channels===<br />
<br />
OSS by default plays back the microphone through the speakers. To disable this in ossxmix find the misc section. Check off every "input-mix-mute" to disable this.<br />
<br />
===Troubleshooting other issues===<br />
<br />
* If you get distorted sound, try lowering some volume control sliders.<br />
<br />
* If you need to change the default sound card, look at [http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Changing_the_default_sound_output here].<br />
<br />
* If you have another issues, try searching or asking for help at the [http://www.4front-tech.com/forum 4front forums].<br />
<br />
==Tips and tricks==<br />
<br />
===Using multimedia keys with OSS===<br />
An easy way to mute/unmute and increase/decrease the volume is to use the [http://www.opensound.com/wiki/index.php/Tips_And_Tricks#ossvol {{Codeline|ossvol}} script] available in [[AUR]].<br />
<br />
Once you installed it try to toggle the sound:<br />
$ ossvol -t<br />
<br />
Type {{Codeline|ossvol -h}} for the other commands.<br />
<br />
If you don't know how to assign commands to your multimedia keys, see [[Extra Keyboard Keys]].<br />
<br />
==={{Codeline|ossvol}} troubleshooting===<br />
If you get an error like:<br />
Bad mixer control name(987) 'vol'<br />
you need to edit the script ({{Filename|/usr/bin/ossvol}}) and change the value of the {{Codeline|CHANNEL}} variable which is at the beginning of the script. For example mine is {{Codeline|CHANNEL<nowiki>=</nowiki>"vmix0-outvol"}}.<br />
<br />
*'''Note''' if you are using xbindkeys for your multimedia keys adding this<br />
"ossmix vmix0-outvol -- +1"<br />
raise volume<br />
"ossmix vmix0-outvol -- -1"<br />
lower volume<br />
<br />
to the raise/lower volume section of your .xbindkeysrc file is an easy way to adjust the volume<br />
<br />
===Changing the Sample Rate===<br />
<br />
Changing the output sample rate is not obvious at first. Sample rates can only be changed by the superuser and vmix must be unused by any programs when a change is requested. Before you follow any of these steps, ensure you are going through a receiver/amplifier and using quality speakers and not simply computer speakers. If you are only using computer speakers, don't bother changing anything here as you won't notice a difference.<br />
<br />
By default the sample rate is 48000hz. There are several conditions in which you may want to change this. This all depends on your usage patterns. You want the sample rate you are using to match the media you use the most. If your computer has to change the sampling rate of the media to suit the hardware it is likely, though not guaranteed that you will have a loss in audio quality. This is most noticable in downsampling (ie. 96000hz &rarr; 48000hz). There is an article about this issue in [http://www.stereophile.com/news/121707lucky/ "Stereophile"] which was [http://lists.apple.com/archives/coreaudio-api/2008/Jan/msg00272.html discussed] on Apple's "CoreAudio API" mailing list if you wish to learn more about this issue. <br />
<br />
Some example sample rates:<br />
<br />
* 44100hz - Sample rate of standard [http://en.wikipedia.org/wiki/Red_Book_%28audio_CD_standard%29 Red Book] audio cds.<br />
* 88000hz - Sample rate of [http://en.wikipedia.org/wiki/Super_Audio_CD SACD] high definition audio discs/downloads. It is rare that your motherboard will support this sample rate.<br />
* 96000hz - Sample rate of most high definition audio downloads. If your motherboard is an [http://en.wikipedia.org/wiki/AC%2797 AC'97] motherboard, this is likely to be your highest bitrate.<br />
* 192000hz - Sample rate of BluRay, and some (very few) high definition downloads. Support for external audio reciever equipment is limited to high end audio. Not all motherboards support this. An example of a motherboard chipset that would support this includes [http://en.wikipedia.org/wiki/Intel_High_Definition_Audio Intel HDA audio]. <br />
<br />
To check what your sample rate is currently set to:<br />
<br />
# Run <code>"ossmix | grep rate"</code>. <br />
<br />
You are likely to see <code>"vmix0-rate <decimal value> (currently 48000) (Read-only)"</code>.<br />
<br />
If you do not see a "vmix0-rate" (or "vmix1-rate", etc.) being outputted, than it probably means that vmix is disabled. In that case, OSS will use the rate requested by the program which uses the device, so this section doesn't apply. Exception: envy24(ht) cards have a setting envy24.rate which has a similiar function (see "oss_envy24" manpage). You can follow these steps, but at step 2, change with ossmix the value of "envy24.rate" as well.<br />
<br />
Steps to affect the change:<br />
<br />
# First, make sure your card is able to use the new rate. Run "ossinfo -v2" and see if the wanted rate is in the "Native sample rates" output.<br />
# As root, run <code>"/usr/lib/oss/scripts/killprocs.sh"</code>. Be aware, this will close any program that currently has an open sound channel (examples being media players, Firefox as of 3.5 if you have xulrunner-oss installed, and the gnome volume control).<br />
# After all programs occupying vmix are terminated, run as root: <code>"vmixctl rate /dev/dsp 96000"</code> replacing the rate with your desired sample rate.<br />
# Run <code>"ossmix | grep rate"</code> and check for <code>"vmix0-rate <decimal value> (currently 96000) (Read-only)"</code> to see if you were successful.<br />
#''' Make changes permanent''' use the soundon.user file to set the rate for every soundon<br />
write <code>"vmixctl rate /dev/dsp 96000" in the file /usr/lib/oss/soundon.user</code> and make it executable.<br />
<br />
===Changing the Default Sound Output===<br />
<br />
When running osstest, the first test passes for the first channel, but not for the stereo or right channel, it sounds distorted/hisses. If this is what your sound is like, then it's set to the wrong output.<br />
<br />
*** Scanning sound adapter #-1 ***<br />
/dev/oss/oss_hdaudio0/pcm0 (audio engine 0): HD Audio play front<br />
- Performing audio playback test... <br />
<left> OK <right> OK <stereo> OK <measured srate 47991.00 Hz (-0.02%)> <br />
<br />
The left sounded good, the right and stereo were the distorted ones.<br />
<br />
Let the test continue until you get a working output:<br />
/dev/oss/oss_hdaudio0/spdout0 (audio engine 5): HD Audio play spdif-out <br />
- Performing audio playback test... <br />
<left> OK <right> OK <stereo> OK <measured srate 47991.00 Hz (-0.02%)> <br />
<br />
If this passed the test on all left, right and stereo, proceed to next step.<br />
<br />
So from here:<br />
[http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Changing_the_default_sound_output Changing_the_default_sound_output]<br />
you get the command to change the default output; change according to what works for you<br />
sudo ln -sf /dev/oss/oss_hdaudio0/spdout0 /dev/dsp_multich<br />
With 5.1 surround, chose dsp_multichannel; with 2 channel, dsp should work.<br />
<br />
===Creative Sound Blaster X-Fi Surround 5.1 SB1090 USB===<br />
<br />
This information is completely from [http://www.4front-tech.com/forum/viewtopic.php?f=3&t=3423 4front-tech.com] ; courtesy of kristian and Maxa. Thanks!!<br />
<br />
It's surprising to learn that the external card does not work just because of a missing true return value in the function write_control_value(...) in ossusb_audio.c.<br />
<br />
To fix this, a recompile of oss is nessasary, for now.<br />
<br />
1. Grab the latest oss from the Arch Repo<br />
http://repos.archlinux.org/wsvn/community/oss/repos/community-x86_64/<br />
<br />
2. Extract it<br />
<br />
3. cd to the folder, I renamed the folder to oss<br />
<br />
4. run makepkg --nobuild<br />
<br />
5. cd to src/kernel/drv/oss_usb/ ; '''edit the ossusb_audio.c''' ; '''add a Return 1''' ; should look like so and '''SAVE'''<br />
static int<br />
write_control_value (ossusb_devc * devc, udi_endpoint_handle_t * endpoint,<br />
int ctl, int l, unsigned int v)<br />
{<br />
return 1;<br />
<br />
6. cd to src/kernel/setup and edit srcconf_linux.inc, search for -Werror and remove it, otherwise OSS will not compile.<br />
<br />
7. do a makepkg --noextract<br />
<br />
Now you must install the package with pacman -U ; remove oss first if already installed <nowiki>(pacman -Rd oss)</nowiki><br />
<br />
===A simple systray applet===<br />
Want a applet to control volume like in GNOME? From [http://bbs.archlinux.org/viewtopic.php?id=77440 here] I got a usable [http://pastebin.furver.se/0xflchkfz/ one]. <br />
<br />
Download [http://pastebin.furver.se/0xflchkfz/0xflchkfz.txt this] script and rename whatever you want, e.g.: ossvolctl. run the following command:<br />
$chmod +x ossvolctl<br />
#cp ossvolctl /usr/bin/ossvolctl<br />
or<br />
#install -Dm755 ossvolctl /usr/bin/ossvolctl<br />
<br />
===Start ossxmix docked to systray on startup===<br />
<br />
'''KDE 4'''<br />
<br />
Create an application launcher file named <code>ossxmix.desktop</code> in you local application launchers directory (<code>~/.local/share/applications/</code> then enter:<br />
<br />
<pre>[Desktop Entry]<br />
Name=Open Sound System Mixer<br />
GenericName=Audio Mixer<br />
Exec=ossxmix -b<br />
Icon=audio-card<br />
Categories=Application;GTK;AudioVideo;Player;<br />
Terminal=false<br />
Type=Application<br />
Encoding=UTF-8</pre><br />
<br />
To add it to autostart when loading the desktop environment:<br />
<br />
System Settings > Advanced tab > Autostart. Then click add program and choose it from the 'Multimedia' list.<br />
<br />
'''Gnome''' <br />
<br />
*As Root create a file /usr/local/bin/ossxmix_bg with the following content:<br />
<br />
<pre><br />
#!/bin/bash<br />
exec /usr/bin/ossxmix -b<br />
</pre><br />
<br />
Goto System > Preferences > Start Up Applications<br />
<br />
*Click Add, Type OSSMIX in Name field and <code>/usr/local/bin/ossxmix_bg</code> in Command field then click Add button.<br />
<br />
*Login and Logout to see the changes.<br />
<br />
===Record sound output from a program===<br />
<br />
* [http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Recording_sound_output_of_a_program Recording sound output of a program].<br />
<br />
===Suspend and Hibernation===<br />
<br />
OSS does not automatically support suspend meaning that OSS must be manually stopped prior to suspending or hibernating.<br />
<br />
OSS provides <tt>soundon</tt> and <tt>soundoff</tt> to enable and disable OSS, although any processes that use sound must be terminated first.<br />
<br />
The following script is a rather basic method of automatically unloading OSS prior to suspending and reloading afterwards.<br />
<br />
#!/bin/sh<br />
. "${PM_FUNCTIONS}"<br />
<br />
suspend_osssound()<br />
{<br />
/usr/lib/oss/scripts/killprocs.sh<br />
/usr/sbin/soundoff<br />
}<br />
<br />
resume_osssound()<br />
{<br />
/usr/sbin/soundon<br />
}<br />
<br />
case "$1" in<br />
hibernate|suspend)<br />
suspend_osssound<br />
;;<br />
thaw|resume)<br />
resume_osssound<br />
;;<br />
*) exit $NA<br />
;;<br />
esac<br />
<br />
Save the contents of the script (as root) into {{Filename|/etc/pm/sleep.d/50ossound}} and make it executable. {{Filename| chmod a+x /etc/pm/sleep.d/50ossound}}<br />
<br />
{{Note|This script is rather basic and will terminate any application directly accessing OSS, save your work prior to suspending/hibernating.}}<br />
<br />
OSS does not support suspending but we don't care or better [[Suspend_to_RAM|s2ram]] works fine without stopping OSS.<br />
Just create a nice suspend script to /sbin/suspend and make it executable.<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
if [ [ $EUID -ne 0 ] ]; then<br />
## Checking if you are a root or not<br />
echo "This script must be run as root" 1>&2<br />
exit 1<br />
fi<br />
<br />
s2ram -f<br />
<br />
sleep 2<br />
<br />
/etc/rc.d/oss restart 2>/tmp/oss.txt<br />
<br />
if [ $? -gt 0 ]; then<br />
echo "OSS restart failed check /tmp/oss.txt for advice"<br />
fi<br />
<br />
exit 0<br />
</pre><br />
<br />
That's all your apps are fine and suspend works. \o/<br />
<br />
{{Note | If you are using Opera you must kill operapluginwrapper before suspend. To do this add '''<nowiki>PID=`pidof operapluginwrapper`;kill -9 $PID</nowiki>''' before s2ram -f. }}<br />
<br />
===ALSA emulation===<br />
You can instruct <tt>alsa-lib</tt> to use OSS as its audio output system. This works as a sort of ALSA emulation.<br />
<br />
Note, however, that this method may introduce additional latency in your sound output, and that the emulation is not complete and doesn't work with all applications. It doesn't work, for example, with programs that try to detect devices using ALSA.<br />
<br />
So, as most applications support OSS directly, use this method only as a last resort.<br />
<br />
In the future, more complete methods may be available for emulating ALSA, such as <tt>libsalsa</tt> and <tt>cuckoo</tt>.<br />
<br />
====Instructions====<br />
<br />
* Install the <tt>alsa-plugins</tt> package.<br />
<br />
# pacman -S alsa-plugins<br />
<br />
* Edit {{Filename|/etc/asound.conf}} as follows.<br />
<br />
pcm.oss {<br />
type oss<br />
device /dev/dsp<br />
}<br />
<br />
pcm.!default {<br />
type oss<br />
device /dev/dsp<br />
}<br />
<br />
ctl.oss {<br />
type oss<br />
device /dev/mixer<br />
}<br />
<br />
ctl.!default {<br />
type oss<br />
device /dev/mixer<br />
}<br />
<br />
{{Note | If you don't want to use OSS anymore, don't forget to revert changes that you do here in {{Filename|/etc/asound.conf}}.}}<br />
<br />
==Experimental packages==<br />
<br />
===Mercurial repository version===<br />
<br />
There is a [http://aur.archlinux.org/packages.php?ID=21126 oss-mercurial package] in AUR. This package compiles and installs the latest OSS development version direcly from the Mercurial repository.<br />
<br />
You can try this package if you want to contribute code to OSS or if only a very recent change in OSS code introduced support to your sound device.<br />
<br />
If you want oss to take care of your flash sound (as well as the sound in Adobe-Air applications) you will need to install libflashsupport:<br />
<br />
# pacman -S libflashsupport</div>Hinrichhttps://wiki.archlinux.org/index.php?title=IOS&diff=109811IOS2010-06-27T17:05:49Z<p>Hinrich: </p>
<hr />
<div>{{Lowercase_title}}<br />
[[Category:Sound (English)]]<br />
[[Category:HOWTOs (English)]] {{DISPLAYTITLE:iPod}}<br />
== Introduction ==<br />
<br />
In general, use of an iPod can be accomplished by simply mounting it somewhere and then pointing a libgpod-compatible program at that mountpoint. Amarok, Rhythmbox, and gtkpod are all capable of this.<br />
<br />
=== Changing iPod Mountpoint ===<br />
<br />
HAL will mount an attached iPod to /media/<iPod name>. If the volume label of your iPod is long, or contains a mixture of spaces, and/or lower-case and capital letters, it may present an inconvenience. You may easily change the volume label for more expedient access using <tt>mlabel</tt> from the <tt>mtools</tt> package:<br />
<br />
* Get and confirm the current volume label:<br />
# mlabel -i /dev/sd''xx'' -s ::<br />
* Set the new volume label (as iPod)<br />
# mlabel -i /dev/sd''xx'' -s ::iPod<br />
Where ''/dev/sdxx'' is the current mountpoint of your iPod.<br />
<br />
HAL will now automount iPod to /media/iPod.<br />
<br />
== Converting video for iPod ==<br />
=== Gen 5/5.5 ===<br />
==== DVD to iPod ====<br />
'''Get with:''' http://diveintomark.org/public/2007/06/podencoder.txt<br><br />
'''Depends on:''' aur/gpac mplayer<br />
<br />
Has detailed help, and is fairly self explanatory.<br />
<br />
Mirrored at http://src.iphitus.org/scripts/podencoder.txt<br />
<br />
An alternative is to use a method suggested at [DVD Ripping] then use one of the programs listed below to convert that to an iPod-friendly format.<br />
<br />
==== Video File to iPod ====<br />
'''Get with:''' http://src.iphitus.org/scripts/mp4ize.txt<br><br />
'''Depends on:''' mplayer<br />
<br />
I originally found this script here: http://thomer.com/howtos/ipod_video.html http://thomer.com/howtos/mp4ize <br />
It has been modified to properly handle filenames with unusual characters. Thanks to Thomer for the great script.<br />
<br />
=== Handbrake ===<br />
<br />
[http://handbrake.fr/ Handbrake] is a nifty tool with presets for a variety of iPod versions. A CLI version is available from pacman by:<br />
pacman -S handbrake<br />
or a version with a GTK interface by:<br />
yaourt -S handbrake-gtk-svn<br />
(See [[Yaourt]] for information on setting up yaourt)<br />
<br />
the version within the package managers seem to be broken though (ie Handbrake version 0.9.3<br />
visit here http://forum.handbrake.fr/viewtopic.php?f=6&t=12464#p61835<br />
or here http://aur.archlinux.org/packages.php?ID=29320<br />
<br />
If you do decide to take the CLI way, a good guide is available at http://trac.handbrake.fr/wiki/CLIGuide,<br />
<br />
=== More Advanced/Configurable Methods ===<br />
<br />
==== Avidemux ====<br />
'''Get with:''' pacman -S avidemux<br />
<br />
This can convert to mp4 files. If you enforce a hard max of bitrate @ 700ish and keep the video size to 720x480 or 320x240 than it works fine for video file exporting.<br />
<br />
==== Mencoder ====<br />
<br />
'''Get with:''' pacman -S mplayer<br />
<br />
Has ''extremely'' comprehensive configuration support, which will be able to spit out iPod-compatible video files. Check out <tt>man mencoder</tt>; a lot of mplayer opts will also affect encoding.<br />
<br />
A basic guide is also available at [[Mencoder]].<br />
<br />
An example command to encode iPhone/iPod Touch-compatible video:<br />
<br />
mencoder INPUT -o output.mp4 \<br />
-vf scale=480:-10,harddup \<br />
-oac faac -faacopts mpeg=4:object=2:raw:br=128 \<br />
-of lavf -lavfopts format=mp4 \<br />
-ovc x264 -x264encopts nocabac:level_idc=30:bframes=0<br />
<br />
==== FFMpeg ====<br />
<br />
'''Get with:''' pacman -S ffmpeg<br />
<br />
Another encoder with comprehensive configuration support. Example command to encode for 5G iPod:<br />
<br />
ffmpeg -vcodec xvid -b 300 -qmin 3 -qmax 5 -bufsize 4096 \<br />
-g 300 -acodec aac -ab 96 -i INPUT -s 320x240 \<br />
-aspect 4:3 output.mp4<br />
<br />
or iPod Touch/iPhone compatible video output:<br />
<br />
ffmpeg -f mp4 -vcodec mpeg4 -maxrate 1000 -b 700 -qmin 3 -qmax 5\<br />
-bufsize 4096 -g 300 -acodec aac -ab 192 -s 480×320 -aspect 4:3 -i INPUT output.mp4<br />
<br />
== iPhone/iPod Touch ==<br />
<br />
=== Introduction ===<br />
By default, neither the iPhone nor the iPod Touch present mass storage capability over USB, though there exist two solutions for accessing your files.<br />
<br />
The first is to mount your device through the FUSE filesystem SSHFS. This requires jailbreaking, which at the moment requires access to a computer running Mac OS or a recent version of Windows, and [http://www.quickpwn.com/ QuickPwn]. After jailbreaking, an SSH server will also need to be installed on the device, which can be done through the Cydia program, installed on the device during the jailbreak process.<br />
<br />
The second is to use a different FUSE filesystem called [http://matt.colyer.name/projects/iphone-linux/ iFuse], which allows you to mount your device through USB, as you normally would. This method requires no hacking and is in general the better solution, though be aware that the software is still under heavy development. As of late, however, it has proven to be rather reliable and stable.<br />
<br />
Note: '''The current development releases of libgpod and gtkpod (libgpod-git & gtkpod-git) support the iPod Touch and the Iphone OS 3.1.x. It's possible to transfer pictures and music without limitations'''<br />
<br />
Refer to this page:[https://help.ubuntu.com/community/PortableDevices/iPhone#Using%20iTunes%20via%20Sun%20Virtualbox%20running%20Windows]<br />
<br />
=== Making Friends with the Device ===<br />
<br />
==== The SSHFS Way ====<br />
<br />
After this the easiest way to properly initialise a few things on the device's side is with the [http://launchpad.net/ipod-convenience iPod convenience script]. This is available in AUR:<br />
# yaourt -S ipod-convenience<br />
(See [[Yaourt]] for information on setting up yaourt)<br />
<br />
Next do <tt>modprobe fuse</tt> to actually load the fuse module. You may also want to add it to your MODULES array in /etc/rc.conf to have it loaded on boot.<br />
<br />
A few things may need changing in the script, depending on your setup. If you don't use sudo, replace:<br />
sudo lsusb -v -d 05ac: | grep iSerial | awk '{print $3}' | cut -b1-16 | xargs printf "FirewireGuid: 0x%s" >> $MOUNTPOINT/iTunes_Control/Device/SysInfo<br />
with:<br />
su -c "lsusb -v -d 05ac: | grep iSerial | awk '{print $3}' | cut -b1-16 | xargs printf \"FirewireGuid: 0x%s\" >> $MOUNTPOINT/iTunes_Control/Device/SysInfo"<br />
in the file /usr/share/ipod-convenience/mount-umount. You may also need to replace:<br />
PROCESS=`ssh root@$IPADDRESS ps x | grep MobileMusicPlayer | grep -v grep | awk '{print $1}'`<br />
with:<br />
PROCESS=`ssh root@$IPADDRESS ps ax | grep MobileMusicPlayer | grep -v grep | awk '{print $1}'`<br />
(I'm not sure under what circumstances this is necessary; it was on my iPod Touch running 2.2.1, and it won't have any adverse affect under other firmware version)<br />
<br />
After that, edit the <tt>/etc/default/ipod-convenience</tt> file with details of your device's IP address, and create the mount pount, which is <tt>/media/ipod</tt> by default (make sure to set the permissions correctly if you want it accessible by a regular user)<br />
<br />
To actually mount the device, run <tt>ipod-touch-mount</tt> or <tt>iphone-mount</tt> (they both do exactly the same thing so it doesn't matter which). This should prompt for the root password of the device twice, which is 'alpine' by default in firmware versions 1.1 and up. This will need to be done every time you want to sync. (This can be done without having to type the password each time by using SSH keys - see [[Using SSH Keys]] for more information)<br />
<br />
==== The iFuse Way ====<br />
<br />
You will need to install usbmuxd, libplist, libimobiledevice, and ifuse, so either go over to the AUR or:<br />
# yaourt -S usbmuxd libplist libimobiledevice ifuse<br />
(See [[Yaourt]] for information on setting up yaourt)<br />
<br />
Now make sure that you have the fuse module loaded by doing <tt>modprobe fuse</tt>, assuming that you don't have it in /etc/rc.conf already.<br />
<br />
You can now mount your device:<br />
# ifuse <mountpoint><br />
The mountpoint field is where you want to have it mounted.<br />
<br />
And you're done! You should be able to point your syncing software of choice to the mountpoint and be able to transfer files.<br />
<br />
You can also try adding this to your udev rules for automounting:<br />
{{File|name=/etc/udev/rules.d/91-iphone-automount.rules|content=<nowiki><br />
#Detect type of iPhoneOS it is<br />
SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/129[13]/*", ENV{INTERFACE}=="255/*", ENV{dir_name}="ipod"<br />
SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/129[024]/*", ENV{INTERFACE}=="255/*", ENV{dir_name}="iphone"<br />
SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[13]", ENV{dir_name}="ipod"<br />
SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[024]", ENV{dir_name}="iphone"<br />
<br />
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[0-9]", RUN+="/bin/mkdir -p '/media/%E{dir_name}'", RUN+="/usr/bin/ifuse '/media/%E{dir_name}' -u '%s{serial}' -o sync,allow_other"<br />
<br />
ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/129[0-9]/*", ENV{INTERFACE}=="255/*", RUN+="/bin/umount -l '/media/%E{dir_name}'", RUN+="/bin/rmdir '/media/%E{dir_name}'"<br />
</nowiki>}}<br />
<br />
=== Unobfuscating the Database ===<br />
<br />
Since firmware version 2.0, Apple has obfuscated the music database. If you are using recent firmware, the file <tt>/System/Library/Lockdown/Checkpoint.xml</tt> can be modified to enable use of the older, non-obfuscated database. Replace:<br />
<key>DBVersion</key><br />
<integer>4</integer><br />
with:<br />
<key>DBVersion</key><br />
<integer>2</integer><br />
Then reboot your device.<br />
<br />
=== Syncing ===<br />
<br />
Use your favourite iPod-compatible program. Individual configuration will vary, but in general, pointing your program to your specified mount point should yield good results.<br />
<br />
After you've synced, run <tt>ipod-touch-umount</tt> (or <tt>iphone-umount</tt>, depending on your taste) to unmount the SSHFS file system and restart the <tt>MobileMusicPlayer</tt> process on the device, so that the new music database is read.<br />
<br />
If you used iFuse, simply type:<br />
# umount <mountpoint><br />
You will still need to reload the MobileMusicPlayer process. If your device is not jailbroken, then you are stuck restarting it.<br />
<br />
=== The iFuse Way - iPhone OS 3.x and 4.x ===<br />
''Warning: this software is considered unstable and should probably not be used in a productive environment''<br />
<br />
Make sure you already installed base-devel, which contains several programs needed to compile your new components. If you did not, just run:<br />
<br />
# pacman -S base-devel<br />
<br />
which will install everything you will need.<br />
<br />
You will need to install libplist, libimobiledevice, libgpod-git (remove libgpod if previously installed!), usbmuxd and ifuse, so either go over to the AUR or:<br />
# yaourt -Rdn libgpod<br />
# yaourt -S libplist libimobiledevice ifuse usbmuxd libgpod-git<br />
(See [[Yaourt]] for information on setting up yaourt)<br />
<br />
Now make sure that you have the fuse module loaded by doing <tt>modprobe fuse</tt>, assuming that you don't have it in /etc/rc.conf already.<br />
Check if the group "usbmux" has been created and add your user using<br />
# gpasswd -a <user> usbmux<br />
<br />
To make sure the new rules apply, execute<br />
$ udevadm control --reload-rules<br />
and plug in your iPod/iPhone. <br />
<br />
Run as ROOT:<br />
# usbmuxd<br />
Now you should the be able to mount your device by running<br />
$ ifuse ~/ipod<br />
or similar. Make sure the directory used exists and is accessible to your user.<br />
<br />
Mount the device and create the iTunes_Control/Device directory. Then, get your UUID. It should be in the syslog from usbmuxd, or you can find it by running <br />
$ lsusb -v | egrep "iSerial.*[a-f0-9]{40}"<br />
It should be 40 characters long. Then, run <br />
$ ipod-read-sysinfo-extended <uuid> <mountpoint>. <br />
This should generate a file named iTunes_Control/Device/SysInfoExtended.<br />
<br />
Now, start up your favourite app, it should detect the device via libgpod.<br />
I recommend using gtkpod-git for the time being, as that's what the libgpod devs seem to be using for debugging purposes.<br />
<br />
=== Rhythmbox ===<br />
<br />
Rhythmbox uses the Gnome Virtual File System to detect mobile devices. If using the iFuse way, gvfs-afc needs to be installed:<br />
# pacman -S gvfs-afc<br />
<br />
== iPod Classic/Nano3g ==<br />
<br />
You need to set up the iPod to make libgpod able to find its firewire id. For this, you will need to get your firewire id manually<br />
<br />
1) Mount the iPod as a rw mountpoint. In the following example, I will use /mnt/ipod.<br />
<br />
2 ) Find the serial number by typing<br />
<br />
sudo lsusb -v | grep -i Serial <br />
<br />
this should print a 16 character long string like 00A1234567891231 (it will have no colons or hyphens) <br />
<br />
3) Once you have that number, create or edit /mnt/ipod/iPod_Control/Device/SysInfo. Add to that file the line below:<br />
<br />
FirewireGuid: 0xffffffffffffffff<br />
<br />
(replace ffffffffffffffff with the 16 digit string you obtained at the previous step and don't forget the trailing 0x before the string)<br />
<br />
Your iPod can now be managed with amarok or gtkpod.<br />
<br />
== See also ==<br />
<br />
http://help.ubuntu.com/community/PortableDevices/iPhone for more information about iPhone/iPod Touch support</div>Hinrichhttps://wiki.archlinux.org/index.php?title=Rtl8187_wireless&diff=86836Rtl8187 wireless2009-12-08T12:51:59Z<p>Hinrich: /* Method 2: Aircrack-ng patched driver */</p>
<hr />
<div>[[Category:Communication and network (English)]]<br />
[[Category:HOWTOs (English)]]<br />
This page describes how to get the '''rtl8187''' wifi-driver working<br />
<br />
Note: The rtl8187 driver is included in vanilla 2.6.23!<br />
<br />
<br />
The rtl8187 chip is made for usb-cards/dongles<br />
<br />
It supports 802.11(a)/b/g and the following encryptions: WEP, WPA and WPA2<br />
<br />
The driver's source is released under the GPL<br />
<br />
= Installing the driver =<br />
<br />
If you are on 2.6.23 or above you have to enable CONFIG_RTL8187 in your kernel-config.<br />
<br />
You can check if this option is enabled in your current kernel by executing:<br />
zcat /proc/config.gz | grep CONFIG_RTL8187<br />
If it outputs<br />
CONFIG_RTL8187=m<br />
or<br />
CONFIG_RTL8187=y<br />
then your kernel includes the rtl8187 driver<br />
<br />
<br />
If you are using anything lower than 2.6.23 you can choose between the following methods:<br />
<br />
== Compiling the module from the source-code ==<br />
<br />
No HOWTO yet<br />
<br />
== Patch your 2.6.22 kernel ==<br />
<br />
Note: if you are already running 2.6.23 or later this is not necessary anymore - just enable the Realtek 8187 USB support in your kernel-config<br />
<br />
At first you have to get the kernel-sources<br />
After that you'll need to download two patches: one for the rtl8187 driver and one for EEPROM_93CX6 (rtl8187 requires EEPROM_93CX6-support)<br />
<br />
Save the following link as EEPROM_93CX6.patch (download it to your harddisk with wget -O EEPROM_93CX6.patch $URL):<br />
<br />
[http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=9467d64b0e88763914c01f71ddf591b166c4f526;hp=7dcca30a32aadb0520417521b0c44f42d09fe05c EEPROM_93CX6.patch]<br />
<br />
Then save the following link as rtl8187.patch (download it to your harddisk with wget -O rtl8187.patch $URL):<br />
<br />
[http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=605bebe23bf6ac66c0a717e663a7baa2f981294d;hp=4b914dc0493edff19ff698a18198a173a14ba9d2 rtl8187.patch]<br />
<br />
Now extract your kernel sources, cd into the kernel-source directory<br />
and run<br />
patch -Np1 -i $path/to/EEPROM_93CX6.patch<br />
patch -Np1 -i $path/to/rtl8187.patch<br />
<br />
make menuconfig<br />
Now activate: <pre> Device Drivers ---> Misc devices ---> EEPROM 93CX6 support </pre> (I compiled it directly into the kernel with [*])<br />
<br />
Then go to: <pre> Device Drivers ---> Network device support ---> Wireless LAN ---> Wireless LAN (IEEE 802.11) -> Realtek 8187 USB support </pre><br />
(I compiled this as module [m])<br />
<br />
What if you can't find "Realtek 8187 USB support" in the kernel config menu?<br />
Don't panic - make sure you activated EEPROM 93CX6 support <pre> Device Drivers ---> Misc devices ---> EEPROM 93CX6 support </pre> and the Generic IEEE 802.11 Networking Stack (mac80211) <pre> Networking ---> Wireless ---> Generic IEEE 802.11 Networking Stack (mac80211) </pre><br />
<br />
<br />
Now you can save your kernel-config and start compiling<br />
After a reboot the module rtl8187 should be available.<br />
You can load it like this:<br />
modprobe rtl8187<br />
You can also add rtl8187 to the MODULES-section in your rc.conf<br />
<br />
If you want to add rtl8187 support 'The Arch-Way' make sure to add "patch -Np1 -i ../foo.bar" to your kernel-PKGBUILD<br />
<br />
=Using and testing the driver/Troubleshooting=<br />
<br />
Make sure that you have loaded the rtl8187 module with <br />
modprobe rtl8187<br />
Then run<br />
dmesg | grep rtl8187<br />
You should see some output like this <pre> usbcore: registered new interface driver rtl8187 </pre><br />
If you see that line everything should be OK<br />
<br />
== Using the driver ==<br />
<br />
If everything is right, you should have two new interfaces: wlan0 and wmaster0<br />
If you don't see wlan0 just run<br />
ifconfig wlan0 up<br />
<br />
To list all available wifi-networks just run<br />
iwlist wlan0 scan<br />
<br />
For more information about configuring your wifi-network see here: [http://wiki.archlinux.org/index.php/Wireless_Setup#Setup_and_Boot http://wiki.archlinux.org/index.php/Wireless_Setup#Setup_and_Boot]<br />
<br />
== What to do if your connection always times out? ==<br />
<br />
=== Method 1: Lowering the transfer rate manually ===<br />
The solution can be found in this thread: http://bbs.archlinux.org/viewtopic.php?pid=299642<br />
<br />
Just set the rate to 5.5<br />
iwconfig wlan0 rate 5.5M auto<br />
<br />
Actually this worked for a while but it would still start revving out, so making the last <br />
item "fixed" ensures it does not spin. Btw. If your wireless card has already gone into <br />
meltdown issuing this command will get it working again. <br />
<br />
iwconfig wlan0 rate 5.5M fixed <br />
<br />
I have also tried setting this in the IWOPTS, but it does not seem to be taking, so now what I do until I get this sorted out is:<br />
netcfg2 -c <your wireless profile> <br />
iwconfig wlan0 rate 5.5M fixed<br />
<br />
And then it never times out (at least for me)<br />
<br />
Found the $POST_UP option, so appending this to your profile config<br />
file, sets the rate correctly when using the netcfg tools.<br />
<br />
POST_UP="iwconfig wlan0 rate 5.5M fixed"<br />
<br />
Actually for my card setting the rate higher still works, so now this line looks like:<br />
<br />
POST_UP="iwconfig wlan0 rate 12M fixed"<br />
<br />
Now calling;<br />
<br />
netfcg2 -c <wireless profile><br />
or <br />
netcfg-menu <br />
and choosing your profile works without extra commands.<br />
<br />
=== Method 2: Aircrack-ng patched driver ===<br />
Another method that works for some users are the Aircrack-ng patches for the rtl8187 driver. This driver can be installed by the [http://aur.archlinux.org/packages.php?ID=15375 rtl8187-ng] package from [[AUR]].<br />
<br />
=== Method 3: Using Ndiswrapper ===<br />
If everything else fails, then you are left with using Ndiswrapper. Ndiswrapper takes Windows RTL8187 drivers and uses them to enable your card.<br />
<br />
Symptoms which suggest you may have better luck with Ndiswrapper:<br />
<br />
* "iwlist wlan0 scan" results are irregular and/or don't show some APs.<br />
* Everything seems to be working, except the DHCP request, which may just time out.<br />
<br />
1. Install ndiswrapper:<br />
pacman -Sy ndiswrapper<br />
<br />
2. Download the Windows drivers:<br />
wget http://www.kuratkull.com/ndiswrapper/ndisdrivers.tar.gz<br />
<br />
3. Extract the drivers:<br />
gzip -dc ndisdrivers.tar.gz | tar xf -<br />
<br />
4. If you have the rtl8187 module loaded, then do this:<br />
rmmod rtl8187<br />
It is suggested that you remove previous ndiswrapper drivers, if you have installed them.<br />
ndiswrapper -l<br />
ndiswrapper -r <drivername><br />
<br />
Also add "ndiswrapper" and "!rtl8187" to /etc/rc.conf under MODULES - this will stop rtl8187 from loading on boot, and will enable ndiswrapper to load on boot.<br />
<br />
5. Install the driver: <br />
If you have an older kernel(eg. older than 2.6.28.*), do:<br />
<br />
cd ./ndisdrivers/Win98-krnl24/<br />
<br />
If you have a newer kernel (eg. 2.6.28.*), do:<br />
<br />
cd ./ndisdrivers/Win98seME-krnl28/<br />
<br />
Proceed with:<br />
ndiswrapper -i net8187b.inf<br />
ndiswrapper -m<br />
modprobe ndiswrapper<br />
<br />
Proceed to connect as you normally would.<br />
<br />
=Misc Links=<br />
*[http://rtl-wifi.sourceforge.net/ Project-page of the rtl-wifi driver project]</div>Hinrichhttps://wiki.archlinux.org/index.php?title=Rtl8187_wireless&diff=86835Rtl8187 wireless2009-12-08T12:49:46Z<p>Hinrich: </p>
<hr />
<div>[[Category:Communication and network (English)]]<br />
[[Category:HOWTOs (English)]]<br />
This page describes how to get the '''rtl8187''' wifi-driver working<br />
<br />
Note: The rtl8187 driver is included in vanilla 2.6.23!<br />
<br />
<br />
The rtl8187 chip is made for usb-cards/dongles<br />
<br />
It supports 802.11(a)/b/g and the following encryptions: WEP, WPA and WPA2<br />
<br />
The driver's source is released under the GPL<br />
<br />
= Installing the driver =<br />
<br />
If you are on 2.6.23 or above you have to enable CONFIG_RTL8187 in your kernel-config.<br />
<br />
You can check if this option is enabled in your current kernel by executing:<br />
zcat /proc/config.gz | grep CONFIG_RTL8187<br />
If it outputs<br />
CONFIG_RTL8187=m<br />
or<br />
CONFIG_RTL8187=y<br />
then your kernel includes the rtl8187 driver<br />
<br />
<br />
If you are using anything lower than 2.6.23 you can choose between the following methods:<br />
<br />
== Compiling the module from the source-code ==<br />
<br />
No HOWTO yet<br />
<br />
== Patch your 2.6.22 kernel ==<br />
<br />
Note: if you are already running 2.6.23 or later this is not necessary anymore - just enable the Realtek 8187 USB support in your kernel-config<br />
<br />
At first you have to get the kernel-sources<br />
After that you'll need to download two patches: one for the rtl8187 driver and one for EEPROM_93CX6 (rtl8187 requires EEPROM_93CX6-support)<br />
<br />
Save the following link as EEPROM_93CX6.patch (download it to your harddisk with wget -O EEPROM_93CX6.patch $URL):<br />
<br />
[http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=9467d64b0e88763914c01f71ddf591b166c4f526;hp=7dcca30a32aadb0520417521b0c44f42d09fe05c EEPROM_93CX6.patch]<br />
<br />
Then save the following link as rtl8187.patch (download it to your harddisk with wget -O rtl8187.patch $URL):<br />
<br />
[http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=605bebe23bf6ac66c0a717e663a7baa2f981294d;hp=4b914dc0493edff19ff698a18198a173a14ba9d2 rtl8187.patch]<br />
<br />
Now extract your kernel sources, cd into the kernel-source directory<br />
and run<br />
patch -Np1 -i $path/to/EEPROM_93CX6.patch<br />
patch -Np1 -i $path/to/rtl8187.patch<br />
<br />
make menuconfig<br />
Now activate: <pre> Device Drivers ---> Misc devices ---> EEPROM 93CX6 support </pre> (I compiled it directly into the kernel with [*])<br />
<br />
Then go to: <pre> Device Drivers ---> Network device support ---> Wireless LAN ---> Wireless LAN (IEEE 802.11) -> Realtek 8187 USB support </pre><br />
(I compiled this as module [m])<br />
<br />
What if you can't find "Realtek 8187 USB support" in the kernel config menu?<br />
Don't panic - make sure you activated EEPROM 93CX6 support <pre> Device Drivers ---> Misc devices ---> EEPROM 93CX6 support </pre> and the Generic IEEE 802.11 Networking Stack (mac80211) <pre> Networking ---> Wireless ---> Generic IEEE 802.11 Networking Stack (mac80211) </pre><br />
<br />
<br />
Now you can save your kernel-config and start compiling<br />
After a reboot the module rtl8187 should be available.<br />
You can load it like this:<br />
modprobe rtl8187<br />
You can also add rtl8187 to the MODULES-section in your rc.conf<br />
<br />
If you want to add rtl8187 support 'The Arch-Way' make sure to add "patch -Np1 -i ../foo.bar" to your kernel-PKGBUILD<br />
<br />
=Using and testing the driver/Troubleshooting=<br />
<br />
Make sure that you have loaded the rtl8187 module with <br />
modprobe rtl8187<br />
Then run<br />
dmesg | grep rtl8187<br />
You should see some output like this <pre> usbcore: registered new interface driver rtl8187 </pre><br />
If you see that line everything should be OK<br />
<br />
== Using the driver ==<br />
<br />
If everything is right, you should have two new interfaces: wlan0 and wmaster0<br />
If you don't see wlan0 just run<br />
ifconfig wlan0 up<br />
<br />
To list all available wifi-networks just run<br />
iwlist wlan0 scan<br />
<br />
For more information about configuring your wifi-network see here: [http://wiki.archlinux.org/index.php/Wireless_Setup#Setup_and_Boot http://wiki.archlinux.org/index.php/Wireless_Setup#Setup_and_Boot]<br />
<br />
== What to do if your connection always times out? ==<br />
<br />
=== Method 1: Lowering the transfer rate manually ===<br />
The solution can be found in this thread: http://bbs.archlinux.org/viewtopic.php?pid=299642<br />
<br />
Just set the rate to 5.5<br />
iwconfig wlan0 rate 5.5M auto<br />
<br />
Actually this worked for a while but it would still start revving out, so making the last <br />
item "fixed" ensures it does not spin. Btw. If your wireless card has already gone into <br />
meltdown issuing this command will get it working again. <br />
<br />
iwconfig wlan0 rate 5.5M fixed <br />
<br />
I have also tried setting this in the IWOPTS, but it does not seem to be taking, so now what I do until I get this sorted out is:<br />
netcfg2 -c <your wireless profile> <br />
iwconfig wlan0 rate 5.5M fixed<br />
<br />
And then it never times out (at least for me)<br />
<br />
Found the $POST_UP option, so appending this to your profile config<br />
file, sets the rate correctly when using the netcfg tools.<br />
<br />
POST_UP="iwconfig wlan0 rate 5.5M fixed"<br />
<br />
Actually for my card setting the rate higher still works, so now this line looks like:<br />
<br />
POST_UP="iwconfig wlan0 rate 12M fixed"<br />
<br />
Now calling;<br />
<br />
netfcg2 -c <wireless profile><br />
or <br />
netcfg-menu <br />
and choosing your profile works without extra commands.<br />
<br />
=== Method 2: Aircrack-ng patched driver ===<br />
Another method that works for some users are the Aircrack-ng patches for the rtl8187 driver. This driver can be installed by the rtl8187-ng package from [[AUR]].<br />
<br />
=== Method 3: Using Ndiswrapper ===<br />
If everything else fails, then you are left with using Ndiswrapper. Ndiswrapper takes Windows RTL8187 drivers and uses them to enable your card.<br />
<br />
Symptoms which suggest you may have better luck with Ndiswrapper:<br />
<br />
* "iwlist wlan0 scan" results are irregular and/or don't show some APs.<br />
* Everything seems to be working, except the DHCP request, which may just time out.<br />
<br />
1. Install ndiswrapper:<br />
pacman -Sy ndiswrapper<br />
<br />
2. Download the Windows drivers:<br />
wget http://www.kuratkull.com/ndiswrapper/ndisdrivers.tar.gz<br />
<br />
3. Extract the drivers:<br />
gzip -dc ndisdrivers.tar.gz | tar xf -<br />
<br />
4. If you have the rtl8187 module loaded, then do this:<br />
rmmod rtl8187<br />
It is suggested that you remove previous ndiswrapper drivers, if you have installed them.<br />
ndiswrapper -l<br />
ndiswrapper -r <drivername><br />
<br />
Also add "ndiswrapper" and "!rtl8187" to /etc/rc.conf under MODULES - this will stop rtl8187 from loading on boot, and will enable ndiswrapper to load on boot.<br />
<br />
5. Install the driver: <br />
If you have an older kernel(eg. older than 2.6.28.*), do:<br />
<br />
cd ./ndisdrivers/Win98-krnl24/<br />
<br />
If you have a newer kernel (eg. 2.6.28.*), do:<br />
<br />
cd ./ndisdrivers/Win98seME-krnl28/<br />
<br />
Proceed with:<br />
ndiswrapper -i net8187b.inf<br />
ndiswrapper -m<br />
modprobe ndiswrapper<br />
<br />
Proceed to connect as you normally would.<br />
<br />
=Misc Links=<br />
*[http://rtl-wifi.sourceforge.net/ Project-page of the rtl-wifi driver project]</div>Hinrichhttps://wiki.archlinux.org/index.php?title=Rtl8187_wireless&diff=86834Rtl8187 wireless2009-12-08T12:43:26Z<p>Hinrich: /* What to do if your connection always times out? */</p>
<hr />
<div>[[Category:Communication and network (English)]]<br />
[[Category:HOWTOs (English)]]<br />
This page describes how to get the '''rtl8187''' wifi-driver working<br />
<br />
Note: The rtl8187 driver is included in vanilla 2.6.23!<br />
<br />
<br />
The rtl8187 chip is made for usb-cards/dongles<br />
<br />
It supports 802.11(a)/b/g and the following encryptions: WEP, WPA and WPA2<br />
<br />
The driver's source is released under the GPL<br />
<br />
= Installing the driver =<br />
<br />
If you are on 2.6.23 or above you have to enable CONFIG_RTL8187 in your kernel-config.<br />
<br />
You can check if this option is enabled in your current kernel by executing:<br />
zcat /proc/config.gz | grep CONFIG_RTL8187<br />
If it outputs<br />
CONFIG_RTL8187=m<br />
or<br />
CONFIG_RTL8187=y<br />
then your kernel includes the rtl8187 driver<br />
<br />
<br />
If you are using anything lower than 2.6.23 you can choose between the following methods:<br />
<br />
== Compiling the module from the source-code ==<br />
<br />
No HOWTO yet<br />
<br />
== Patch your 2.6.22 kernel ==<br />
<br />
Note: if you are already running 2.6.23 or later this is not necessary anymore - just enable the Realtek 8187 USB support in your kernel-config<br />
<br />
At first you have to get the kernel-sources<br />
After that you'll need to download two patches: one for the rtl8187 driver and one for EEPROM_93CX6 (rtl8187 requires EEPROM_93CX6-support)<br />
<br />
Save the following link as EEPROM_93CX6.patch (download it to your harddisk with wget -O EEPROM_93CX6.patch $URL):<br />
<br />
[http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=9467d64b0e88763914c01f71ddf591b166c4f526;hp=7dcca30a32aadb0520417521b0c44f42d09fe05c EEPROM_93CX6.patch]<br />
<br />
Then save the following link as rtl8187.patch (download it to your harddisk with wget -O rtl8187.patch $URL):<br />
<br />
[http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=605bebe23bf6ac66c0a717e663a7baa2f981294d;hp=4b914dc0493edff19ff698a18198a173a14ba9d2 rtl8187.patch]<br />
<br />
Now extract your kernel sources, cd into the kernel-source directory<br />
and run<br />
patch -Np1 -i $path/to/EEPROM_93CX6.patch<br />
patch -Np1 -i $path/to/rtl8187.patch<br />
<br />
make menuconfig<br />
Now activate: <pre> Device Drivers ---> Misc devices ---> EEPROM 93CX6 support </pre> (I compiled it directly into the kernel with [*])<br />
<br />
Then go to: <pre> Device Drivers ---> Network device support ---> Wireless LAN ---> Wireless LAN (IEEE 802.11) -> Realtek 8187 USB support </pre><br />
(I compiled this as module [m])<br />
<br />
What if you can't find "Realtek 8187 USB support" in the kernel config menu?<br />
Don't panic - make sure you activated EEPROM 93CX6 support <pre> Device Drivers ---> Misc devices ---> EEPROM 93CX6 support </pre> and the Generic IEEE 802.11 Networking Stack (mac80211) <pre> Networking ---> Wireless ---> Generic IEEE 802.11 Networking Stack (mac80211) </pre><br />
<br />
<br />
Now you can save your kernel-config and start compiling<br />
After a reboot the module rtl8187 should be available.<br />
You can load it like this:<br />
modprobe rtl8187<br />
You can also add rtl8187 to the MODULES-section in your rc.conf<br />
<br />
If you want to add rtl8187 support 'The Arch-Way' make sure to add "patch -Np1 -i ../foo.bar" to your kernel-PKGBUILD<br />
<br />
=Using and testing the driver/Troubleshooting=<br />
<br />
Make sure that you have loaded the rtl8187 module with <br />
modprobe rtl8187<br />
Then run<br />
dmesg | grep rtl8187<br />
You should see some output like this <pre> usbcore: registered new interface driver rtl8187 </pre><br />
If you see that line everything should be OK<br />
<br />
== Using the driver ==<br />
<br />
If everything is right, you should have two new interfaces: wlan0 and wmaster0<br />
If you don't see wlan0 just run<br />
ifconfig wlan0 up<br />
<br />
To list all available wifi-networks just run<br />
iwlist wlan0 scan<br />
<br />
For more information about configuring your wifi-network see here: [http://wiki.archlinux.org/index.php/Wireless_Setup#Setup_and_Boot http://wiki.archlinux.org/index.php/Wireless_Setup#Setup_and_Boot]<br />
<br />
== What to do if your connection always times out? ==<br />
<br />
=== Method 1: Lowering the transfer rate manually ===<br />
The solution can be found in this thread: http://bbs.archlinux.org/viewtopic.php?pid=299642<br />
<br />
Just set the rate to 5.5<br />
iwconfig wlan0 rate 5.5M auto<br />
<br />
Actually this worked for a while but it would still start revving out, so making the last <br />
item "fixed" ensures it does not spin. Btw. If your wireless card has already gone into <br />
meltdown issuing this command will get it working again. <br />
<br />
iwconfig wlan0 rate 5.5M fixed <br />
<br />
I have also tried setting this in the IWOPTS, but it does not seem to be taking, so now what I do until I get this sorted out is:<br />
netcfg2 -c <your wireless profile> <br />
iwconfig wlan0 rate 5.5M fixed<br />
<br />
And then it never times out (at least for me)<br />
<br />
Found the $POST_UP option, so appending this to your profile config<br />
file, sets the rate correctly when using the netcfg tools.<br />
<br />
POST_UP="iwconfig wlan0 rate 5.5M fixed"<br />
<br />
Actually for my card setting the rate higher still works, so now this line looks like:<br />
<br />
POST_UP="iwconfig wlan0 rate 12M fixed"<br />
<br />
Now calling;<br />
<br />
netfcg2 -c <wireless profile><br />
or <br />
netcfg-menu <br />
and choosing your profile works without extra commands.<br />
<br />
=== Method 2: Aircrack-ng patched driver ===<br />
Another method that works for some users are the Aircrack-ng patches for the rtl8187 driver. This driver can be installed by the rtl8187-ng package from [[AUR]].<br />
<br />
=Using Ndiswrapper=<br />
If everything else fails, then you are left with using Ndiswrapper. Ndiswrapper takes Windows RTL8187 drivers and uses them to enable your card.<br />
<br />
Symptoms which suggest you may have better luck with Ndiswrapper:<br />
<br />
* "iwlist wlan0 scan" results are irregular and/or don't show some APs.<br />
* Everything seems to be working, except the DHCP request, which may just time out.<br />
<br />
1. Install ndiswrapper:<br />
pacman -Sy ndiswrapper<br />
<br />
2. Download the Windows drivers:<br />
wget http://www.kuratkull.com/ndiswrapper/ndisdrivers.tar.gz<br />
<br />
3. Extract the drivers:<br />
gzip -dc ndisdrivers.tar.gz | tar xf -<br />
<br />
4. If you have the rtl8187 module loaded, then do this:<br />
rmmod rtl8187<br />
It is suggested that you remove previous ndiswrapper drivers, if you have installed them.<br />
ndiswrapper -l<br />
ndiswrapper -r <drivername><br />
<br />
Also add "ndiswrapper" and "!rtl8187" to /etc/rc.conf under MODULES - this will stop rtl8187 from loading on boot, and will enable ndiswrapper to load on boot.<br />
<br />
5. Install the driver: <br />
If you have an older kernel(eg. older than 2.6.28.*), do:<br />
<br />
cd ./ndisdrivers/Win98-krnl24/<br />
<br />
If you have a newer kernel (eg. 2.6.28.*), do:<br />
<br />
cd ./ndisdrivers/Win98seME-krnl28/<br />
<br />
Proceed with:<br />
ndiswrapper -i net8187b.inf<br />
ndiswrapper -m<br />
modprobe ndiswrapper<br />
<br />
Proceed to connect as you normally would.<br />
<br />
=Misc Links=<br />
*[http://rtl-wifi.sourceforge.net/ Project-page of the rtl-wifi driver project]</div>Hinrichhttps://wiki.archlinux.org/index.php?title=PulseAudio&diff=83822PulseAudio2009-11-15T23:25:14Z<p>Hinrich: /* Configuration of GStreamer for PulseAudio */</p>
<hr />
<div>[[Category:HOWTOs (English)]]<br />
[[Category:Audio/Video (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|PulseAudio}}<br />
{{i18n_entry|Italiano|PulseAudio (Italiano)}}<br />
{{i18n_entry|Türkçe|PulseAudio (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
'''PulseAudio''' is a sound server for POSIX and Win32 systems. It allows to have multiple programs playing sound at one machine, among even more advanced features. PulseAudio is a drop-in replacement for the enlightened sound daemon (ESD). This article focuses on the more basic PulseAudio features.<br />
<br />
Please note, PulseAudio is ''not'' a drop-in replacement for aRts. If you use KDE 3, it is not currently possible to use PulseAudio.<br />
<br />
==Install==<br />
All packages are from the community repository so you need to have it enabled. Then, to install pulseaudio:<br />
# pacman -S pulseaudio <br />
<br />
Optionally you can install some GTK front-ends for PulseAudio (recommended):<br />
# pacman -S padevchooser paman paprefs pavucontrol pavumeter<br />
<br />
For the applications that do not support PulseAudio and support ALSA it is '''recommended''' to install the PulseAudio plugin for alsalibs. This plugin is available in the alsa-plugins package.<br />
# pacman -S alsa-plugins<br />
<br />
===Drop-in replacement for ESD (EsounD)===<br />
Current GNOME versions have support for starting ESD on session startup. Because PulseAudio can be used as drop-in replacement for ESD you can fool GNOME to load the PulseAudio daemon just like the traditional ESD daemon. To achieve this use the esdcompat script shipped with PulseAudio. Create a symlink from {{Filename|/usr/bin/esd}} to this script: <br />
# ln -sf /usr/bin/esdcompat /usr/bin/esd<br />
<br />
Now GNOME should load and make use of PulseAudio automatically on each login.<br />
<br />
Pulseaudio uses by default a different socket ({{Filename|/tmp/.esd-xxxx}}) as the stock to prevent different users to access the same socket. If you want gnome to start esd (esdcompat actually) automatically as a user you should edit the file {{Filename|/etc/pulse/system.pa}} to make it use the default socket as expected by most gnome apps. Find the line {{Codeline|"load-module module-esound-protocol-unix"}} and edit it as follows:<br />
load-module module-esound-protocol-unix socket=/tmp/.esd/socket <br />
<br />
This works only if you are the only user of the computer however, as soon as a second user starts gnome on the same computer problems are likely to appear. To have a more general solution for the problem start esdcompat on a server basis. Though some users did not have to edit the above line.<br />
<br />
==Configuring your system for Pulse==<br />
<br />
===System-wide daemon (optional)===<br />
By default, PulseAudio is run per-user and will be started automatically when it is needed. This is simpler, more efficient and more secure. If for some reason you need a system-wide daemon e.g. multiple users log in at the same time, do the following:<br />
<br />
First you need to add the "pulseaudio" daemon to {{Filename|/etc/[[rc.conf]]}}. Example:<br />
DAEMONS=(syslog-ng ipw3945d network netfs crond fam hal '''avahi-daemon''' '''pulseaudio''')<br />
<br />
To use the PulseAudio Device Chooser (padevchooser), you might also need to add the 'avahi-daemon' to this list.<br />
<br />
Then you need to add the user(s) to the pulse-access group, even for root (if you want to have sound: <br />
# gpasswd -a <user> pulse-access<br />
<br />
If you run PulseAudio as a daemon you will have to edit {{Filename|/etc/pulse/system.pa}} when you configure PulseAudio.<br />
If you run PulseAudio on a per-user basis you will have to edit {{Filename|/etc/pulse/default.pa}}.<br />
<br />
===Permissions for per-user daemon===<br />
It is a good idea to add your user to the pulse-rt group, this can help performance but does not seem to be done automatically in installation.<br />
# gpasswd -a <user> pulse-rt<br />
<br />
===Configuration of the ALSA PulseAudio plugin===<br />
It is recommended to configure ALSA for PulseAudio, since most applications use ALSA. This is done through the PulseAudio plugin for alsalibs (the ALSA PulseAudio plugin is available through the alsa-plugins package). In order for ALSA to use PulseAudio you need to edit (and most likely create) {{Filename|/etc/asound.conf}} (system wide settings) (recommended) or {{Filename|~/.asoundrc}} (settings on a per user basis) to have these lines:<br />
pcm.pulse {<br />
type pulse<br />
}<br />
ctl.pulse {<br />
type pulse<br />
}<br />
<br />
{{Codeline|pulse}} in {{Codeline|pcm.pulse}} and {{Codeline|ctl.pulse}} is just the name, you can change it but it would change the next steps.<br />
<br />
If you want ALSA to use PulseAudio by default (every program using ALSA as sound output will now use the PulseAudio plugin for ALSA) you should also add this to {{Filename|/etc/asound.conf}} or {{Filename|~/.asoundrc}}:<br />
pcm.!default {<br />
type pulse<br />
}<br />
ctl.!default {<br />
type pulse<br />
}<br />
<br />
If you selected pulse to be your default device you need to ''either'' specify the hardware device to PulseAudio in {{Filename|/etc/pulse/system.pa}} if you are using the PulseAudio daemon or in {{Filename|/etc/pulse/default.pa}} if you are using PulseAudio on a per-user basis. Example:<br />
load-module module-alsa-sink device=hw:0<br />
load-module module-alsa-source device=hw:0<br />
''or'' you can use automatic detection using hal with:<br />
load-module module-udev-detect<br />
<br />
The above line should be set by default in {{Filename|/etc/pulse/system.pa}} when running pulse as a system daemon or in {{Filename|/etc/pulse/default.pa}} when running pulse in per-user mode. It is "module-hal-detect" in older versions of pulseaudio. Make sure it is uncommented.<br />
<br />
If you have not configured PulseAudio as the ALSA default, you need to change the ALSA device to "pulse" in the applications that you use to make it work.<br />
<br />
====Multiple PulseAudio ALSA devices====<br />
If you want to use multiple sound cards or multiple virtual PCMs of your sound card (for example, to separate front and rear outputs), you will need to tell PulseAudio to use multiple ALSA sinks:<br />
load-module module-alsa-sink device=front<br />
load-module module-alsa-sink device=rear<br />
<br />
If you want the client to have separate Pulse/ALSA outputs for each device, edit {{Filename|/etc/asound.conf}} or {{Filename|~/.asoundrc}}:<br />
pcm.pulsefront {<br />
type pulse<br />
device front<br />
}<br />
pcm.pulserear {<br />
type pulse<br />
device rear<br />
}<br />
<br />
And specify the appropriate ctl elements:<br />
ctl.pulsefront {<br />
type pulse<br />
device front<br />
}<br />
ctl.pulserear {<br />
type pulse<br />
device rear<br />
}<br />
<br />
To list the available ALSA devices:<br />
$ aplay -L<br />
<br />
If you have a multichannel soundcard you can for example route the sound from player1 to the front channels and the sound from player2 to the rear channels.<br />
<br />
User the ''aplay'' command as listed above:<br />
$ aplay -L<br />
<br />
Now edit your {{Filename|/etc/pulse/system.pa}} or {{Filename|/etc/pulse/default.pa}} (see ''Configuration of the ALSA PulseAudio plugin'') and add the desired outputs. Example:<br />
load-module module-alsa-sink device=front<br />
load-module module-alsa-sink device=surround51<br />
<br />
Disable ''load-module module-detect'' if you just want to show up those two devices in the ''Output Devices'' section of ''pavucontrol''.<br />
<br />
===Configuration of GStreamer for PulseAudio===<br />
To make [[GStreamer]] use PulseAudio, you will need to install the gstreamer0.10-pulse package:<br />
# pacman -S gstreamer0.10-pulse<br />
<br />
Then, execute {{Codeline|gstreamer-properties}} (part of {{Codeline|gnome-media}} package) and select ''PulseAudio Sound Server'' in both Audio Input and Output. Alternatively, this can be done by setting the gconf variables {{Codeline|/system/gstreamer/0.10/default/audiosink}} to ''pulsesink'' and {{Codeline|/system/gstreamer/0.10/default/audiosrc}} to ''pulsesrc'':<br />
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosink pulsesink<br />
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosrc pulsesrc<br />
<br />
Some applications (like Rhythmbox) ignore the ''audiosink'' property, but rely instead on ''musicaudiosink'', which can't be configured using {{Codeline|gstreamer-properties}} but needs to be manually set using {{Codeline|gconf-editor}} or the {{Codeline|gconftool-2}}:<br />
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/musicaudiosink pulsesink<br />
<br />
===Configuration of SDL for PulseAudio===<br />
Since SDL version 1.2.12, SDL has native pulseaudio support. Add this to your {{Filename|.profile}} or similar: <br />
export SDL_AUDIODRIVER="pulse"<br />
to use it. Other environment variables to configure: set PASERVER to the host of the PulseAudio server and set PADEVICE to the device used on the server. (the "pulse" driver has no support, yet, for reading your pulseaudio configuration, it seems.).<br />
<br />
Or, if this driver does not work for you or if you are using an older version of SDL, <br />
export SDL_AUDIODRIVER="esd"<br />
might do the trick.<br />
<br />
{{Note | You may need to use the ABS to compile SDL with pulseaudio support. Until the quality of the driver is fixed upstream, please use the patch located here: [http://0pointer.de/blog/projects/pa-plugin-for-sdl.html SDL PulseAudio Patch]. It should fix most if not all the sound issues you may be having. You might have luck with sdl-pulse in AUR.}}<br />
<br />
===Configuration of OpenAL for PulseAudio===<br />
<br />
====OpenAL Soft====<br />
Latest [http://kcat.strangesoft.net/openal.html OpenAL Soft], an implementation of OpenAL, supports PulseAudio starting from [http://opensource.creative.com/pipermail/openal-devel/2009-June/005463.html release 1.8.466]. By default OpenAL Soft will try first to open ALSA and OSS, and there is currently an [http://www.pulseaudio.org/wiki/PerfectSetup issue] with alsa output. Instead OpenAL Soft should be configured to use PulseAudio via {{Filename|/etc/openal/alsoft.conf}}:<br />
# drivers=pulse<br />
<br />
This setting has been tested with warzone2100 & Glest.<br />
<br />
===Configuration of libao for PulseAudio===<br />
# pacman -Sy libao-pulse<br />
<br />
Edit {{Filename|/etc/libao.conf}}, add:<br />
default_driver=pulse<br />
<br />
===Using OSS apps with PulseAudio wrapper===<br />
If you have a program that uses OSS you can make it work with PulseAudio by starting it with padsp:<br />
$ padsp OSSprogram<br />
A few examples:<br />
$ padsp aumix<br />
$ padsp sox foo.wav -t ossdsp /dev/dsp<br />
<br />
If you prefer you can rename the program OSSprogram-real and replace it with a script like this: <br />
#!/bin/sh<br />
if test -x /usr/bin/padsp ; then<br />
exec /usr/bin/padsp /usr/bin/OSSprogram-real "$@"<br />
else<br />
exec /usr/bin/OSSprogram "$@"<br />
fi<br />
<br />
===PulseAudio with KDE 4===<br />
Add the following lines to your {{Filename|/etc/asound.conf}}:<br />
pcm.phononpulse {<br />
type plug<br />
slave.pcm {<br />
type pulse<br />
}<br />
hint {<br />
show on<br />
description "PulseAudio"<br />
}<br />
}<br />
<br />
Now you can change the output device in "System Settings -> Multimedia -> Device Preference" to ''PulseAudio''.<br />
<br />
Remember, if you have added the ''pcm.!default'' lines to your ''asound.conf'' you cannot switch between the ALSA and the PulseAudio playback.<br />
<br />
===PulseAudio over network===<br />
One of PulseAudio's magnificent features is the possibility to stream audio from clients over TCP to the server running the PulseAudio daemon, allowing sound to be streamed through your LAN.<br />
To accomplish this, one needs to enable module-native-protocol-tcp, and copy the pulse-cookie to the clients. <br />
To enable the TCP module, add (or uncomment, if already there) this to {{Filename|/etc/pulse/system.pa}}:<br />
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16<br />
<br />
To allow remote connections to the TCP module, you also have to remember to unblock the service in {{Filename|/etc/hosts.allow}} with for example the following line:<br />
pulseaudio-native: ALL<br />
<br />
If you are running a system-wide PulseAudio instance, which makes sense for networked audio, the cookie is located in {{Filename|/var/run/pulse/.pulse-cookie}}. This cookie needs to be sent to the client and placed somewhere the pulse-access group can read (and with permissions so only they can read it). Alternatively, you may add auth-anonymous=1 to the end of the load-module module-native-protocol-tcp line to disable authentication. <br />
# scp /var/run/pulse/.pulse-cookie client:/etc/pulse-cookie<br />
<br />
# chown pulse:pulse-access /etc/pulse-cookie<br />
# chmod 640 /etc/pulse-cookie<br />
<br />
The pulse client needs to know where to look for the cookie.<br />
{{Filename|/etc/pulse/client.conf}}:<br />
### Cookie file<br />
cookie-file=/etc/pulse-cookie<br />
<br />
Then the client needs to be configured to connect to the specified server.<br />
{{Filename|/etc/pulse/client.conf}}:<br />
## The default server to connect to<br />
default-server=192.168.0.5<br />
<br />
===Pulseaudio through JACK===<br />
The JACK-Audio-Connection-Kit is popular for audio work, and is widely supported by Linux audio applications. It fills a similar niche as Pulseaudio, but with more of an emphasis on professional audio work. In particular, audio applications such as Ardour and Audacity (recently) work well with Jack. Pulseaudio provides module-jack-source and module-jack-sink which allow Pulseaudio to be run as a sound server above the JACK daemon. This allows the usage of per-volume adjustments and the like for the apps which need it, play-back apps for movies and audio, while allowing low-latency and inter-app connectivity for sound-processing apps which connect to JACK.<br />
<br />
To use pulseaudio with JACK, JACK must be started up before pulseaudio, using whichever method you prefer. Pulseaudio then needs to be started loading the 2 relevant modules. Edit {{Filename|/etc/pulse/default.pa}}, and change the following region:<br />
### Load audio drivers statically (it is probably better to not load<br />
### these drivers manually, but instead use module-hal-detect --<br />
### see below -- for doing this automatically)<br />
#load-module module-alsa-sink<br />
#load-module module-alsa-source device=hw:1,0<br />
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-null-sink<br />
#load-module module-pipe-sink<br />
<br />
### Automatically load driver modules depending on the hardware available<br />
.ifexists module-hal-detect.so<br />
load-module module-hal-detect<br />
.else<br />
### Alternatively use the static hardware detection module (for systems that<br />
### lack HAL support)<br />
load-module module-detect<br />
.endif<br />
<br />
to the following:<br />
### Load audio drivers statically (it is probably better to not load<br />
### these drivers manually, but instead use module-hal-detect --<br />
### see below -- for doing this automatically)<br />
#load-module module-alsa-sink<br />
#load-module module-alsa-source device=hw:1,0<br />
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-null-sink<br />
#load-module module-pipe-sink<br />
load-module module-jack-source<br />
load-module module-jack-sink<br />
<br />
### Automatically load driver modules depending on the hardware available<br />
#.ifexists module-hal-detect.so<br />
#load-module module-hal-detect<br />
#.else<br />
### Alternatively use the static hardware detection module (for systems that<br />
### lack HAL support)<br />
#load-module module-detect<br />
#.endif<br />
<br />
Basically, this prevents module-hal-detect from loading. module-hal-detect will always try to grab your sound-card (JACK has already done that, so this will cause an error). Also, the jack source and sink must be explicitly loaded.<br />
<br />
===Pulseaudio from within a chroot (ex. 32-bit chroot in 64-bit install)===<br />
Since a chroot sets up an alternative root for the running/jailing of applications, pulseaudio must be installed within the chroot itself ({{Codeline|"pacman -S pulseaudio"}} within the chroot environment).<br />
<br />
Pulseaudio, if not set up to connect to any specific server (this can be done in {{Filename|/etc/pulse/client.conf}}, through the PULSE_SERVER environment variable, or through publishing to the local X11 properties using module-x11-publish), will attempt to connect to the local pulse server, failing which it will spawn a new pulse server. Each pulse server has a unique ID based on the machine-id value in {{Filename|/var/lib/dbus}}. To allow for chrooted apps to access the pulse server, the following directories must be mounted within the chroot:-<br />
/var/run<br />
/var/lib/dbus<br />
/tmp<br />
~/.pulse<br />
<br />
{{Filename|/dev/shm}} should also be mounted for efficiency and good performance. Note that mounting /home would normally also allow sharing of the {{Filename|~/.pulse}} folder.<br />
<br />
For specific direction on accomplishing the appropriate mounts, please refer to the wiki on installing a bundled 32-bit system, especially the [http://wiki.archlinux.org/index.php?title=Arch64_Install_bundled_32bit_system#Additional_mount_option_to_allow_32-bit_apps_to_access_the_64-bit_Pulseaudio_server additional section] specific to Pulseaudio.<br />
<br />
==Troubleshooting==<br />
<br />
===authkey.c: Failed to open cookie file '/home/<user>/.esd_auth': Permission denied===<br />
If this error message appears in {{Filename|/var/log/errors.log}}, then add:<br />
<br />
if [ -e /var/run/pulse/.esd_auth ]; then<br />
chown pulse:pulse-access /var/run/pulse/.esd_auth<br />
chmod 640 /var/run/pulse/.esd_auth<br />
fi<br />
<br />
before {{Codeline|"add_daemon pulseaudio"}} in {{Filename|/etc/rc.d/pulseaudio}}.<br />
<br />
===module-x11-publish===<br />
If PulseAudio fails to start and the messages<br />
x11wrap.c: XOpenDisplay() failed<br />
module.c: Failed to load module "module-x11-publish" (argument: ""): initialization failed.<br />
main.c: Module load failed.<br />
main.c: failed to initialize daemon.<br />
appear in your logs, you need to disable module-x11-publish in {{Filename|/etc/pulse/system.pa}}:<br />
#load-module module-x11-publish<br />
<br />
==="daemon startup failed"===<br />
If PulseAudio fails to start as a daemon and the message <br />
E: main.c: daemon startup failed.<br />
appears, you may need to disable the line in {{Filename|/etc/pulse/system.pa}} that reads<br />
.fail<br />
<br />
Simply comment that line.<br />
<br />
===Glitches and high CPU usage since 0.9.14===<br />
The PulseAudio sound server has been rewritten to use timer-based audio scheduling instead of the traditional interrupt-driven approach. Timer-based scheduling may expose issues in some Alsa drivers. To turn timer-based scheduling off, replace the line:<br />
load-module module-hal-detect <br />
in {{Filename|/etc/pulse/default.pa}} by:<br />
load-module module-hal-detect tsched=0<br />
<br />
===Audacity===<br />
{{Note|As of Audacity 1.3.8, PulseAudio and other non-mmap ALSA devices are supported without killing PulseAudio. Upgrading to this version is recommended.}}<br />
<br />
According to the PulseAudio.org Wiki, Audacity does not currently support PulseAudio. Therefore they suggest killing pulseaudio before using it.<br />
[http://www.pulseaudio.org/wiki/PerfectSetup#Audacity look here]<br />
<br />
===PulseAudio device chooser (padevchooser)===<br />
If you cannot launch the PulseAudio Device Chooser, first (re)start the Avahi daemon as follows:<br />
$ sudo /etc/rc.d/avahi-daemon restart<br />
<br />
===VLC===<br />
If you are having audio problems with the audio playback of DVDs in VLC, uninstall VLC and install the vlc-nightly package from the AUR, and set the audio output method to {{Codeline|"Pulseaudio"}}.<br />
<br />
Alternative: [http://aur.archlinux.org/packages.php?ID=25257 vlc-pulse] from AUR<br />
<br />
===mpd===<br />
There is a pulseaudio enabled version of mpd [http://aur.archlinux.org/packages.php?ID=18722 in the AUR]. You will need to add the mpd user to the "pulse-access" group in order for mpd to connect to the daemon.<br />
<br />
===module-hal-detect===<br />
If you receive an error message about HAL, module-hal, or something along those lines, you will need to remove module-hal-detect from your {{Filename|/etc/pulse/system.pa}} and explicitely specify the ALSA devices yourself, for example:<br />
load-module module-alsa-sink device=hw:0<br />
load-module module-alsa-source device=hw:0<br />
<br />
===No sound after install===<br />
If you experience no audio output via any means while using ALSA as your default device, you may have to unmute your sound card. To do this, you will want to launch alsamixer and make sure each column has a green 00 under it (this can be toggled by pressing 'm')<br />
$ alsamixer -c 0<br />
<br />
Sometimes the snd_pcsp driver conflicts with the snd_hda_intel driver (for those of you<br />
using Intel cards) and no sound output is experienced. To fix this, you can blacklist the<br />
snd_pcsp driver in the MODULES array of {{Filename|/etc/rc.conf}} (by appending {{Codeline|!snd_pcsp}}).<br />
<br />
===I have a surround sound card, but PulseAudio uses just the front speakers.===<br />
Many people have a surround card, but have speakers for just two channels, so PulseAudio cannot really default to a surround setup. To enable all the channels, edit {{Filename|/etc/pulse/daemon.conf}}: uncomment the default-sample-channels line (i.e. remove the semicolon from the beginning of the line) and set the value to '''6''' if you have a ''5.1'' setup, or '''8''' if you have ''7.1'' setup etc. After doing the edit, restart pulseaudio daemon. <br />
# Default<br />
default-sample-channels=2<br />
# For 5.1<br />
default-sample-channels=6<br />
# For 7.1<br />
default-sample-channels=8<br />
<br />
===PortAudio applications===<br />
The current binary of PortAudio in the community repository does not support PulseAudio and non-mmap audio devices. This can be remedied by building PortAudio from ABS and applying [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/portaudio/current/SOURCES/portaudio-19-alsa_pulse.patch?revision=313993 a patch] to the sources.<br />
<br />
===Amarok===<br />
Install [http://aur.archlinux.org/packages.php?ID=25978 xine-lib-pulseaudio] from AUR - tested with Amarok 1.x<br />
<br />
==See also==<br />
*[[Allow multiple programs to play sound at once]]<br />
<br />
==External links==<br />
*[http://www.pulseaudio.org/wiki/PerfectSetup http://www.pulseaudio.org/wiki/PerfectSetup] - A good guide to make your configuration perfect<br />
*[http://www.alsa-project.org/main/index.php/Asoundrc http://www.alsa-project.org/main/index.php/Asoundrc] - Alsa wiki on .asoundrc<br />
*[http://www.pulseaudio.org/ http://www.pulseaudio.org/] - PulseAudio official site<br />
*[http://mpd.wikia.com/wiki/PulseAudio#Version_0.12.0_and_later http://mpd.wikia.com/wiki/PulseAudio#Version_0.12.0_and_later] - Configuring MPD for PulseAudio<br />
*[http://www.pulseaudio.org/wiki/FAQ http://www.pulseaudio.org/wiki/FAQ] - PulseAudio FAQ</div>Hinrich