Configuring ALSA to record audio Re: [linux-audio-user] Extracting/Ripping tracks from DVD-Audio discs

Paul Davis paul at linuxaudiosystems.com
Mon Mar 19 12:09:01 EDT 2007


On Mon, 2007-03-19 at 19:47 +1100, D. Sen wrote:
> Is there a way to configure ALSA (via .asoundrc or such) such that 
> instead of playing the sound through hardware - the raw pcm data is 
> actually stored in files? So /dev/dsp0 would actually be linked to a 
> file...etc.

pcm.!default {
    type plug
    slave.pcm "asym"
}

pcm.asym {
    type asym
    playback.pcm "save"
    capture.pcm "dmixin"
}

pcm.dsp0 {
    type plug
    slave.pcm "asym"
}

pcm.dsp {
    type plug
    slave.pcm "asym"
}

pcm.save {
        type file
        slave.pcm "dmixout"
        file "/var/tmp/record.raw"
}

pcm.dmixout  {
    type dmix
    ipc_key 12345
    ipc_key_add_uid yes
    slave {
        pcm hw
        channels 2
        period_size 1024
        buffer_size 32768
        rate 44100
    }
    bindings {
        0 0
        1 1
    }
}

ctl.mixer0 {
    type hw
    card 0
}

pcm.dmixin {
        type dsnoop
        ipc_key 98765
        ipc_key_add_uid yes
        slave {
                pcm hw
                channels 2
                period_size 1024
                buffer_size 32768
                rate 44100
        }
        bindings {
                0 0
                1 1
        }
}



More information about the linux-audio-user mailing list