Skip to contentSkip to conversation

snd-powermac produces only low quality dirty sound

DISCUSSION Olaf Hering 3 participants 7 messages Dec 14, 2004 – Dec 15, 2004 PowerPC

lore
Share & tools
lore
#0 lore raw

All 2.6 versions I tried so far produce only "dirty" low quality sound when playing mp3 with xmms with either the alsa or oss plugin. But it works as expected when I use dmasound_pmac and the liboss plugin.

Any ideas how to debug it?
I "see" it on an ibook 600MHz, but also on a G4 and a 400MHz Powerbook.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

#1 lore raw

RE: snd-powermac produces only low quality dirty so

Quoted 5 lines · On 14-Dec-2004 Olaf Hering wrote:

All 2.6 versions I tried so far produce only "dirty" low quality sound when playing mp3 with xmms with either the alsa or oss plugin. But it works as expected when I use dmasound_pmac and the liboss plugin.

Any ideas how to debug it?

It seems that the chip is not happy with some period/buffer sizes. Someone was trying to find the right constraints to set for those parameters. Maybe the attached patch fixes it (untested).

--
Giuliano.

ppc/pmac.c renamed from ppc/pmac.c__ +1 -0
@@ -538,6 +538,11 @@
 	runtime->private_data = rec;
 	rec->substream = subs;
 
+	if ((i = snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE

)) < 0)
+ return i;
+ if ((i = snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE
)) < 0)
+ return i;
+
#if 0 /* FIXME: still under development.. */
snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
snd_pmac_hw_rule_rate, chip, rec->stream, -1);

#2 lore raw
Quoted 9 lines · On Wed, 15 Dec 2004 11:10:02 +0100 (CET) Giuliano Pochini <[email protected]>…
Quoted 5 lines

All 2.6 versions I tried so far produce only "dirty" low quality sound when playing mp3 with xmms with either the alsa or oss plugin. But it works as expected when I use dmasound_pmac and the liboss plugin.

Any ideas how to debug it?

It seems that the chip is not happy with some period/buffer sizes. Someone was trying to find the right constraints to set for those parameters. Maybe the attached patch fixes it (untested).

Uffff, that stupid program wrapped long lines.

ppc/pmac.c renamed from ppc/pmac.c__ +5 -0
@@ -538,6 +538,11 @@
 	runtime->private_data = rec;
 	rec->substream = subs;
 
+	if ((i = snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE)) < 0)
+		return i;
+	if ((i = snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE)) < 0)
+		return i;
+
 #if 0 /* FIXME: still under development.. */
 	snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
 			    snd_pmac_hw_rule_rate, chip, rec->stream, -1);
Signature · 8 lines
Giuliano.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
#3 lore raw

Re: snd-powermac produces only low quality dirty so

In reply to Giuliano Pochini
Quoted 7 lines · Giuliano Pochini
Quoted 4 lines · On 14-Dec-2004 Olaf Hering wrote:

All 2.6 versions I tried so far produce only "dirty" low quality sound when playing mp3 with xmms with either the alsa or oss plugin. But it works as expected when I use dmasound_pmac and the liboss plugin.

Quoted 5 lines
Quoted 1 line

Any ideas how to debug it?

It seems that the chip is not happy with some period/buffer sizes. Someone was trying to find the right constraints to set for those parameters. Maybe the attached patch fixes it (untested).

This patch does not help.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

#4 lore raw

RE: snd-powermac produces only low quality dirty so

In reply to Giuliano Pochini
Quoted 7 lines · Giuliano Pochini
Quoted 4 lines · On 14-Dec-2004 Olaf Hering wrote:

All 2.6 versions I tried so far produce only "dirty" low quality sound when playing mp3 with xmms with either the alsa or oss plugin. But it works as expected when I use dmasound_pmac and the liboss plugin.

Quoted 6 lines
Quoted 1 line

Any ideas how to debug it?

It seems that the chip is not happy with some period/buffer sizes. Someone was trying to find the right constraints to set for those parameters. Maybe the attached patch fixes it (untested).

O yes, I forgot to send it. Will do later tonight. It doesn't have to be a power of 2 though, at least not on my Snapper.
However, the problem never occured with oss emulation, so I doubt above problem is the same. Low quality sound was happening a few versions ago, but latest ALSA produces very reasonable sound, only distortion when I turn up PCM too much (and DRC Range is set high).

So:
-what version (libs+driver)
-what is "dirty" low quality?

d.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

#5 lore raw

Re: snd-powermac produces only low quality dirty so

Quoted 1 line · On Wed, Dec 15, [email protected] wrote:

-what version (libs+driver)

its alsa-1.0.3 with kernel 2.6.10, but happens also with 2.6.5.

Quoted 1 line

-what is "dirty" low quality?

I guess you have to hear it. Sounds like a mp3 with a very low sampling rate, or a broken LP (vinyl, gramophone record however you name it).

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

#6 lore raw

Re: snd-powermac produces only low quality dirty so

In reply to [email protected]
Quoted 15 lines · On Wed, Dec 15, [email protected] wrote:
Quoted 7 lines · Giuliano Pochini
Quoted 4 lines · On 14-Dec-2004 Olaf Hering wrote:

All 2.6 versions I tried so far produce only "dirty" low quality sound when playing mp3 with xmms with either the alsa or oss plugin. But it works as expected when I use dmasound_pmac and the liboss plugin.

Quoted 6 lines
Quoted 1 line

Any ideas how to debug it?

It seems that the chip is not happy with some period/buffer sizes. Someone was trying to find the right constraints to set for those parameters. Maybe the attached patch fixes it (untested).

Quoted 6 lines

O yes, I forgot to send it. Will do later tonight. It doesn't have to be a power of 2 though, at least not on my Snapper.
However, the problem never occured with oss emulation, so I doubt above problem is the same. Low quality sound was happening a few versions ago, but latest ALSA produces very reasonable sound, only distortion when I turn up PCM too much (and DRC Range is set high).

You are right, reducing the volume to 80% in xmms fixes it and the mp3 sounds ok.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/