[PATCH] sound working on the macbook pro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
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;
-------------------------------------------------------------------------
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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux