LINUX.ORG.RU

Помогите помирить Ladspa и alsa


1

0

вобщем при попытке проиграть файл aplay-ером через ladspa-plugin получаю следующую картину

$ ~/tmp/alsa-utils-1.0.11/aplay/aplay -D plug:ladspa ~/tmp/TRACK08.wav Playing WAVE '/root/tmp/TRACK08.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo aplay: set_params:961: Unable to install hw params:Invalid argument ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 32 CHANNELS: 2 RATE: NONE PERIOD_TIME: (85333 85334) PERIOD_SIZE: NONE PERIOD_BYTES: (15052 15056) PERIODS: (3 4) BUFFER_TIME: (341315 341316) BUFFER_SIZE: 15052 BUFFER_BYTES: 60208 TICK_TIME: 1000 $ cat /etc/asound.conf # an example command is 'aplay -D plug:ladspa <filename>' # otherwise, the ladspa plugin expects FLOAT type which # is very rare pcm.ladspa { type ladspa slave.pcm "plughw:0,0"; path "/usr/local/lib/ladspa/"; plugins [ { id 19001 filename "/usr/local/lib/ladspa/dj_eq_19001.so" } ] }

$

★★★★★

$ ~/tmp/alsa-utils-1.0.11/aplay/aplay -D plug:ladspa ~/tmp/TRACK08.wav 
Playing WAVE '/root/tmp/TRACK08.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo 
aplay: set_params:961: Unable to install hw params:Invalid argument 
ACCESS: RW_INTERLEAVED 
FORMAT: S16_LE 
SUBFORMAT: STD 
SAMPLE_BITS: 16 
FRAME_BITS: 32 
CHANNELS: 2 
RATE: NONE 
PERIOD_TIME: (85333 85334) 
PERIOD_SIZE: NONE 
PERIOD_BYTES: (15052 15056) 
PERIODS: (3 4) 
BUFFER_TIME: (341315 341316) 
BUFFER_SIZE: 15052 
BUFFER_BYTES: 60208 
TICK_TIME: 1000 
$ cat /etc/asound.conf 
# an example command is 'aplay -D plug:ladspa <filename>' 
# otherwise, the ladspa plugin expects FLOAT type which 
# is very rare 
pcm.ladspa { 
    type ladspa 
    slave.pcm "plughw:0,0"; 
    path "/usr/local/lib/ladspa/"; 
    plugins [ 
       { 
           id 19001 
           filename "/usr/local/lib/ladspa/dj_eq_19001.so" 
       } 
    ] 
}

$

cvv ★★★★★
() автор топика
Ответ на: комментарий от cvv

чтение док и гуглевание ничем не помогло

отладка дебаггером aplay-ера показала что плагин нормально находится и подгружается а проблемы возникают в ф-и snd_pcm_hw_params() оттрасировать которую мне не удалось по причине большой рекурсивности

буду рад любым советам на тему с какой стороны подойти к трабле

ЗЫ:
$analyseplugin dj_eq_19001

Plugin Name: "DJ EQ (mono)"
Plugin Label: "dj_eq_mono_cvv"
Plugin Unique ID: 19007
Maker: "Steve Harris <steve@plugin.org.uk>"
Copyright: "GPL"
Must Run Real-Time: No
Has activate() Function: Yes
Has deativate() Function: No
Has run_adding() Function: Yes
Environment: Normal or Hard Real-Time
Ports:  "Input" input, audio
        "Output" output, audio
        "latency" output, control

Plugin Name: "DJ EQ"
Plugin Label: "dj_eq_cvv"
Plugin Unique ID: 19001
Maker: "Steve Harris <steve@plugin.org.uk>"
Copyright: "GPL"
Must Run Real-Time: No
Has activate() Function: Yes
Has deativate() Function: No
Has run_adding() Function: Yes
Environment: Normal or Hard Real-Time
Ports:  "Input L" input, audio
        "Input R" input, audio
        "Output L" output, audio
        "Output R" output, audio
        "latency" output, control

$

cvv ★★★★★
() автор топика
Ответ на: комментарий от Chubaka

Если внимательно посмотреть на следующий листинг то будет очевидным что твоё предложение тоже самое что я уже сделал:

$ aplay -h
Usage: aplay [OPTION]... [FILE]...

-h, --help              help
    --version           print current version
-l, --list-devices      list all soundcards and digital audio devices
-L, --list-pcms         list all PCMs defined
-D, --device=NAME       select PCM by name
-q, --quiet             quiet mode
-t, --file-type TYPE    file type (voc, wav, raw or au)
-c, --channels=#        channels
-f, --format=FORMAT     sample format (case insensitive)
-r, --rate=#            sample rate
-d, --duration=#        interrupt after # seconds
-s, --sleep-min=#       min ticks to sleep
-M, --mmap              mmap stream
-N, --nonblock          nonblocking mode
-F, --period-time=#     distance between interrupts is # microseconds
-B, --buffer-time=#     buffer duration is # microseconds
    --period-size=#     distance between interrupts is # frames
    --buffer-size=#     buffer duration is # frames
-A, --avail-min=#       min available space for wakeup is # microseconds
-R, --start-delay=#     delay for automatic PCM start is # microseconds
                        (relative to buffer size if <= 0)
-T, --stop-delay=#      delay for automatic PCM stop is # microseconds from xrun
-v, --verbose           show PCM structure and setup (accumulative)
-I, --separate-channels one file for each channel
Recognized sample formats are: S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE FLOAT64_LE FLOAT64_BE IEC958_SUBFRAME_LE IEC958_SUBFRAME_BE MU_LAW A_LAW IMA_ADPCM MPEG GSM SPECIAL S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE
Some of these may not be available on selected hardware
The availabled format shortcuts are:
-f cd (16 bit little endian, 44100, stereo)
-f cdr (16 bit big endian, 44100, stereo)
-f dat (16 bit little endian, 48000, stereo)
$

и ктому же я написал что отладка дебаггером показала что проблема совсем не в этом

cvv ★★★★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.