Internet Radio

    版本為 06:54, 30 Nov 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

    編譯 kernel 支援 ALSA

    適用 kernel-linux-sh4-2.6.23.17_stm23_A18B

    將 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
    
    適用 kernel-linux-sh4-2.6.32.59_stm24_0211
    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 混音(Audio Mixing)

    要使 MPlayer 可以支援混音,必須符合以下項目:

    1. 必須使用 ALSA 音效驅動模式,OSS 不支援混音
    2. MPlayer 編譯時必須加上 alsa 支援參數,檢查 mplayer 是否已支援 alsa,執行
      #mplayer -ao help
    3. MPlayer 的播放指令
      支援混音 #mplayer -ao alsa -cache 256 .......
      不支援混音 #mplayer -ao alsa:device=hw=0.0 .......
    4. 混音播放時,聲音如果有出現明顯的雜音,解決方式如下
      編輯 /etc/asound.conf
    pcm.!default {
      type plug
      slave.pcm {
        type dmix
        ipc_key 1024
        slave {
           pcm "hw:0,0"
           rate 44100
        }
      }
    }
    

    參考網站:

    lircrc for Mplayer

    /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
    

    Debian 5.0 編譯 MPD

    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

    下載 mpd-0.17.3.tar.bz2

    開始編譯

    tar xjf mpd-0.17.3.tar.bz2
    cd mpd-0.17.3/
    

    有用的連結

    Powered by MindTouch Core