At Tue, 8 May 2012 16:45:30 +0200, Adrian Knoth wrote:
On Tue, May 08, 2012 at 01:01:32PM +0200, Takashi Iwai wrote:
JFTR, we've seen users that report distorted sound on their macbooks when using jackd.
The workaround is to force 16-bit output:
http://jackaudio.org/macbook_distortion
Chip in question was the Cirrus Logic CS4206. We don't know yet which of the formats (32/24) is broken, maybe only one, maybe both.
Distrotion means noisy outputs or complete noise?
Noisy output, like clipping. As if the MSB would be wrong.
Here's an example:
http://www.youtube.com/watch?v=QD23mC_Dbek
And does this happen only with JACK? That is, if you run "aplay -Dhw" with 32bit PCM, does it play normally?
I've installed Linux on my spare MacBookPro and can report that JACKD is not to blame. aplay and jackd behave the same:
FLOAT_LE is distorted S32LE is fine
So only FLOAT_LE is broken, S32LE and S24_3LE are fine.
OK, that's good to know. I didn't know that the codec supports the float.
Maybe the whole support of the float format might be broken. Looking through my collections of alsa-info.sh outputs, cs4206 is the only one supporting the float format. If the support of float is fundamentally broken, it's the reason only a few users of Mac faced the problem with JACK.
I guess we can disable the support code for now like the patch below.
Could you check whether it works for you?
thanks,
Takashi
--- diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 882bb3a..48c50dd 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -3781,11 +3781,13 @@ int snd_hda_query_supported_pcm(struct hda_codec *codec, hda_nid_t nid, bps = 20; } } +#if 0 /* FIXME: CS4206 doesn't work, which is the only codec supporting float */ if (streams & AC_SUPFMT_FLOAT32) { formats |= SNDRV_PCM_FMTBIT_FLOAT_LE; if (!bps) bps = 32; } +#endif if (streams == AC_SUPFMT_AC3) { /* should be exclusive */ /* temporary hack: we have still no proper support