• Resolved

ALSA driver

Guru 19560 points

Hello,

I would like to ask if it is possible to resample, i.e. downsample or upsample  in rx and tx direction.
What is the system call which does this resampling. I am using RDK linux, ALSA driver with DM8168,

Best Regards,

Ran

==========

  • Neither the hardware nor the kernel driver are capable of resampling.

    If your userspace accesses the device through alsa-lib, you can use its software resampler.

  • Guru 19560 points

    In reply to Clemens Ladisch:

    Hi Clemens,

    I see that the application uses API which are probably alsa-lib. I understand that I can now downsample or upsample using the library, though I did not yet find the API for that.

    Best Regards,

    Ran

    ==========

  • In reply to ranchu:

    Resampling is automatically enabled if you use a device name like "default" or "plughw". "hw" would bypass all alsa-lib enhancements.

  • Guru 19560 points

    In reply to Clemens Ladisch:

    Hi Clemens,

    Thank you very much for the answers.
    In my case device nsame is  "plughw" so I see that resampling is automatically enabled, but is there an API for changing the input rate or changing the playback sampling rate ?
    Can it be change to any value ?

    Best Regards,

    Ran

    ==========

  • In reply to ranchu:

    The "plughw" device behaves like a device that supports all sample rates.

    To change the input rate, just use another rate.

    The playback sample rate is the nearest rate actually supported by the hardware.