Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sound Problem on the new Powerbook 12" ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
mroy31
n00b
n00b


Joined: 03 May 2005
Posts: 11

PostPosted: Tue May 03, 2005 8:28 am    Post subject: Sound Problem on the new Powerbook 12" ? Reply with quote

Hi

I just bought the new powerbook 12" (updated in february : G4 1.5 GHz, 80GB, Superdrive...) and I want to install Gentoo.
However, I read on the ubuntu forum that the sound doesn't work on this Laptop :( .

Is it true ?
Is someone has this powerbook and use Gentoo on it ?

Thanks
Back to top
View user's profile Send private message
neon
l33t
l33t


Joined: 04 Aug 2003
Posts: 759
Location: Catania, Italy, Europe

PostPosted: Tue May 03, 2005 9:49 am    Post subject: Re: Sound Problem on the new Powerbook 12" ? Reply with quote

mroy31 wrote:
However, I read on the ubuntu forum that the sound doesn't work on this Laptop :(

Don't trust them... they only don't know how to make it work ;)

mroy31 wrote:
Is someone has this powerbook and use Gentoo on it ?

I own a 12" PB 1.33Ghz and sound works well with alsa using agx's patch ;)

If you don't want to patch the kernel you can play with DRC Rang setting to obtain a clean sound, but i prefer to patch mine...

Code:
diff -u -Naur --exclude=debian linux-2.6.11-rc4.orig/sound/ppc/pmac.c linux-2.6.11-rc4/sound/ppc/pmac.c
--- linux-2.6.11-rc4.orig/sound/ppc/pmac.c   2005-02-15 20:36:30.000000000 +0100
+++ linux-2.6.11-rc4/sound/ppc/pmac.c   2005-02-16 19:07:32.000000000 +0100
@@ -50,8 +50,8 @@
    44100, 29400, 22050, 17640, 14700, 11025, 8820, 7350
 };
 /* fixed frequency table for tumbler */
-static int tumbler_freqs[1] = {
-   44100
+static int tumbler_freqs[2] = {
+   48000, 44100
 };
 
 /*
@@ -489,12 +489,14 @@
    snd_pcm_runtime_t *runtime = subs->runtime;
    int i, j, fflags;
    static int typical_freqs[] = {
+      48000,
       44100,
       22050,
       11025,
       0,
    };
    static int typical_freq_flags[] = {
+      SNDRV_PCM_RATE_48000,
       SNDRV_PCM_RATE_44100,
       SNDRV_PCM_RATE_22050,
       SNDRV_PCM_RATE_11025,
@@ -650,7 +652,7 @@
 
    pcm->private_data = chip;
    pcm->private_free = pmac_pcm_free;
-   pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX;
+   pcm->info_flags = 0;
    strcpy(pcm->name, chip->card->shortname);
    chip->pcm = pcm;
 
diff -u -Naur --exclude=debian linux-2.6.11-rc4.orig/sound/ppc/tumbler.c linux-2.6.11-rc4/sound/ppc/tumbler.c
--- linux-2.6.11-rc4.orig/sound/ppc/tumbler.c   2004-12-24 22:33:49.000000000 +0100
+++ linux-2.6.11-rc4/sound/ppc/tumbler.c   2005-02-16 19:07:32.000000000 +0100
@@ -767,6 +767,12 @@
    DEFINE_MONO("Tone Control - Treble", treble),
    DEFINE_MONO("PCM Playback Volume", pcm),
    { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+     .name = "DRC Switch",
+     .info = snd_pmac_boolean_mono_info,
+     .get = tumbler_get_drc_switch,
+     .put = tumbler_put_drc_switch
+   },
+   { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
      .name = "DRC Range",
      .info = tumbler_info_drc_value,
      .get = tumbler_get_drc_value,
@@ -793,6 +799,12 @@
    DEFINE_SNAPPER_MONO("Tone Control - Bass", bass),
    DEFINE_SNAPPER_MONO("Tone Control - Treble", treble),
    { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+     .name = "DRC Switch",
+     .info = snd_pmac_boolean_mono_info,
+     .get = tumbler_get_drc_switch,
+     .put = tumbler_put_drc_switch
+   },
+   { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
      .name = "DRC Range",
      .info = tumbler_info_drc_value,
      .get = tumbler_get_drc_value,
@@ -822,14 +834,6 @@
    .put = tumbler_put_mute_switch,
    .private_value = TUMBLER_MUTE_AMP,
 };
-static snd_kcontrol_new_t tumbler_drc_sw __initdata = {
-   .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-   .name = "DRC Switch",
-   .info = snd_pmac_boolean_mono_info,
-   .get = tumbler_get_drc_switch,
-   .put = tumbler_put_drc_switch
-};
-
 
 #ifdef PMAC_SUPPORT_AUTOMUTE
 /*
@@ -851,29 +855,6 @@
    }
 }
 
-static struct work_struct device_change;
-
-static void
-device_change_handler(void *self)
-{
-   pmac_t *chip = (pmac_t*) self;
-   pmac_tumbler_t *mix;
-
-   if (!chip)
-      return;
-
-   mix = chip->mixer_data;
-
-   /* first set the DRC so the speaker do not explode -ReneR */
-   if (chip->model == PMAC_TUMBLER)
-      tumbler_set_drc(mix);
-   else
-      snapper_set_drc(mix);
-
-   /* reset the master volume so the correct amplification is applied */
-   tumbler_set_master_volume(mix);
-}
-
 static void tumbler_update_automute(pmac_t *chip, int do_notify)
 {
    if (chip->auto_mute) {
@@ -883,25 +864,14 @@
          /* mute speaker */
          check_mute(chip, &mix->amp_mute, 1, do_notify, chip->speaker_sw_ctl);
          check_mute(chip, &mix->hp_mute, 0, do_notify, chip->master_sw_ctl);
-         mix->drc_enable = 0;
-
       } else {
          /* unmute speaker */
          check_mute(chip, &mix->amp_mute, 0, do_notify, chip->speaker_sw_ctl);
          check_mute(chip, &mix->hp_mute, 1, do_notify, chip->master_sw_ctl);
-         mix->drc_enable = 1;
       }
-      if (do_notify) {
+      if (do_notify)
          snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE,
                    &chip->hp_detect_ctl->id);
-         snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE,
-                        &chip->drc_sw_ctl->id);
-      }
-
-      /* finally we need to schedule an update of the mixer values
-         (master and DRC are enough for now) -ReneR */
-      schedule_work(&device_change);
-
    }
 }
 #endif /* PMAC_SUPPORT_AUTOMUTE */
