Re: [pulseaudio-discuss] S24_3LE not support in try_auto of set_format
On 2015-06-21 11:19, Raymond Yau wrote: Do you mean you still cannot force pulseaudio to use 24 bits for your creative usb audio ? Seem try auto format did not include 24bits I have 24bit explicitly in pulseaudio config currently: default-sample-format = s24le But it still uses 16bit, didn't managed how to force it to use 24bit static const pa_sample_format_t try_order[] = { PA_SAMPLE_FLOAT32NE, PA_SAMPLE_FLOAT32RE, PA_SAMPLE_S32NE, PA_SAMPLE_S32RE, PA_SAMPLE_S24_32NE, PA_SAMPLE_S24_32RE, PA_SAMPLE_S24NE, PA_SAMPLE_S24RE, + PA_SAMPLE_S24LE, PA_SAMPLE_S16NE, PA_SAMPLE_S16RE, PA_SAMPLE_ALAW, PA_SAMPLE_ULAW, PA_SAMPLE_U8 }; Seem missing PA_SAMPLE_S24LE in try_order, not sure any assembley code need to be changed S24LE is the same as S24NE on little-endian archs, and the same as S24RE on big-endian archs. LE = Little endian BE = Big endian NE = Native endian RE = Reverse endian (i e, the opposite to the native one) -- David Henningsson, Canonical Ltd. https://launchpad.net/~diwic ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] S24_3LE not support in try_auto of set_format
Do you mean you still cannot force pulseaudio to use 24 bits for your creative usb audio ? Seem try auto format did not include 24bits I have 24bit explicitly in pulseaudio config currently: default-sample-format = s24le But it still uses 16bit, didn't managed how to force it to use 24bit static const pa_sample_format_t try_order[] = { PA_SAMPLE_FLOAT32NE, PA_SAMPLE_FLOAT32RE, PA_SAMPLE_S32NE, PA_SAMPLE_S32RE, PA_SAMPLE_S24_32NE, PA_SAMPLE_S24_32RE, PA_SAMPLE_S24NE, PA_SAMPLE_S24RE, + PA_SAMPLE_S24LE, PA_SAMPLE_S16NE, PA_SAMPLE_S16RE, PA_SAMPLE_ALAW, PA_SAMPLE_ULAW, PA_SAMPLE_U8 }; Seem missing PA_SAMPLE_S24LE in try_order, not sure any assembley code need to be changed S24LE is the same as S24NE on little-endian archs, and the same as S24RE on big-endian archs. LE = Little endian BE = Big endian NE = Native endian RE = Reverse endian (i e, the opposite to the native one) Can you post the output aplay -D hw:CARD=S51 --dump-hw-params stereo.wav to find which alsa format supported by your usb 5.1 ? Can you post pulseaudio log which contain 0.091| 0.000) D: [pulseaudio] alsa-util.c: Trying hw:1,1,0 with SND_PCM_NO_AUTO_FORMAT ... ( 0.091| 0.000) D: [pulseaudio] alsa-util.c: Managed to open hw:1,1,0 ( 0.091| 0.000) I: [pulseaudio] alsa-util.c: Disabling tsched mode since BATCH flag is set ( 0.091| 0.000) D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 3640 ms ( 0.091| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.091| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.092| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.092| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.092| 0.000) D: [pulseaudio] alsa-util.c: Set neither period nor buffer size. ( 0.093| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.093| 0.000) I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Input/output error ( 0.093| 0.000) D: [pulseaudio] alsa-util.c: Trying hw:1,1,0 without SND_PCM_NO_AUTO_FORMAT ... ( 0.093| 0.000) D: [pulseaudio] alsa-util.c: Managed to open hw:1,1,0 ( 0.093| 0.000) I: [pulseaudio] alsa-util.c: Disabling tsched mode since BATCH flag is set ( 0.093| 0.000) D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 3640 ms ( 0.093| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.094| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.094| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.094| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.094| 0.000) D: [pulseaudio] alsa-util.c: Set neither period nor buffer size. ( 0.095| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.095| 0.000) I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Input/output error since I cannot reproduce those SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) errors ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] S24_3LE not support in try_auto of set_format
static const pa_sample_format_t try_order[] = { PA_SAMPLE_FLOAT32NE, PA_SAMPLE_FLOAT32RE, PA_SAMPLE_S32NE, PA_SAMPLE_S32RE, PA_SAMPLE_S24_32NE, PA_SAMPLE_S24_32RE, PA_SAMPLE_S24NE, PA_SAMPLE_S24RE, + PA_SAMPLE_S24LE, PA_SAMPLE_S16NE, PA_SAMPLE_S16RE, PA_SAMPLE_ALAW, PA_SAMPLE_ULAW, PA_SAMPLE_U8 }; Seem missing PA_SAMPLE_S24LE in try_order, not sure any assembley code need to be changed You need to call snd_pcm_hw_params_test_format first, if format is supported call snd_pcm_hw_params_set_format There are three calls in set_format - if ((ret = snd_pcm_hw_params_set_format(pcm_handle, hwparams, format_trans[*f])) = 0) - return ret; + if (snd_pcm_hw_params_test_format(pcm_handle, hwparams, format_trans[*f]) == 0) + return snd_pcm_hw_params_set_format(pcm_handle, hwparams, format_trans[*f]); +else - pa_log_debug(snd_pcm_hw_params_set_format(%s) failed: %s, snd_pcm_format_description(format_trans[*f]), pa_alsa_strerror(ret)); pa_log_debug(format (%s) not supported, snd_pcm_format_description(format_trans[*f])); PA_SAMPLE_S24LE seems to be missing indeed (but why there are 3 *S24* items, all other are in pairs?), but this patch doesn't change anything - log is the same, both in automatic detection mode and when specified explicitly. Sincerely, Nazar Mokrynskyi github.com/nazar-pc Skype: nazar-pc Diaspora: naza...@diaspora.mokrynskyi.com Tox: A9D95C9AA5F7A3ED75D83D0292E22ACE84BA40E912185939414475AF28FD2B2A5C8EF5261249 smime.p7s Description: Кріптографічний підпис S/MIME ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
[pulseaudio-discuss] S24_3LE not support in try_auto of set_format
Do you mean you still cannot force pulseaudio to use 24 bits for your creative usb audio ? Seem try auto format did not include 24bits I have 24bit explicitly in pulseaudio config currently: default-sample-format = s24le But it still uses 16bit, didn't managed how to force it to use 24bit static const pa_sample_format_t try_order[] = { PA_SAMPLE_FLOAT32NE, PA_SAMPLE_FLOAT32RE, PA_SAMPLE_S32NE, PA_SAMPLE_S32RE, PA_SAMPLE_S24_32NE, PA_SAMPLE_S24_32RE, PA_SAMPLE_S24NE, PA_SAMPLE_S24RE, + PA_SAMPLE_S24LE, PA_SAMPLE_S16NE, PA_SAMPLE_S16RE, PA_SAMPLE_ALAW, PA_SAMPLE_ULAW, PA_SAMPLE_U8 }; Seem missing PA_SAMPLE_S24LE in try_order, not sure any assembley code need to be changed You need to call snd_pcm_hw_params_test_format first, if format is supported call snd_pcm_hw_params_set_format There are three calls in set_format - if ((ret = snd_pcm_hw_params_set_format(pcm_handle, hwparams, format_trans[*f])) = 0) - return ret; + if (snd_pcm_hw_params_test_format(pcm_handle, hwparams, format_trans[*f]) == 0) + return snd_pcm_hw_params_set_format(pcm_handle, hwparams, format_trans[*f]); +else - pa_log_debug(snd_pcm_hw_params_set_format(%s) failed: %s, snd_pcm_format_description(format_trans[*f]), pa_alsa_strerror(ret)); pa_log_debug(format (%s) not supported, snd_pcm_format_description(format_trans[*f])); ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss