burgundy.c (0ada0a73120c28cc432bcdbac061781465c2f48f) | burgundy.c (71a157e8edca55198e808f8561dd49017a54ee34) |
---|---|
1/* 2 * PMac Burgundy lowlevel functions 3 * 4 * Copyright (c) by Takashi Iwai <tiwai@suse.de> 5 * code based on dmasound.c. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 568 unchanged lines hidden (view full) --- 577static int snd_pmac_burgundy_detect_headphone(struct snd_pmac *chip) 578{ 579 return (in_le32(&chip->awacs->codec_stat) & chip->hp_stat_mask) ? 1 : 0; 580} 581 582static void snd_pmac_burgundy_update_automute(struct snd_pmac *chip, int do_notify) 583{ 584 if (chip->auto_mute) { | 1/* 2 * PMac Burgundy lowlevel functions 3 * 4 * Copyright (c) by Takashi Iwai <tiwai@suse.de> 5 * code based on dmasound.c. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 568 unchanged lines hidden (view full) --- 577static int snd_pmac_burgundy_detect_headphone(struct snd_pmac *chip) 578{ 579 return (in_le32(&chip->awacs->codec_stat) & chip->hp_stat_mask) ? 1 : 0; 580} 581 582static void snd_pmac_burgundy_update_automute(struct snd_pmac *chip, int do_notify) 583{ 584 if (chip->auto_mute) { |
585 int imac = machine_is_compatible("iMac"); | 585 int imac = of_machine_is_compatible("iMac"); |
586 int reg, oreg; 587 reg = oreg = snd_pmac_burgundy_rcb(chip, 588 MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES); 589 reg &= imac ? ~(BURGUNDY_OUTPUT_LEFT | BURGUNDY_OUTPUT_RIGHT 590 | BURGUNDY_HP_LEFT | BURGUNDY_HP_RIGHT) 591 : ~(BURGUNDY_OUTPUT_LEFT | BURGUNDY_OUTPUT_RIGHT 592 | BURGUNDY_OUTPUT_INTERN); 593 if (snd_pmac_burgundy_detect_headphone(chip)) --- 21 unchanged lines hidden (view full) --- 615#endif /* PMAC_SUPPORT_AUTOMUTE */ 616 617 618/* 619 * initialize burgundy 620 */ 621int __devinit snd_pmac_burgundy_init(struct snd_pmac *chip) 622{ | 586 int reg, oreg; 587 reg = oreg = snd_pmac_burgundy_rcb(chip, 588 MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES); 589 reg &= imac ? ~(BURGUNDY_OUTPUT_LEFT | BURGUNDY_OUTPUT_RIGHT 590 | BURGUNDY_HP_LEFT | BURGUNDY_HP_RIGHT) 591 : ~(BURGUNDY_OUTPUT_LEFT | BURGUNDY_OUTPUT_RIGHT 592 | BURGUNDY_OUTPUT_INTERN); 593 if (snd_pmac_burgundy_detect_headphone(chip)) --- 21 unchanged lines hidden (view full) --- 615#endif /* PMAC_SUPPORT_AUTOMUTE */ 616 617 618/* 619 * initialize burgundy 620 */ 621int __devinit snd_pmac_burgundy_init(struct snd_pmac *chip) 622{ |
623 int imac = machine_is_compatible("iMac"); | 623 int imac = of_machine_is_compatible("iMac"); |
624 int i, err; 625 626 /* Checks to see the chip is alive and kicking */ 627 if ((in_le32(&chip->awacs->codec_ctrl) & MASK_ERRCODE) == 0xf0000) { 628 printk(KERN_WARNING "pmac burgundy: disabled by MacOS :-(\n"); 629 return 1; 630 } 631 --- 102 unchanged lines hidden --- | 624 int i, err; 625 626 /* Checks to see the chip is alive and kicking */ 627 if ((in_le32(&chip->awacs->codec_ctrl) & MASK_ERRCODE) == 0xf0000) { 628 printk(KERN_WARNING "pmac burgundy: disabled by MacOS :-(\n"); 629 return 1; 630 } 631 --- 102 unchanged lines hidden --- |