Skip to contentSkip to conversation

user defined plugin and namehint

DISCUSSION Olivier Langlois 1 participant 2 messages Feb 14, 2014 – Feb 15, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

I created a new plugin in asound.conf and I would like it to appear in the list presented with aplay -L as this is the list used by my media player (vlc) to offer the option to choose my playback device.

I have tried this:

pcm.rate96000Hz {
        type hw
        card 0
        device 0
        rate 96000
        hint {
                show on
                description "96000Hz rate output"
        }
}

It seems that it is missing the small magic used by standard specs. ie:
from front.conf:

        hint {
                show {
                        @func refer
                        name defaults.namehint.basic
                }
                description "Front speakers"
                device $DEV
        }

Background problem:

I have a flac audio file with 88.2 kHz sampling rate 24 bits and the player is opening the playback device at 48kHz and downsample my file.

Quoted 1 line

From the ui, there doesn't seem to be a way to fine tune these params. I

will bring the discussion to vlc dev as well.

Thank you,

#1 lore raw
Quoted 8 lines · Olivier Langlois

Hi,

I created a new plugin in asound.conf and I would like it to appear in the list presented with aplay -L as this is the list used by my media player (vlc) to offer the option to choose my playback device.

I have tried this:

Quoted 11 lines
pcm.rate96000Hz {
        type hw
        card 0
        device 0
        rate 96000
        hint {
                show on
                description "96000Hz rate output"
        }
}

I cannot make sense of everything that the function try_config() in control/namehint.c is doing or what the hint compound undocumented fields are supposed to mean but by changing my pcm definition to:

pcm.rate96000Hz {
        type hw
        card 0
        device 0
        rate 96000
        hint {
                show on
                device -1 # type hw are excluded. Adding this field

trick alsa-lib to add this PCM in the list of PCMs
description "96000Hz rate output"
}
}

Unfortunately, it did not resolve my problem. I have finally figured out that by simply changing the default dmix sampling rate was what I needed.

greetings,