All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sound working on the macbook pro
@ 2007-02-18 17:06 Rafael Espíndola
       [not found] ` <564d96fb0702180924y32118e7esf81e5ec2514d3af9@mail.gmail.com>
  0 siblings, 1 reply; 13+ messages in thread
From: Rafael Espíndola @ 2007-02-18 17:06 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 658 bytes --]

The problem with the pin config of the macbook pro is that it has no
line outs. Because of this, snd_hda_parse_pin_def_config tries to hack
the speaker into being a line out. This hack makes the subsequent
setup fail.

The attached patch does the followig:
1) install the correct pin config (extracted from macos)
2) removes the hack from snd_hda_parse_pin_def_config
3) stac92xx_parse_auto_config no longuer aborts if line_outs == 0

item 2 might cause some problems for parts of the system that expect
this hack. IMHO, we should try to fix these problems and remove the
hack. It is very confusing to see an Speaker appearing as a line out!

Cheers,
Rafael

[-- Attachment #2: sound.patch --]
[-- Type: text/x-patch, Size: 1824 bytes --]

diff -r c7540f430d45 pci/hda/hda_codec.c
--- a/pci/hda/hda_codec.c	Fri Feb 16 13:27:18 2007 +0100
+++ b/pci/hda/hda_codec.c	Sun Feb 18 16:19:20 2007 +0000
@@ -2179,26 +2179,6 @@ int snd_hda_parse_pin_def_config(struct 
 		   cfg->input_pins[AUTO_PIN_CD],
 		   cfg->input_pins[AUTO_PIN_AUX]);
 
-	/*
-	 * FIX-UP: if no line-outs are detected, try to use speaker or HP pin
-	 * as a primary output
-	 */
-	if (! cfg->line_outs) {
-		if (cfg->speaker_outs) {
-			cfg->line_outs = cfg->speaker_outs;
-			memcpy(cfg->line_out_pins, cfg->speaker_pins,
-			       sizeof(cfg->speaker_pins));
-			cfg->speaker_outs = 0;
-			memset(cfg->speaker_pins, 0, sizeof(cfg->speaker_pins));
-		} else if (cfg->hp_outs) {
-			cfg->line_outs = cfg->hp_outs;
-			memcpy(cfg->line_out_pins, cfg->hp_pins,
-			       sizeof(cfg->hp_pins));
-			cfg->hp_outs = 0;
-			memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins));
-		}
-	}
-
 	return 0;
 }
 
diff -r c7540f430d45 pci/hda/patch_sigmatel.c
--- a/pci/hda/patch_sigmatel.c	Fri Feb 16 13:27:18 2007 +0100
+++ b/pci/hda/patch_sigmatel.c	Sun Feb 18 16:26:17 2007 +0000
@@ -530,9 +530,9 @@ static unsigned int macbook_pin_configs[
 };
 
 static unsigned int macbook_pro_pin_configs[10] = {
-	0x0221401f, 0x90a70120, 0x01813024, 0x01014010,
-	0x400000fd, 0x01016011, 0x1345e240, 0x13c5e22e,
-	0x400000fc, 0x400000fb,
+	0x012b4050, 0x90a00110, 0x90100140, 0x400000f0,
+	0x400000f0, 0x018b3020, 0x014be060, 0x01cbe030,
+	0x400000f0, 0x400000f0,
 };
 
 static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = {
@@ -1401,8 +1401,6 @@ static int stac92xx_parse_auto_config(st
 						&spec->autocfg,
 						spec->dmic_nids)) < 0)
 		return err;
-	if (! spec->autocfg.line_outs)
-		return 0; /* can't find valid pin config */
 
 	if ((err = stac92xx_add_dyn_out_pins(codec, &spec->autocfg)) < 0)
 		return err;

[-- Attachment #3: Type: text/plain, Size: 345 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #4: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-03-13  9:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-18 17:06 [PATCH] sound working on the macbook pro Rafael Espíndola
     [not found] ` <564d96fb0702180924y32118e7esf81e5ec2514d3af9@mail.gmail.com>
2007-02-19 11:52   ` Fwd: " Takashi Iwai
2007-02-20  9:40     ` Rafael Espíndola
2007-02-20 12:05       ` Takashi Iwai
2007-02-20 20:05         ` Rafael Espíndola
2007-02-22 15:46           ` Takashi Iwai
2007-02-22 20:01             ` Rafael Espíndola
2007-02-23 14:32               ` Takashi Iwai
     [not found]                 ` <564d96fb0702262134t438dd480t45c83e556f315e2e@mail.gmail.com>
2007-03-07 23:01                   ` Takashi Iwai
2007-03-10  5:57                     ` Rafael Espíndola
2007-03-12 15:00                       ` Takashi Iwai
2007-03-13  7:14                         ` Rafael Espíndola
2007-03-13  9:41                           ` Takashi Iwai

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.