Re: snd_pcm_hw_params_any failes but aplay works

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Little bit more....

The reason for 'aplay -D Dual ...' works is that it is not calling  'snd_pcm_hw_params_any()'.

So my question is can I edit ~/.asoundrc/20-Dual.conf (previous mail) so
snd_pcm_hw_params_any() pick's up the right parameters from the 'Dual' pcm stream.

The
pcm."Dual" is split by rote to 2 cards with slightly different capabilities:

Xonar U7:
Rates: 44100, 48000, 88200, 96000, 176400, 192000
Format: S16_LE,S24_3LE
Channels: 2,4,6,8
Data packet interval: 125 us

HIFIRef:
Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
Format: S32_LE, SPECIAL, S32_LE DSD_U32_BE

Channels: 2
Data packet interval: 125 us

   
I know what the combined
capabilities would be for 'Dual' by looking at ~/.asoundrc/20-Dual.conf .
But how do I indicate that so '
snd_pcm_hw_params_any()' reads out:

Rates: 44100, 48000, 88200, 96000, 176400, 192000
Format: S16_LE,S24_3LE
Channels: 2
Data packet interval: 125 us



Here is a short version of the Kodi source:

https://github.com/xbmc/xbmc/blob/master/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp:1315
EnumerateDevice()
{

OpenPCMDevice() -> TryDeviceWithParams() -> TryDevice() -> snd_pcm_open_lconf()
snd_pcm_info()
snd_pcm_info_get_card()
snd_pcm_hw_params_any()    <-- error here!!!
....
}
 
~/.asoundrc/20-Dual.conf:
pcm.type-hw {
    @args.CARD { type string; default "U7" }
    type hw
    card "$CARD"
    device 0
    channels 2
}
pcm.multi {
    @args.CARD { type string; default "U7" }
    type route
    slave.pcm {
        type multi
        slaves.a { pcm "type-hw:CARD=U7"; channels 2 }
        slaves.b { pcm { type plug; slave.pcm "type-hw:CARD=HIFIRef"; } channels 2 }        #  plug needed: to convert bits format!!
        bindings {
            0 { slave a; channel 0; }
            1 { slave a; channel 1; }
            2 { slave b; channel 0; }
            3 { slave b; channel 1; }
        }   
    }
    ttable {
        0 { 0 1.0; 2 1.0 }    #left  0 -> 0,2 (1.0=100% volume)
        1 { 1 1.0; 3 1.0 }    #right 1 -> 1,3 (1.0=100% volume)
    }
   
}
# -- Output dual to U7 and XMOS  --
pcm."Dual" {
    type plug
    slave.pcm "multi:CARD=U7"
    hint.description "Dual Output on U7 and XMOS (Bit Perfect)"
}
------------------------------------------------------------------------------
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux