Skip to contentSkip to conversation

Distorted jackd output on Macbooks

DISCUSSION Adrian Knoth 2 participants 6 messages Apr 27, 2012 – May 12, 2012 Sound

lore
Share & tools
lore
#0 lore raw

Hi!

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.

I happen to have a spare MacBookPro around, but I won't have time to look into that myself anytime soon.

If somebody else has such a device and wants to give it a whirl, feel free to go ahead. ;)

Cheers

#1 lore raw

At Fri, 27 Apr 2012 21:13:48 +0200,

Quoted 6 lines · Adrian Knoth

Hi!

JFTR, we've seen users that report distorted sound on their macbooks when using jackd.

Quoted 6 lines

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?
And does this happen only with JACK? That is, if you run "aplay -Dhw" with 32bit PCM, does it play normally?

thanks,

Takashi

Quoted 13 lines

I happen to have a spare MacBookPro around, but I won't have time to look into that myself anytime soon.

If somebody else has such a device and wants to give it a whirl, feel free to go ahead. ;)

Cheers
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#2 lore raw
Quoted 11 lines · Takashi Iwai
Quoted 9 lines

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

Quoted 2 lines

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.

HTH

Signature · 1 line
mail: [email protected]  	http://adi.thur.de	PGP/GPG: key via keyserver
#3 lore raw

At Tue, 8 May 2012 16:45:30 +0200,

Quoted 25 lines · Adrian Knoth
Quoted 11 lines · Takashi Iwai
Quoted 9 lines

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
Quoted 2 lines

And does this happen only with JACK? That is, if you run "aplay -Dhw" with 32bit PCM, does it play normally?

Quoted 8 lines

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

---

sound/pci/hda/hda_codec.c +2 -0
index 882bb3a..48c50dd 100644
@@ -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
#4 lore raw
Quoted 24 lines · Takashi Iwai
Quoted 8 lines

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.

I guess we can disable the support code for now like the patch below.

Could you check whether it works for you?

sound/pci/hda/hda_codec.c +0 -0
index 882bb3a..48c50dd 100644
@@ -3781,11 +3781,13 @@ int snd_hda_query_supported_pcm(struct hda_codec *codec, hda_nid_t nid,
 					bps = 20;
 			}
 		}

sound/pci/hda/hda_codec.c int snd_hda_query_supported_pcm(struct hda_codec *codec, hda_nid_t nid, · line 3793

Quoted 10 lines
sound/pci/hda/hda_codec.c +2 -0
+#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

Yep, this does the trick. Works.

Cheers

Signature · 1 line
mail: [email protected]  	http://adi.thur.de	PGP/GPG: key via keyserver
#5 lore raw

At Sat, 12 May 2012 00:27:34 +0200,

Quoted 32 lines · Adrian Knoth
Quoted 29 lines · Takashi Iwai
Quoted 8 lines

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.

I guess we can disable the support code for now like the patch below.

Could you check whether it works for you?

sound/pci/hda/hda_codec.c +1 -0
index 882bb3a..48c50dd 100644
@@ -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;
Quoted 8 lines

sound/pci/hda/hda_codec.c int snd_hda_query_supported_pcm(struct hda_codec *codec, hda_nid_t nid, · line 3793

Quoted 5 lines
sound/pci/hda/hda_codec.c +1 -0
 		}
+#endif
 		if (streams == AC_SUPFMT_AC3) {
 			/* should be exclusive */
 			/* temporary hack: we have still no proper support

Yep, this does the trick. Works.

OK, I applied the patch now.

thanks,

Takashi