yea, the more i digged into that, i found it was still outputting S16_LE.
anyway, I've done a little more experimenting.
I removed the ALSA_OPTIONS: NO_AUTO_CHANNELS | NO_AUTO_FORMAT | NO_AUTO_ RESAMPLE
So now it simply initializes the output as FLOAT and lets ALSA choose the best output format and do what it needs to do. Interestingly, it chose S32_LE as the output format on its own as discovered by 'cat `find /proc/asound/card0/pcm3p/sub0/*`' but you may be interested to know that the sound as as good as when I had disabled S32_LE and forced it to use S16_LE
What this tells me is that you are right.. we need to look into the whats happening in the conversion to float and from float. To float seems to be introducing small amounts of clipping, and from float to 32 is where the major amount of clipping is occurring.
Another thing I've noticed is that my S32_LE issues seem to stem from forcing RW_INTERLEAVED. When I ran speaker-test, I found it would automatically choose MMAP_INTERLEAVED. This is confirmed by the 'good' output @ S32_LE with the changes I described above. ALSA automatically selected MMAP_INTERLEAVED.
Here is the output of 'cat `find /proc/asound/card0/pcm3p/sub0/*`':
antigenx@xbmc:~/xbmc-ae$ cat `find /proc/asound/card0/pcm3p/sub0/*`
Code:
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 352
buffer_size: 11264
card: 0
device: 3
subdevice: 0
stream: PLAYBACK
id: NVIDIA HDMI
name: NVIDIA HDMI
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 0
4096
32768
state: RUNNING
trigger_time: 3096.920748227
tstamp : 3430.389582743
delay : 10838
avail : 426
avail_max : 11178
-----
hw_ptr : 14705974
appl_ptr : 14716812
tstamp_mode: NONE
period_step: 1
avail_min: 352
start_threshold: 2147483647
stop_threshold: 11264
silence_threshold: 0
silence_size: 1476395008
boundary: 1476395008
I also played around with the buffer calculations, but they seem fine to me. I wish I knew more about audio conversion from one bit format to another... do you have any references you can direct me to?