lpil / linux-audio-interface-compatibility

6 stars 3 forks source link

Reloop RMX 90 DVS #3

Open lpil opened 6 years ago

lpil commented 6 years ago
[17:43] == lpil [5c079cfd@gateway/web/freenode/ip.92.7.156.253] has joined #alsa
[17:43] <lpil> Hi
[17:43] <lpil> https://bpaste.net/show/93a7007ad2df
[17:44] <wabbits> pulseaudio -k only kills pulseaudio temporarily in the common case
[17:45] <wabbits> any pulseaudio client will respawn it nearly immediately
[17:45] <wabbits> you want to configure this client.conf->autospawn = no
[17:46] <wabbits> then pulseaudio wont respawn and you dont need pasupender
[17:46] == lpil_ [5c079cfd@gateway/web/freenode/ip.92.7.156.253] has quit [Ping timeout: 260 seconds]
[17:46] <lpil> Oh yes, it is running I see
[17:47] <lpil> Do I need to do anything to get /etc/pulse/client.conf to be read?
[17:49] <wabbits> nope
[17:49] <wabbits> just kill pulseaudio and it wont be spawned
[17:49] <wabbits> always check after the fact, its good practive
[17:50] <lpil> https://bpaste.net/show/ef68c5b932c2
[17:50] <lpil> For sure
[17:50] <wabbits> I guess that error means it got past the format error and now gives us a more generic error
[17:51] <wabbits> change the plugin from hw: to plughw: and see what happens
[17:51] <lpil> I'll have it do both
[17:51] <lpil> Seeing as it already loops
[17:52] <lpil> https://bpaste.net/show/d70c49a9a28c
[17:52] <wabbits> good thinking
[17:52] <wabbits> last hail mary comment out --disable-format
[17:54] <wabbits> I just noticed that you have multiple instances of snd_usb_audio in the alsa-info.sh report that doesn't seem right
[17:55] <lpil> https://bpaste.net/show/22b16c32d6a5
[17:55] <lpil> What is snd_usb_audio ?
[17:55] <wabbits> its the kernel module(driver) for your usb sound card
[17:55] <wabbits> I only have one instance for mine
[17:56] <lpil> Funky. I have other USB audio interfaces that work as intended, if that helps
[17:56] <wabbits> I'm way to tired to poke through the code and see what that error means...
[17:56] <wabbits> not surprised
[17:57] <wabbits> are you a c coder per chance?
[17:59] <lpil> I am not, though I could possibly read some C.
[18:00] <wabbits> FAIL device='plughw:RMX90DVS,0' rate='48000' format='S32_LE' aplay: set_params:1297: Unable to install hw params:
[18:00] <wabbits> you should see that string at line 1297 of aplay.c
[18:01] <wabbits> maybe debianuser will come by tonight and debug further
[18:01] <lpil> Thanks for your help wabbits, I really appreciate it
[18:02] <lpil> I'll likely idle about here and look at aplay.c a bit
[18:02] <lpil> And email the alsa mailing list later
[18:02] <wabbits> all good ideas
[18:02] <wabbits> best of luck
[18:02] <lpil> One last thing, what's the licence on this script of yours? Can I keep it/share it?
[18:02] <wabbits> no licence so share away
[18:03] <lpil> Thanks
[18:03] <wabbits> np
lpil commented 6 years ago
#!/usr/bin/perl
use strict;
use warnings;
use feature qw(say);

my @devices = (
    'hw:RMX90DVS,0',
    'plughw:RMX90DVS,0',
);
my @rates = (
    '44100',
    '48000',
);
my @formats = (
    # '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',
    # 'U18_3BE',
    # 'G723_24',
    # 'G723_24_1B',
    # 'G723_40',
    # 'G723_40_1B',
    # 'DSD_U8',
    # 'DSD_U16_LE',
);
sub test {
    my $device = shift();
    my $rate = shift();
    my $format = shift();
    my $cmd = "aplay";
    $cmd .= " --duration=1";
    $cmd .= " --channels=8";
    $cmd .= " --device=$device";
    $cmd .= " --rate=$rate";
    $cmd .= " --format=$format";
    # $cmd .= " --disable-format";
    $cmd .= " --quiet";
    $cmd .= " /dev/zero";
    $cmd .= " 2>&1";
    my $data = `$cmd`;
    return $data
}
foreach my $device (@devices) {
    foreach my $rate (@rates) {
        foreach my $format (@formats) {
            my $lines = test(
                $device,
                $rate,
                $format
            );
            my @lines = split(/\n/, $lines);
            my $result = 'PASS';
            if(@lines > 0) {
                $result = 'FAIL';
                print("$result device='$device' rate='$rate' format='$format' $lines[0]\n");
                #foreach my $line (@lines) {
                    #print("$line\n");
                #}
            } else {
                print("$result device='$device' rate='$rate' format='$format'\n");
            }
        }
    }
}