將 ALSA 支援編譯成 kernel(非模組)
在 General seup 之前加上這一行
CONFIG_SOUND=y # # General setup #
編譯指令
make ARCH=sh CROSS_COMPILE=sh4-linux- vmlinux
Advanced Linux Sound Architecture (SND) [N/m/y/?] (NEW) y
Sequencer support (SND_SEQUENCER) [N/m/y/?] (NEW) y
Sequencer dummy client (SND_SEQ_DUMMY) [N/m/y/?] (NEW) n
OSS Mixer API (SND_MIXER_OSS) [N/m/y/?] (NEW) y
OSS PCM (digital audio) API (SND_PCM_OSS) [N/m/y/?] (NEW) y
OSS PCM (digital audio) API - Include plugin system (SND_PCM_OSS_PLUGINS) [Y/n/?] (NEW) y
OSS Sequencer API (SND_SEQUENCER_OSS) [N/y/?] (NEW) y
Dynamic device file minor numbers (SND_DYNAMIC_MINORS) [N/y/?] (NEW) n
Support old ALSA API (SND_SUPPORT_OLD_API) [Y/n/?] (NEW) y
Verbose procfs contents (SND_VERBOSE_PROCFS) [Y/n/?] (NEW) y
Verbose printk (SND_VERBOSE_PRINTK) [N/y/?] (NEW) n
Debug (SND_DEBUG) [N/y/?] (NEW) n*
* Generic devices
*
Dummy (/dev/null) soundcard (SND_DUMMY) [N/m/y/?] (NEW) n
Virtual MIDI soundcard (SND_VIRMIDI) [N/m/y/?] (NEW) n
MOTU MidiTimePiece AV multiport MIDI (SND_MTPAV) [N/m/y/?] (NEW) n
UART16550 serial MIDI driver (SND_SERIAL_U16550) [N/m/y/?] (NEW) n
Generic MPU-401 UART driver (SND_MPU401) [N/m/y/?] (NEW) n
*
* USB devices
*
USB Audio/MIDI driver (SND_USB_AUDIO) [N/m/y/?] (NEW) y
Native Instruments USB audio devices (SND_USB_CAIAQ) [N/m/y/?] (NEW) n
*
* System on Chip audio support
*
ALSA for SoC audio support (SND_SOC) [N/m/y/?] (NEW) n
*
* STMicroelectronics SoCs support
*
STMicroelectronics SoCs support (SND_STM) [N/m/y/?] (NEW) n
*
* Open Sound System
*
Open Sound System (DEPRECATED) (SOUND_PRIME) [N/m/y/?] (NEW) n
sh4-linux-objcopy -O binary vmlinux vmlinux.bin gzip --best --force vmlinux.bin mkimage -A sh -O linux -T kernel -C gzip -a 0x80800000 -e 0x80801000 -n "Linux 2.6" -d vmlinux.bin.gz vmlinux.ub
make ARCH=sh CROSS_COMPILE=sh4-linux- pdk7105_defconfig make ARCH=sh CROSS_COMPILE=sh4-linux- menuconfig
General setup
-> Device Drivers
--> Sound card support
---> Advanced Linux Sound Architecture
----> Sequencer support [y]
----> OSS Mixer API [y]
----> OSS PCM (digital audio) API [y]
----> OSS Sequencer API [y]
----> Support old ALSA API [y]
----> Verbose procfs contents [y]
----> USB sound devices
-----> USB Audio/MIDI driver [y]
make ARCH=sh CROSS_COMPILE=sh4-linux- vmlinux
要使 MPlayer 可以支援混音,必須符合以下項目:
pcm.!default { type plug slave.pcm { type dmix ipc_key 1024 slave { pcm "hw:0,0" rate 44100 } } }
TIPs:
使用內建的音效時(NextRadio v2+),必須移除 rate 44100,否則有些電台在播放時會出現斷斷續續現象。
參考網站:
/etc/lirc/lircrc
begin button = mute prog = mplayer config = mute repeat = 0 end begin button = power prog = mplayer config = quit repeat = 2 end begin button = chUp prog = mplayer config = pt_step -1 repeat = 0 end begin button = chUp_V2 prog = mplayer config = pt_step -1 repeat = 0 end begin button = chDown prog = mplayer config = pt_step 1 repeat = 0 end begin button = chDown_V2 prog = mplayer config = pt_step 1 repeat = 0 end begin button = volUp prog = mplayer config = volume 47 repeat = 0 end begin button = volUp_V2 prog = mplayer config = volume 47 repeat = 0 end begin button = volDown prog = mplayer config = volume -47 repeat = 0 end begin button = volDown_V2 prog = mplayer config = volume -47 repeat = 0 end
遙控器的內碼偵錯
# irw 00000000ce94c43b 00 right_V2 /etc/lirc/lircd.conf 00000000ce9404fb 00 up_V2 /etc/lirc/lircd.conf 00000000ce9404fb 01 up_V2 /etc/lirc/lircd.conf 00000000ce9404fb 00 up_V2 /etc/lirc/lircd.conf 00000000ce94847b 00 down_V2 /etc/lirc/lircd.conf
apt-get install wget build-essential libglib2.0-dev apt-get install libasound2-dev libmms-dev libshout3-dev libmpcdec-dev libao-dev wget http://downloads.sourceforge.net/project/musicpd/mpd/0.17.3/mpd-0.17.3.tar.bz2?r=http%3A%2F%2Fmpd.wikia.com%2Fwiki%2FServer&ts=1365082963&use_mirror=nchc -O mpd-0.17.3.tar.bz2 tar xjf mpd-0.17.3.tar.bz2 cd mpd-0.17.3 ./configure --prefix=/opt/mpd make make install
下載 mpd-0.17.3.tar.bz2
開始編譯
tar xjf mpd-0.17.3.tar.bz2 cd mpd-0.17.3/
Images 0 | ||
---|---|---|
No images to display in the gallery. |