All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Alvin Brattli <Alvin.Brattli@phys.uit.no>
To: Ryan Nielsen <ran@krazynet.com>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: patch for dmasound bug
Date: Sat, 12 Jun 1999 00:54:46 +0200	[thread overview]
Message-ID: <199906112254.AAA06098@mitra.phys.uit.no> (raw)
In-Reply-To: Your message of "Fri, 11 Jun 1999 13:07:54 PDT." <19990611130754.A67@gondolin>



Ryan Nielsen:
>Alvin Brattli wrote:
>> Although this patch might do what it was intended for, it has some
>> unwanted consequences on the PowerBook G3 Series, namely that one gets a
>> constant, really annoying hiss from the loudspeakers, most notably
>> during the boot sequence.  Without this patch, the hiss stops after a
>> system beep (like when you do an "echo ^G" in a shell), but now even
>> this does not help.  So, if this patch is included in the standard
>> distribution, I suspect we will hear a lot of complaints from PowerBook
>> G3 users.
>
>is this better?
>--- dmasound.c	1999/02/05 05:45:42	1.41
>+++ dmasound.c	1999/06/11 20:04:43
>@@ -3255,6 +3255,11 @@
> 	save_flags(flags); cli();
> 	if (beep_playing) {
> 		st_le16(&beep_dbdma_cmd->command, DBDMA_STOP);
>+		out_le32(&awacs_txdma->control, (RUN|PAUSE|FLUSH|WAKE) << 16);
>+		out_le32(&awacs->control, MASK_IEPC
>+			 | (awacs_rate_index << 8) | 0x11
>+			 | (awacs_revision < AWACS_BURGUNDY? MASK_IEE: 0));
>+		out_le32(&awacs->byteswap, sound.hard.format != AFMT_S16_BE);
> 		beep_playing = 0;
> 	}
> 	restore_flags(flags);

Nope.  The hiss is still there, and won't go away.  If it can be of any
help, the patch below removes the hiss during boot-time when your
patch is not applied.  The patch simply makes a very short beep with
zero volume.  However, after playing certain sounds, the hiss comes
back, and can then be stopped with a system beep (like with "echo ^G" in
a terminal window).


--- linux-2.2.8-orig/drivers/sound/dmasound.c	Fri May 14 22:24:46 1999
+++ linux-2.2.8/drivers/sound/dmasound.c	Sat Jun 12 00:49:44 1999
@@ -4840,6 +4840,7 @@
 	int has_sound = 0;
 #ifdef CONFIG_PPC
 	struct device_node *np;
+	int beep_volume_tmp;
 #endif
 
 #if defined(__mc68000__) || defined(CONFIG_APUS)
@@ -4974,6 +4975,14 @@
 #ifdef MODULE
 	irq_installed = 1;
 #endif
+
+#ifdef CONFIG_PPC
+	/* Remove hiss from PowerBook speakers (very ad hoc) */
+	beep_volume_tmp = beep_volume;
+	beep_volume = 0;
+	awacs_mksound(750, 1);
+	beep_volume = beep_volume_tmp;
+#endif /* CONFIG_PPC */
 
 	printk(KERN_INFO "DMA sound driver installed, using %d buffers of %dk.\n",
 	       numBufs, bufSize);




aLViN
-- 
:r .signature

[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

      reply	other threads:[~1999-06-11 22:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-02 20:05 patch for dmasound bug Ryan Nielsen
1999-06-10 22:56 ` Alvin Brattli
1999-06-11 20:07   ` Ryan Nielsen
1999-06-11 22:54     ` Alvin Brattli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199906112254.AAA06098@mitra.phys.uit.no \
    --to=alvin.brattli@phys.uit.no \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=ran@krazynet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.