@@ -1028,7 +998,7 @@
    }
    tumbler_set_master_volume(mix);
    if (chip->update_automute)
-      chip->update_automute(chip, 0);
+      chip->update_automute(chip, 1);
 }
 #endif
 
@@ -1152,17 +1122,11 @@
    chip->speaker_sw_ctl = snd_ctl_new1(&tumbler_speaker_sw, chip);
    if ((err = snd_ctl_add(chip->card, chip->speaker_sw_ctl)) < 0)
       return err;
-   chip->drc_sw_ctl = snd_ctl_new1(&tumbler_drc_sw, chip);
-   if ((err = snd_ctl_add(chip->card, chip->drc_sw_ctl)) < 0)
-      return err;
-
 
 #ifdef CONFIG_PMAC_PBOOK
    chip->resume = tumbler_resume;
 #endif
 
-   INIT_WORK(&device_change, device_change_handler, (void *)chip);
-
 #ifdef PMAC_SUPPORT_AUTOMUTE
    if (mix->headphone_irq >=0 && (err = snd_pmac_add_automute(chip)) < 0)
       return err;

_________________
Io credo che le tecnologie siano moralmente neutrali fino a quando non le utilizziamo - William Gibson

LINEE GUIDA DEL FORUM
Back to top
View user's profile Send private message
frameRATE
Guru
Guru


Joined: 28 Apr 2003
Posts: 386
Location: Orange County California

PostPosted: Tue May 03, 2005 8:37 pm    Post subject: Reply with quote

Hey no making fun of ubuntu people!

They're nice!! ;)
_________________

Linux User | 364705

howto install coldfusion mx 7 under gentoo
Back to top
View user's profile Send private message
neon
l33t
l33t


Joined: 04 Aug 2003
Posts: 759
Location: Catania, Italy, Europe

PostPosted: Wed May 04, 2005 11:06 am    Post subject: Reply with quote

frameRATE wrote:
Hey no making fun of ubuntu people!

They're nice!! ;)

I was obviously joking :P
Their philosophy is a really good thing ;)
_________________
Io credo che le tecnologie siano moralmente neutrali fino a quando non le utilizziamo - William Gibson

LINEE GUIDA DEL FORUM
Back to top
View user's profile Send private message
sktrdie
Apprentice
Apprentice


Joined: 13 Mar 2005
Posts: 153

PostPosted: Fri May 06, 2005 7:33 pm    Post subject: Reply with quote

i wonder if grapchis work, meanning 3d accelration.
Back to top
View user's profile Send private message
frameRATE
Guru
Guru


Joined: 28 Apr 2003
Posts: 386
Location: Orange County California

PostPosted: Fri May 06, 2005 9:26 pm    Post subject: Reply with quote

my iBook sound is REAl quiet. It's not an amixer thing, either..Any suggestions?
_________________

Linux User | 364705

howto install coldfusion mx 7 under gentoo
Back to top
View user's profile Send private message
mroy31
n00b
n00b


Joined: 03 May 2005
Posts: 11

PostPosted: Tue May 10, 2005 7:15 am    Post subject: Reply with quote

Hi

I found the answer.
For the new powerbook, we need a patch of Benjamin Herrenschmidt for the sound. It's here:
http://lists.debian.org/debian-powerpc/2005/04/msg00322.html
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Tue May 10, 2005 7:23 am    Post subject: Reply with quote

This patch should be included in 2.6.12_rc4 as well as other fixes for new powerbooks. It might save you some time hunting down patches and fixes if you use this kernel instead.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
mroy31
n00b
n00b


Joined: 03 May 2005
Posts: 11

PostPosted: Tue May 10, 2005 7:53 am    Post subject: Reply with quote

You're right.

I'll test the 2.6.12rc4 today. I hope the frequency scaling works with it because the performance of my powerbook is not really good for the moment (750 MHz instead 1.5 GHz and when I want to change the frequency with cpufreq-set, the kernel crash).
Back to top
View user's profile Send private message
frameRATE
Guru
Guru


Joined: 28 Apr 2003
Posts: 386
Location: Orange County California

PostPosted: Tue May 10, 2005 2:43 pm    Post subject: Reply with quote

mroy31 wrote:
Hi

I found the answer.
For the new powerbook, we need a patch of Benjamin Herrenschmidt for the sound. It's here:
http://lists.debian.org/debian-powerpc/2005/04/msg00322.html


So is that what I need to fix the weird sound on the 1ghz iBook too?
_________________

Linux User | 364705

howto install coldfusion mx 7 under gentoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum