Discussion:
[Linphone-developers] [Mail 1/3][PATCH] mediastreamer2: audio quality, tool/mediastreamer feature and minor changes
bagamarco .
2018-02-09 12:29:00 UTC
Permalink
Hey folks,

working with my iMX6 SoloX and mediastreamer tool I run into some audio
problems.
Attached you can find some patches that fix few bugs, simplify alsa filter
configuration (threaded version and epipe bug fixing) and other minor
changes like typos or compile warning.

In next mails I will provide some general modification and new features to
mediastreamer tool.

*Patch list and description:*

0001-audiofilters-alsa-aligned-read_process-samples-to-20.patch
alsa_read_process function in non threaded version read 16ms samples
instead of 20ms like other functions.

0002-audiofilters-alsa-fixed-errors-when-compiled-with-TH.patch
Use ENABLE_ALSA_THREADED cmake option to enable alsa threaded version.
Also fix compile errors in this configuration.

0003-audiofilters-alsa-fixed-reference-errors-when-compil.patch
Use ENABLE_ALSA_EPIPE_BUGFIX cmake option to enable EPIPE_BUGFIX in
alsa filter.
Also fix compile errors in this configuration.

0004-audiofilters-alsa-added-debug-message-when-alsa_writ.patch
Actually, when snd_pcm_writei returns EAGAIN, these samples are
discarded generating audio noise.
Increase output buffer size in /etc/asound.conf avoid EAGAIN error.
In order to simply debug, this patch add ms_debug message every time
EAGAIN is returned.

0005-audiofilters-audiomixer-do-not-check-channel-activit.patch
When an MSAudioMixer input pin is disabled do not consider channel
activity and discard samples.

0006-audiofilters-audiomixer-increase-logging-information.patch
Added debug information when MSAudioMixer enters into bypass mode.

0007-audiofilters-audiomixer-fixed-typos.patch
Fixed typos

0008-msqueue-added-mutex-lock-in-MSBufferizer-in-order-to.patch
MSFilePlayer generate strange duplicated audio.
After some debug, I notice that ms_bufferizer provides duplicated
samples.
This patch added mutex in order protect critical section in msqueue
proceducer/consumer.

0009-mscommon-concealement-is-not-required-when-current-t.patch
I had some problem with OPUS codec. It introduce noise when use PLC.
Using concealement only when we are late...

0010-voip-audiostream-removed-compile-warning.patch
Minor. Fix warning

0011-voip-audiostream-fixed-memleak-on-multiple-audio_str.patch
In src/audiostream.c there is a memleak when recorder is stopped.
With this patch record_file is freed, but the sequece
audio_stream_mixed_record_open,
audio_stream_mixed_record_start,
audio_stream_mixed_record_stop
is mandatory.
bagamarco .
2018-02-12 14:25:49 UTC
Permalink
Thomas Dalmayrac report a paste/copy error. Attached fixed
patch 0003-audiofilters-alsa-fixed-reference-errors-when-compil.patch
replaces previous one.
Hi !
In 0003-audiofilters-alsa-fixed-reference-errors-when-compil.patch is
+#ifdef __ALSA_EPIPE_BUGFIX__
+# define EPIPE_BUGFIX 1
+#endif /* __ALSA_THREADED_VERSION__ */
+#ifdef __ALSA_EPIPE_BUGFIX__
+# define EPIPE_BUGFIX 1
+#endif /* __ALSA_EPIPE_BUGFIX__*/
?
Thanks for helping. I still don't manage to make linphone work without
echoes or disto but it's going in a good way. :)
I'll keep you informed. Thomas.
Hey folks,
working with my iMX6 SoloX and mediastreamer tool I run into some audio
problems.
Attached you can find some patches that fix few bugs, simplify alsa filter
configuration (threaded version and epipe bug fixing) and other minor
changes like typos or compile warning.
In next mails I will provide some general modification and new features to
mediastreamer tool.
*Patch list and description:*
0001-audiofilters-alsa-aligned-read_process-samples-to-20.patch
alsa_read_process function in non threaded version read 16ms samples
instead of 20ms like other functions.
0002-audiofilters-alsa-fixed-errors-when-compiled-with-TH.patch
Use ENABLE_ALSA_THREADED cmake option to enable alsa threaded version.
Also fix compile errors in this configuration.
0003-audiofilters-alsa-fixed-reference-errors-when-compil.patch
Use ENABLE_ALSA_EPIPE_BUGFIX cmake option to enable EPIPE_BUGFIX in
alsa filter.
Also fix compile errors in this configuration.
0004-audiofilters-alsa-added-debug-message-when-alsa_writ.patch
Actually, when snd_pcm_writei returns EAGAIN, these samples are
discarded generating audio noise.
Increase output buffer size in /etc/asound.conf avoid EAGAIN error.
In order to simply debug, this patch add ms_debug message every time
EAGAIN is returned.
0005-audiofilters-audiomixer-do-not-check-channel-activit.patch
When an MSAudioMixer input pin is disabled do not consider channel
activity and discard samples.
0006-audiofilters-audiomixer-increase-logging-information.patch
Added debug information when MSAudioMixer enters into bypass mode.
0007-audiofilters-audiomixer-fixed-typos.patch
Fixed typos
0008-msqueue-added-mutex-lock-in-MSBufferizer-in-order-to.patch
MSFilePlayer generate strange duplicated audio.
After some debug, I notice that ms_bufferizer provides duplicated
samples.
This patch added mutex in order protect critical section in msqueue
proceducer/consumer.
0009-mscommon-concealement-is-not-required-when-current-t.patch
I had some problem with OPUS codec. It introduce noise when use PLC.
Using concealement only when we are late...
0010-voip-audiostream-removed-compile-warning.patch
Minor. Fix warning
0011-voip-audiostream-fixed-memleak-on-multiple-audio_str.patch
In src/audiostream.c there is a memleak when recorder is stopped.
With this patch record_file is freed, but the sequece
audio_stream_mixed_record_open,
audio_stream_mixed_record_start,
audio_stream_mixed_record_stop
is mandatory.
_______________________________________________
--
Thomas Dalmayrac
Ingénieur Développement - IHM
*Cameon*
3 rue de BaviÚre
<https://maps.google.com/?q=3+rue+de+Bavi%C3%A8re+%0D+44240+La+chapelle+sur+Erdre&entry=gmail&source=g>
44240 La chapelle sur Erdre
Tel : (+33) 2 51 13 54 66 <+33%202%2051%2013%2054%2066>
Simon MORLAT
2018-02-14 15:59:36 UTC
Permalink
Hi Marco,

Thank you for all contributed patches and for having sign the contributor
agreement.
Our team will review carefully your contributions with the objective of
incorporating them into mediastreamer2's master branch. Perhaps not all of
them will be merged, if we estimate that they risk to break existing
features.
This process may take a while, given our current workload. We'll post here
when we are done, with comments for the patch we decided not to merge (if
any !).

Best regards,

Simon
Post by bagamarco .
Thomas Dalmayrac report a paste/copy error. Attached fixed
patch 0003-audiofilters-alsa-fixed-reference-errors-when-compil.patch
replaces previous one.
Hi !
In 0003-audiofilters-alsa-fixed-reference-errors-when-compil.patch is
+#ifdef __ALSA_EPIPE_BUGFIX__
+# define EPIPE_BUGFIX 1
+#endif /* __ALSA_THREADED_VERSION__ */
+#ifdef __ALSA_EPIPE_BUGFIX__
+# define EPIPE_BUGFIX 1
+#endif /* __ALSA_EPIPE_BUGFIX__*/
?
Thanks for helping. I still don't manage to make linphone work without
echoes or disto but it's going in a good way. :)
I'll keep you informed. Thomas.
Hey folks,
working with my iMX6 SoloX and mediastreamer tool I run into some audio
problems.
Attached you can find some patches that fix few bugs, simplify alsa
filter configuration (threaded version and epipe bug fixing) and other
minor changes like typos or compile warning.
In next mails I will provide some general modification and new features
to mediastreamer tool.
*Patch list and description:*
0001-audiofilters-alsa-aligned-read_process-samples-to-20.patch
alsa_read_process function in non threaded version read 16ms samples
instead of 20ms like other functions.
0002-audiofilters-alsa-fixed-errors-when-compiled-with-TH.patch
Use ENABLE_ALSA_THREADED cmake option to enable alsa threaded version.
Also fix compile errors in this configuration.
0003-audiofilters-alsa-fixed-reference-errors-when-compil.patch
Use ENABLE_ALSA_EPIPE_BUGFIX cmake option to enable EPIPE_BUGFIX in
alsa filter.
Also fix compile errors in this configuration.
0004-audiofilters-alsa-added-debug-message-when-alsa_writ.patch
Actually, when snd_pcm_writei returns EAGAIN, these samples are
discarded generating audio noise.
Increase output buffer size in /etc/asound.conf avoid EAGAIN error.
In order to simply debug, this patch add ms_debug message every time
EAGAIN is returned.
0005-audiofilters-audiomixer-do-not-check-channel-activit.patch
When an MSAudioMixer input pin is disabled do not consider channel
activity and discard samples.
0006-audiofilters-audiomixer-increase-logging-information.patch
Added debug information when MSAudioMixer enters into bypass mode.
0007-audiofilters-audiomixer-fixed-typos.patch
Fixed typos
0008-msqueue-added-mutex-lock-in-MSBufferizer-in-order-to.patch
MSFilePlayer generate strange duplicated audio.
After some debug, I notice that ms_bufferizer provides duplicated
samples.
This patch added mutex in order protect critical section in msqueue
proceducer/consumer.
0009-mscommon-concealement-is-not-required-when-current-t.patch
I had some problem with OPUS codec. It introduce noise when use PLC.
Using concealement only when we are late...
0010-voip-audiostream-removed-compile-warning.patch
Minor. Fix warning
0011-voip-audiostream-fixed-memleak-on-multiple-audio_str.patch
In src/audiostream.c there is a memleak when recorder is stopped.
With this patch record_file is freed, but the sequece
audio_stream_mixed_record_open,
audio_stream_mixed_record_start,
audio_stream_mixed_record_stop
is mandatory.
_______________________________________________
--
Thomas Dalmayrac
Ingénieur Développement - IHM
*Cameon*
3 rue de BaviÚre
<https://maps.google.com/?q=3+rue+de+Bavi%C3%A8re+%0D+44240+La+chapelle+sur+Erdre&entry=gmail&source=g>
44240 La chapelle sur Erdre
Tel : (+33) 2 51 13 54 66 <+33%202%2051%2013%2054%2066>
_______________________________________________
Linphone-developers mailing list
https://lists.nongnu.org/mailman/listinfo/linphone-developers
bagamarco .
2018-08-31 14:51:43 UTC
Permalink
Hi all,

I suggest another bugfix that improve audio quality using alsa filter.

Till now alsa device in write mode is opened on first "alsa_write_process"
call.
On my iMX6 SoloX this operation takes about 200ms.
During this time ticker is hanged causing noise while playing next few
frames.

With attached patch alsa device is opened into preprocess function in order
to avoid previous described situation.




Il giorno mer 14 feb 2018 alle ore 17:01 Simon MORLAT <
Post by Simon MORLAT
Hi Marco,
Thank you for all contributed patches and for having sign the contributor
agreement.
Our team will review carefully your contributions with the objective of
incorporating them into mediastreamer2's master branch. Perhaps not all of
them will be merged, if we estimate that they risk to break existing
features.
This process may take a while, given our current workload. We'll post here
when we are done, with comments for the patch we decided not to merge (if
any !).
Best regards,
Simon
Post by bagamarco .
Thomas Dalmayrac report a paste/copy error. Attached fixed
patch 0003-audiofilters-alsa-fixed-reference-errors-when-compil.patch
replaces previous one.
Hi !
In 0003-audiofilters-alsa-fixed-reference-errors-when-compil.patch is
+#ifdef __ALSA_EPIPE_BUGFIX__
+# define EPIPE_BUGFIX 1
+#endif /* __ALSA_THREADED_VERSION__ */
+#ifdef __ALSA_EPIPE_BUGFIX__
+# define EPIPE_BUGFIX 1
+#endif /* __ALSA_EPIPE_BUGFIX__*/
?
Thanks for helping. I still don't manage to make linphone work without
echoes or disto but it's going in a good way. :)
I'll keep you informed. Thomas.
Hey folks,
working with my iMX6 SoloX and mediastreamer tool I run into some audio
problems.
Attached you can find some patches that fix few bugs, simplify alsa
filter configuration (threaded version and epipe bug fixing) and other
minor changes like typos or compile warning.
In next mails I will provide some general modification and new features
to mediastreamer tool.
*Patch list and description:*
0001-audiofilters-alsa-aligned-read_process-samples-to-20.patch
alsa_read_process function in non threaded version read 16ms samples
instead of 20ms like other functions.
0002-audiofilters-alsa-fixed-errors-when-compiled-with-TH.patch
Use ENABLE_ALSA_THREADED cmake option to enable alsa threaded version.
Also fix compile errors in this configuration.
0003-audiofilters-alsa-fixed-reference-errors-when-compil.patch
Use ENABLE_ALSA_EPIPE_BUGFIX cmake option to enable EPIPE_BUGFIX in
alsa filter.
Also fix compile errors in this configuration.
0004-audiofilters-alsa-added-debug-message-when-alsa_writ.patch
Actually, when snd_pcm_writei returns EAGAIN, these samples are
discarded generating audio noise.
Increase output buffer size in /etc/asound.conf avoid EAGAIN error.
In order to simply debug, this patch add ms_debug message every time
EAGAIN is returned.
0005-audiofilters-audiomixer-do-not-check-channel-activit.patch
When an MSAudioMixer input pin is disabled do not consider channel
activity and discard samples.
0006-audiofilters-audiomixer-increase-logging-information.patch
Added debug information when MSAudioMixer enters into bypass mode.
0007-audiofilters-audiomixer-fixed-typos.patch
Fixed typos
0008-msqueue-added-mutex-lock-in-MSBufferizer-in-order-to.patch
MSFilePlayer generate strange duplicated audio.
After some debug, I notice that ms_bufferizer provides duplicated
samples.
This patch added mutex in order protect critical section in msqueue
proceducer/consumer.
0009-mscommon-concealement-is-not-required-when-current-t.patch
I had some problem with OPUS codec. It introduce noise when use PLC.
Using concealement only when we are late...
0010-voip-audiostream-removed-compile-warning.patch
Minor. Fix warning
0011-voip-audiostream-fixed-memleak-on-multiple-audio_str.patch
In src/audiostream.c there is a memleak when recorder is stopped.
With this patch record_file is freed, but the sequece
audio_stream_mixed_record_open,
audio_stream_mixed_record_start,
audio_stream_mixed_record_stop
is mandatory.
_______________________________________________
--
Thomas Dalmayrac
Ingénieur Développement - IHM
*Cameon*
3 rue de BaviÚre
<https://maps.google.com/?q=3+rue+de+Bavi%C3%A8re+%0D+44240+La+chapelle+sur+Erdre&entry=gmail&source=g>
44240 La chapelle sur Erdre
Tel : (+33) 2 51 13 54 66 <+33%202%2051%2013%2054%2066>
_______________________________________________
Linphone-developers mailing list
https://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Loading...