ALSA OSS Emulation with Multiple Sound Cards

사운드 카드 여러개일 때의 ALSA OSS 에뮬레이션

aoss is a useful command that forwards all OSS (Open Sound System) requests to ALSA (Advanced Linux Sound Architecture) device drivers transparently, but it’s sometimes not so easy to use when an executable is wrapped by a shell script like VMware. The most easiest and clean solution for OSS emulation is loading snd-pcm-oss module by adding the following line in the /etc/modules file.

aoss는 모든 OSS (Open Sound System) 요청을 ALSA (Advanced Linux Sound Architecture) 드라이버로 투명하게 전달해 주는 유용한 명령이지만, VMware처럼 실행 파일이 쉘 스크립트로 둘러싸여 있으면 사용하기가 쉽지 않습니다. OSS 에뮬레이션에 대해 가장 쉽고 깔끔한 방법은 /etc/modules 파일에 다음 행을 추가해 snd-pcm-oss 모듈을 로드하는 것입니다.

snd-pcm-oss

Is that all? Not actually if you have more than one sound cards. You have to choose which one is your primary sound card, where the OSS requests should be forwarded to. In my case, my primary sound card is ESI Audiotechinik Juli@, and the secondary one is built-in Intel i8x0 chip. You can set the order of these sound cards by adding kernel options to the /boot/grub/menu.lst file like the following.

이게 다일까요? 사운드 카드가 하나 이상이라면 다가 아닙니다. OSS 요청을 포워딩 받을 첫 번째 사운드 카드를 정해 주어야 합니다. 저같은 경우 첫 번째 카드는 ESI Juli@이고, 두 번째 카드는 내장된 인텔 i8x0 칩입니다. 다음과 같이 /boot/grub/menu.lst 파일에 커널 옵션을 추가하여 이들 사운드 카드의 순서를 정할 수 있습니다.

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=snd-ice17xx-ak4xxx.index=0 snd-intel8x0.index=1

If you are using a different sound card, you could replace the driver names above (snd-xxxx) with yours. If you are finished editing the menu.lst file, you have to run update-grub command to auto-generate other sections of the menu.lst.

다른 사운드 카드를 사용하고 계신다면 위의 드라이버 이름들을 (snd-xxxx) 갖고 계신 사운드 카드의 드라이버로 바꾸면 됩니다. menu.lst 파일 수정을 마치면, update-grub 명령을 실행해 menu.lst 파일의 다른 부분을 자동 생성해야 합니다.

trustin@primary:~$ sudo update-grub
Password:
Searching for GRUB installation directory ... found: /boot/grub
Testing for an existing GRUB menu.list file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /vmlinuz-2.6.17-10-generic
Found kernel: /vmlinuz-2.6.15-27-686
Found kernel: /vmlinuz-2.6.15-26-686
Found kernel: /vmlinuz-2.6.15-25-686
Updating /boot/grub/menu.lst ... done