From 3fc24d850708b8dfd3472b25eac0c32dd7708925 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 16 Feb 2007 13:27:18 +0100 Subject: [ALSA] hda-codec - Define pin configs for MacBooks Define pin configs for MacBook and MacBook Pro with STAC92xx codecs. The latter is detected automatically by checking codec SSID now. Also, fixed the documentation regarding available modeliof sigmatel codec chips. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- Documentation/sound/alsa/ALSA-Configuration.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index c30ff1bb2d10..e127751d17c2 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -895,10 +895,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. can be adjusted. Appearing only when compiled with $CONFIG_SND_DEBUG=y - STAC9200/9205/9220/9221/9254 + STAC9200/9205/9254 + ref Reference board + + STAC9220/9221 ref Reference board 3stack D945 3stack 5stack D945 5stack + SPDIF + macmini Intel Mac Mini + macbook Intel Mac Book + macbook-pro Intel Mac Book Pro STAC9202/9250/9251 ref Reference board, base config -- cgit v1.2.3 From 2f24d159d5ac418c946e0d38ada46345753688b1 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 15 Feb 2007 18:56:43 +0100 Subject: [ALSA] cmipci - Allow to disable integrated FM port The driver didn't allow to disable the integrated FM port (if available), and this annoyed people who don't want FM port. Now fm_port=0 disables the FM port unconditionally. fm_port=1 is used for enabling the integrated FM port (as default). Also fixed the documentation about this option. Fix ALSA bug#2491. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- Documentation/sound/alsa/ALSA-Configuration.txt | 4 +++- sound/pci/cmipci.c | 18 +++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'Documentation') diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index e127751d17c2..db398a6441c1 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -370,7 +370,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. mpu_port - 0x300,0x310,0x320,0x330 = legacy port, 1 = integrated PCI port, 0 = disable (default) - fm_port - 0x388 (default), 0 = disable (default) + fm_port - 0x388 = legacy port, + 1 = integrated PCI port (default), + 0 = disable soft_ac3 - Software-conversion of raw SPDIF packets (model 033 only) (default = 1) joystick_port - Joystick port address (0 = disable, 1 = auto-detect) diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 70face7e1048..7d3c5ee0005c 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c @@ -57,7 +57,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable switches */ static long mpu_port[SNDRV_CARDS]; -static long fm_port[SNDRV_CARDS]; +static long fm_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)]=1}; static int soft_ac3[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)]=1}; #ifdef SUPPORT_JOYSTICK static int joystick_port[SNDRV_CARDS]; @@ -2779,6 +2779,9 @@ static int __devinit snd_cmipci_create_fm(struct cmipci *cm, long fm_port) struct snd_opl3 *opl3; int err; + if (!fm_port) + goto disable_fm; + /* first try FM regs in PCI port range */ iosynth = cm->iobase + CM_REG_FM_PCI; err = snd_opl3_create(cm->card, iosynth, iosynth + 2, @@ -2793,7 +2796,7 @@ static int __devinit snd_cmipci_create_fm(struct cmipci *cm, long fm_port) case 0x3C8: val |= CM_FMSEL_3C8; break; case 0x388: val |= CM_FMSEL_388; break; default: - return 0; + goto disable_fm; } snd_cmipci_write(cm, CM_REG_LEGACY_CTRL, val); /* enable FM */ @@ -2803,11 +2806,7 @@ static int __devinit snd_cmipci_create_fm(struct cmipci *cm, long fm_port) OPL3_HW_OPL3, 0, &opl3) < 0) { printk(KERN_ERR "cmipci: no OPL device at %#lx, " "skipping...\n", iosynth); - /* disable FM */ - snd_cmipci_write(cm, CM_REG_LEGACY_CTRL, - val & ~CM_FMSEL_MASK); - snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_FM_EN); - return 0; + goto disable_fm; } } if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) { @@ -2815,6 +2814,11 @@ static int __devinit snd_cmipci_create_fm(struct cmipci *cm, long fm_port) return err; } return 0; + + disable_fm: + snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_FMSEL_MASK); + snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_FM_EN); + return 0; } static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pci, -- cgit v1.2.3