まず、持って来たファイルと、カーネルソースを同じディレクトリにいれて、
# dpkg -i *.deb
としてインストールする。
次に、/usr/src/linux に移動し、カーネルとモジュール(ALSAドライバ等)をカスタマイズ/コンパイルする。
カーネルカスタマイズ時の注意点は、ALSAドライバモジュールを読み込んでサウンドデバイスを動作させるので、サウンドに関する必要な設定はすべてMにしなければならない。YでもNでもモジュールを読み込めないのでデバイスは動かない。
# make xconfig
としてカーネルをカスタマイズした後、
# make-kpkg binary-arch
# make-kpkg modules
とすると、/usr/src/ にkernel-image, kernel-header, alsa-modules のDebianパッケージができている。これらをインストールする前に、/dev にデバイスと、それに対応するシンボリックリンクを貼る(これいらないかも知んない…)。
# module/alsa-driver/snddevice
とすると作成される。それから上記のDebianパッケージをインストールする。
本当ならばalsaconfを使って設定するのだが、現時点ではYMF-7xxの設定はできないので、/etc/modutils/alsa /etc/modules.conf を自分で設定する。今回は、alsaconfの設定で、"soundcard-share"を選択してベースを作ってから編集した。
参考として全文掲載するが、どこを変更したのかは探してみてね!ワシはここでも苦労したんじゃー!!(*_*)
# Default Configuration of ALSA 0.5 for Debian GNU/Linux alias char-major-116 snd alias char-major-14 soundcore options snd snd_major=116 snd_cards_limit=4 snd_device_mode=0660 snd_device_gid=29 snd_device_uid=0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss #alias snd-card-0 snd-card-dummy #alias snd-card-1 snd-card-serial #alias snd-card-2 snd-card-share #alias snd-card-3 snd-card-virmidi alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1 alias sound-slot-2 snd-card-2 alias sound-slot-3 snd-card-3 # You must need to add your own card setteings below. # or use alsaconf to setup in menu form. # --- BEGIN: Generated by ALSACONF, do not edit. --- # --- ALSACONF verion 0.4.3b --- alias char-major-116 snd alias snd-card-0 snd-card-ymfpci alias char-major-14 soundcore alias sound-slot-0 snd-card-0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss options snd snd_major=116 snd_cards_limit=1 snd_device_mode=0660 snd_device_gid=29 snd_device_uid=0 options snd-card-ymfpci snd_index=0 snd_id=CARD_0 # --- END: Generated by ALSACONF, do not edit. --- |
### This file is automatically generated by update-modules # # Please do not edit this file directly. If you want to change or add # anything please take a look at the files in /etc/modutils and read # the manpage for update-modules. # ### update-modules: start processing /etc/modutils/0keep # DO NOT MODIFY THIS FILE! # This file is not marked as conffile to make sure if you upgrade modutils # it will be restored in case some modifications have been made. # # The keep command is necessary to prevent insmod and friends from ignoring # the builtin defaults of a path-statement is encountered. Until all other # packages use the new `add path'-statement this keep-statement is essential # to keep your system working keep ### update-modules: end processing /etc/modutils/0keep ### update-modules: start processing /etc/modutils/aliases # Uncomment the network protocols you don't want loaded: # alias net-pf-1 off # Unix # alias net-pf-2 off # IPv4 alias net-pf-3 off # Raw sockets alias net-pf-4 off # IPX alias net-pf-5 off # DDP / appletalk alias net-pf-6 off # Amateur Radio NET/ROM alias net-pf-10 off # IPv6 alias net-pf-11 off # ROSE / Amateur Radio X.25 PLP alias net-pf-19 off # Acorn Econet alias char-major-10-130 softdog alias char-major-10-175 agpgart alias char-major-108 ppp_generic alias /dev/ppp ppp_generic alias tty-ldisc-3 ppp_async alias tty-ldisc-14 ppp_synctty alias ppp-compress-21 bsd_comp alias ppp-compress-24 ppp_deflate alias ppp-compress-26 ppp_deflate # Crypto modules (see http://www.kerneli.org/) alias loop-xfer-gen-0 loop_gen alias loop-xfer-3 loop_fish2 alias loop-xfer-gen-10 loop_gen alias cipher-2 des alias cipher-3 fish2 alias cipher-4 blowfish alias cipher-6 idea alias cipher-7 serp6f alias cipher-8 mars6 alias cipher-11 rc62 alias cipher-15 dfc2 alias cipher-16 rijndael alias cipher-17 rc5 ### update-modules: end processing /etc/modutils/aliases ### update-modules: start processing /etc/modutils/alsa # Default Configuration of ALSA 0.5 for Debian GNU/Linux alias char-major-116 snd alias char-major-14 soundcore options snd snd_major=116 snd_cards_limit=4 snd_device_mode=0660 snd_device_gid=29 snd_device_uid=0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss #alias snd-card-0 snd-card-dummy #alias snd-card-1 snd-card-serial #alias snd-card-2 snd-card-share #alias snd-card-3 snd-card-virmidi alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1 alias sound-slot-2 snd-card-2 alias sound-slot-3 snd-card-3 # You must need to add your own card setteings below. # or use alsaconf to setup in menu form. # --- BEGIN: Generated by ALSACONF, do not edit. --- # --- ALSACONF verion 0.4.3b --- alias char-major-116 snd alias snd-card-0 snd-card-ymfpci alias char-major-14 soundcore alias sound-slot-0 snd-card-0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss options snd snd_major=116 snd_cards_limit=1 snd_device_mode=0660 snd_device_gid=29 snd_device_uid=0 options snd-card-ymfpci snd_index=0 snd_id=CARD_0 # --- END: Generated by ALSACONF, do not edit. --- ### update-modules: end processing /etc/modutils/alsa ### update-modules: start processing /etc/modutils/paths # This file contains a list of paths that modprobe should scan, # beside the once that are compiled into the modutils tools # themselves. # This used to be quite a list, but upstream merged some Debian patches # so we currently don't need to do anything here ### update-modules: end processing /etc/modutils/paths ### update-modules: start processing /etc/modutils/setserial # # This is what I wanted to do, but logger is in /usr/bin, which isn't loaded # when the module is first loaded into the kernel at boot time! # #post-install serial /etc/init.d/setserial start | logger -p daemon.info -t "setserial-module reload" #pre-remove serial /etc/init.d/setserial stop | logger -p daemon.info -t "setserial-module uload" post-install serial /etc/init.d/setserial modload > /dev/null 2> /dev/null pre-remove serial /etc/init.d/setserial modsave > /dev/null 2> /dev/null ### update-modules: end processing /etc/modutils/setserial ### update-modules: start processing /etc/modutils/arch/i386 alias parport_lowlevel parport_pc alias char-major-10-144 nvram ### update-modules: end processing /etc/modutils/arch/i386 |
後はボリュームの設定だ。
amix, gmix などのミキサーを起動し、好みの音量にする。それから、
# alsactl store
で /etc/asound.conf に音量を記録する。
# ALSA driver configuration # This configuration is generated with the alsactl program. soundcard("CARD_0") { mixer("Asahi Kasei AK4540") { ; The type is 'bool'. switch("AC97 Mono Output Select", false) ; The type is 'bool'. switch("AC97 Second MIC", false) ; The type is 'bool'. switch("ADC/DAC Loopback", false) ; The type is 'bool'. switch("S/PDIF output", false) ; Voice 0 : Min 0 Max 16383 ; Voice 1 : Min 0 Max 16383 element("SPDIF Record",0,200,Volume1(0,0)) ; Voice 0 : Min 0 Max 16383 ; Voice 1 : Min 0 Max 16383 element("ADC Record",0,200,Volume1(0,0)) ; Voice 0 : Min 0 Max 16383 ; Voice 1 : Min 0 Max 16383 element("Capture Volume",0,200,Volume1(0,0)) element("Input Gain Switch",0,101,Switch2(off)) ; Voice 0 : Min 0 Max 15 ; Voice 1 : Min 0 Max 15 element("Input Gain Volume",0,200,Volume1(0,0)) element("Master Mono Switch",0,101,Switch2(off)) ; Voice 0 : Min 0 Max 31 element("Master Mono Volume",0,200,Volume1(0)) element("Master Switch",0,101,Switch2(on)) ; Voice 0 : Min 0 Max 31 ; Voice 1 : Min 0 Max 31 element("Master Volume",0,200,Volume1(23,23)) element("Aux Switch",0,101,Switch2(off)) ; Voice 0 : Min 0 Max 31 ; Voice 1 : Min 0 Max 31 element("Aux Volume",0,200,Volume1(0,0)) element("Video Switch",0,101,Switch2(off)) ; Voice 0 : Min 0 Max 31 ; Voice 1 : Min 0 Max 31 element("Video Volume",0,200,Volume1(0,0)) element("CD Switch",0,101,Switch2(on)) ; Voice 0 : Min 0 Max 31 ; Voice 1 : Min 0 Max 31 element("CD Volume",0,200,Volume1(20,20)) element("Line Switch",0,101,Switch2(on)) ; Voice 0 : Min 0 Max 31 ; Voice 1 : Min 0 Max 31 element("Line Volume",0,200,Volume1(8,8)) element("MIC Switch",0,101,Switch2(off)) ; Voice 0 : Min 0 Max 31 element("MIC Volume",0,200,Volume1(0)) ; Voice 0 : Min 0 Max 1 element("MIC Boost",0,200,Volume1(0)) element("Phone Switch",0,101,Switch2(off)) ; Voice 0 : Min 0 Max 31 element("Phone Volume",0,200,Volume1(0)) element("PC Speaker Switch",0,101,Switch2(on)) ; Voice 0 : Min 0 Max 15 element("PC Speaker Volume",0,200,Volume1(5)) element("PCM Switch",0,101,Switch2(on)) ; Voice 0 : Min 0 Max 31 ; Voice 1 : Min 0 Max 31 element("PCM Volume",0,200,Volume1(16,16)) element("Mono Output MUX",0,401,Mux2(element("Mono-Out Accumulator",0,301))) element("Input MUX",0,400,Mux1(element("MIC Boost",0,200),element("MIC Boost",0,200))) } } |
こう設定することで音がなるようになった。
rootユーザー以外で音を出したい場合は各ユーザーをaudioグループに入れるといい。
他のサウンドカードを使っている場合、/usr/src/modules/alsa-driver/cardsにドライバソースがあるのでその(拡張子を除く)ファイル名を
# alias snd-card-0 snd-card-hogehoge
# options snd-card-hogehoge
と書いてある行のhogehogeの部分に入力するといい。対応していれば、最低でもPCM音源ぐらいは動作するだろう。
0 件のコメント:
コメントを投稿