If your mplayer can play this mkv, use fifo and mplayer -ao pcm:fast:file=xxx where xxx is the name of fifo.
Or you can directly convert LPCM to flac using ffmpeg:
Code:
ffmpeg -i input.mkv -vn -sn -acodec flac audio.flac
After that remux to mkv using mkvmerge.