Re: [PATCH v5] alsa-sink/source, sink, source: Consider sample format for avoid-resampling/passthrough

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

 



On Fri, 2018-11-16 at 01:12 +0900, Sangchul Lee wrote:
> Sample format(e.g. 16 bit, 24 bit) was not considered even if the
> avoid-resampling option is set or the passthrough mode is used.
> This patch checks both sample format and rate of a stream to
> determine whether to avoid resampling in case of the option is set.
> In other word, it is possble to use the stream's original sample
> format and rate without resampling as long as these are supported
> by the device.
> 
> pa_sink_input_update_rate() and pa_source_output_update_rate() are
> renamed to pa_sink_input_update_resampler() and pa_source_output
> _update_resampler() respectively.
> 
> functions are added as below.
>  pa_sink_set_sample_format(), pa_sink_set_sample_rate(),
>  pa_source_set_sample_format(), pa_source_set_sample_rate()
> 
> Signed-off-by: Sangchul Lee <sc11.lee@xxxxxxxxxxx>
> ---
>  src/modules/alsa/alsa-sink.c   | 108 +++++++++++++++++++++++++++---------
>  src/modules/alsa/alsa-source.c | 103 ++++++++++++++++++++++++++--------
>  src/modules/module-null-sink.c |   4 +-
>  src/pulsecore/sink-input.c     |  22 ++++----
>  src/pulsecore/sink-input.h     |   2 +-
>  src/pulsecore/sink.c           | 100 ++++++++++++++++++++++-----------
>  src/pulsecore/sink.h           |   7 ++-
>  src/pulsecore/source-output.c  |  22 ++++----
>  src/pulsecore/source-output.h  |   2 +-
>  src/pulsecore/source.c         | 123 ++++++++++++++++++++++++-----------------
>  src/pulsecore/source.h         |   7 ++-
>  11 files changed, 335 insertions(+), 165 deletions(-)

Thanks! Looks good, applied.

-- 
Tanu

https://www.patreon.com/tanuk
https://liberapay.com/tanuk

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux