<p></p>
<p>><br>
>> Do you mean you still cannot force pulseaudio to use 24 bits for your creative usb audio ?<br>
>><br>
>> Seem try auto format did not include 24bits<br>
><br>
> I have 24bit explicitly in pulseaudio config currently:<br>
>>><br>
>>> default-sample-format = s24le<br>
><br>
> But it still uses 16bit, didn't managed how to force it to use 24bit<br></p>
<p>static const pa_sample_format_t try_order[] = {<br>
PA_SAMPLE_FLOAT32NE,<br>
PA_SAMPLE_FLOAT32RE,<br>
PA_SAMPLE_S32NE,<br>
PA_SAMPLE_S32RE,<br>
PA_SAMPLE_S24_32NE,<br>
PA_SAMPLE_S24_32RE,<br>
PA_SAMPLE_S24NE,<br>
PA_SAMPLE_S24RE,<br>
+ PA_SAMPLE_S24LE,<br>
PA_SAMPLE_S16NE,<br>
PA_SAMPLE_S16RE,<br>
PA_SAMPLE_ALAW,<br>
PA_SAMPLE_ULAW,<br>
PA_SAMPLE_U8<br>
};</p>
<p>Seem missing PA_SAMPLE_S24LE in try_order, not sure any assembley code need to be changed </p>
<p>You need to call snd_pcm_hw_params_test_format first, if format is supported call snd_pcm_hw_params_set_format </p>
<p>There are three calls in set_format<br><br></p>
<p> - if ((ret = snd_pcm_hw_params_set_format(pcm_handle, hwparams, format_trans[*f])) >= 0)<br>
- return ret;<br>
+ if (snd_pcm_hw_params_test_format(pcm_handle, hwparams, format_trans[*f]) == 0)<br>
+ return snd_pcm_hw_params_set_format(pcm_handle, hwparams, format_trans[*f]);<br>
+else<br>
- pa_log_debug("snd_pcm_hw_params_set_format(%s) failed: %s",<br>
snd_pcm_format_description(format_trans[*f]),<br>
pa_alsa_strerror(ret));<br>
pa_log_debug("format (%s) not supported",<br>
snd_pcm_format_description(format_trans[*f]));</p>
<p> </p>