diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-23 13:01:20 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-23 13:01:20 -0500 |
| commit | 6f40334694dce047d43c6f2cce255b596da6de50 (patch) | |
| tree | bc68ea85f04d4319fd781d6f5e14bb03c41dd52a | |
| parent | 9c717de946ed7f5782e6dffacf2d05859073058c (diff) | |
| parent | 54a26089a2733df2765342acaaf71466d37ff5a5 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - Add STAC9205 PCI_QUIRK for Dell Vostro 1700
ASoC: Do not write to invalid registers on the wm9712.
ALSA: hda - Set mixer name after codec patch
ASoC: add missing parameter to mx27vis_hifi_hw_free()
ASoC: sh: FSI:: don't check platform_get_irq's return value against zero
ALSA: sound/core/pcm_timer.c: use lib/gcd.c
ALSA: hda - Add MSI blacklist
ALSA: hda - Add support for the new 27 inch IMacs
ALSA: hda - Fix NULL dereference with enable_beep=0 option
| -rw-r--r-- | Documentation/sound/alsa/HD-Audio-Models.txt | 1 | ||||
| -rw-r--r-- | sound/core/Kconfig | 1 | ||||
| -rw-r--r-- | sound/core/pcm_timer.c | 17 | ||||
| -rw-r--r-- | sound/pci/hda/hda_codec.c | 10 | ||||
| -rw-r--r-- | sound/pci/hda/hda_intel.c | 1 | ||||
| -rw-r--r-- | sound/pci/hda/patch_cirrus.c | 22 | ||||
| -rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 22 | ||||
| -rw-r--r-- | sound/soc/codecs/wm9712.c | 3 | ||||
| -rw-r--r-- | sound/soc/imx/mx27vis_wm8974.c | 3 | ||||
| -rw-r--r-- | sound/soc/sh/fsi.c | 2 |
10 files changed, 48 insertions, 34 deletions
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index e93affff3af8..e72cee9e2a71 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
| @@ -403,4 +403,5 @@ STAC9872 | |||
| 403 | Cirrus Logic CS4206/4207 | 403 | Cirrus Logic CS4206/4207 |
| 404 | ======================== | 404 | ======================== |
| 405 | mbp55 MacBook Pro 5,5 | 405 | mbp55 MacBook Pro 5,5 |
| 406 | imac27 IMac 27 Inch | ||
| 406 | auto BIOS setup (default) | 407 | auto BIOS setup (default) |
diff --git a/sound/core/Kconfig b/sound/core/Kconfig index c15682a2f9db..475455c76610 100644 --- a/sound/core/Kconfig +++ b/sound/core/Kconfig | |||
| @@ -5,6 +5,7 @@ config SND_TIMER | |||
| 5 | config SND_PCM | 5 | config SND_PCM |
| 6 | tristate | 6 | tristate |
| 7 | select SND_TIMER | 7 | select SND_TIMER |
| 8 | select GCD | ||
| 8 | 9 | ||
| 9 | config SND_HWDEP | 10 | config SND_HWDEP |
| 10 | tristate | 11 | tristate |
diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c index ca8068b63d6c..b01d9481d632 100644 --- a/sound/core/pcm_timer.c +++ b/sound/core/pcm_timer.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #include <linux/time.h> | 22 | #include <linux/time.h> |
| 23 | #include <linux/gcd.h> | ||
| 23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
| 24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
| 25 | #include <sound/timer.h> | 26 | #include <sound/timer.h> |
| @@ -28,22 +29,6 @@ | |||
| 28 | * Timer functions | 29 | * Timer functions |
| 29 | */ | 30 | */ |
| 30 | 31 | ||
| 31 | /* Greatest common divisor */ | ||
| 32 | static unsigned long gcd(unsigned long a, unsigned long b) | ||
| 33 | { | ||
| 34 | unsigned long r; | ||
| 35 | if (a < b) { | ||
| 36 | r = a; | ||
| 37 | a = b; | ||
| 38 | b = r; | ||
| 39 | } | ||
| 40 | while ((r = a % b) != 0) { | ||
| 41 | a = b; | ||
| 42 | b = r; | ||
| 43 | } | ||
| 44 | return b; | ||
| 45 | } | ||
| 46 | |||
| 47 | void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) | 32 | void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) |
| 48 | { | 33 | { |
| 49 | unsigned long rate, mult, fsize, l, post; | 34 | unsigned long rate, mult, fsize, l, post; |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 9cfdb771928c..950ee5cfcacf 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
| @@ -1086,11 +1086,6 @@ int snd_hda_codec_configure(struct hda_codec *codec) | |||
| 1086 | if (err < 0) | 1086 | if (err < 0) |
| 1087 | return err; | 1087 | return err; |
| 1088 | } | 1088 | } |
| 1089 | /* audio codec should override the mixer name */ | ||
| 1090 | if (codec->afg || !*codec->bus->card->mixername) | ||
| 1091 | snprintf(codec->bus->card->mixername, | ||
| 1092 | sizeof(codec->bus->card->mixername), | ||
| 1093 | "%s %s", codec->vendor_name, codec->chip_name); | ||
| 1094 | 1089 | ||
| 1095 | if (is_generic_config(codec)) { | 1090 | if (is_generic_config(codec)) { |
| 1096 | err = snd_hda_parse_generic_codec(codec); | 1091 | err = snd_hda_parse_generic_codec(codec); |
| @@ -1109,6 +1104,11 @@ int snd_hda_codec_configure(struct hda_codec *codec) | |||
| 1109 | patched: | 1104 | patched: |
| 1110 | if (!err && codec->patch_ops.unsol_event) | 1105 | if (!err && codec->patch_ops.unsol_event) |
| 1111 | err = init_unsol_queue(codec->bus); | 1106 | err = init_unsol_queue(codec->bus); |
| 1107 | /* audio codec should override the mixer name */ | ||
| 1108 | if (!err && (codec->afg || !*codec->bus->card->mixername)) | ||
| 1109 | snprintf(codec->bus->card->mixername, | ||
| 1110 | sizeof(codec->bus->card->mixername), | ||
| 1111 | "%s %s", codec->vendor_name, codec->chip_name); | ||
| 1112 | return err; | 1112 | return err; |
| 1113 | } | 1113 | } |
| 1114 | EXPORT_SYMBOL_HDA(snd_hda_codec_configure); | 1114 | EXPORT_SYMBOL_HDA(snd_hda_codec_configure); |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 9b56f937913e..ff8ad46cc50e 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
| @@ -2322,6 +2322,7 @@ static void __devinit check_probe_mask(struct azx *chip, int dev) | |||
| 2322 | * white/black-list for enable_msi | 2322 | * white/black-list for enable_msi |
| 2323 | */ | 2323 | */ |
| 2324 | static struct snd_pci_quirk msi_black_list[] __devinitdata = { | 2324 | static struct snd_pci_quirk msi_black_list[] __devinitdata = { |
| 2325 | SND_PCI_QUIRK(0x1043, 0x81f2, "ASUS", 0), /* Athlon64 X2 + nvidia */ | ||
| 2325 | {} | 2326 | {} |
| 2326 | }; | 2327 | }; |
| 2327 | 2328 | ||
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 4b200da1bd18..fe0423c39598 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
| @@ -66,6 +66,7 @@ struct cs_spec { | |||
| 66 | /* available models */ | 66 | /* available models */ |
| 67 | enum { | 67 | enum { |
| 68 | CS420X_MBP55, | 68 | CS420X_MBP55, |
| 69 | CS420X_IMAC27, | ||
| 69 | CS420X_AUTO, | 70 | CS420X_AUTO, |
| 70 | CS420X_MODELS | 71 | CS420X_MODELS |
| 71 | }; | 72 | }; |
| @@ -827,7 +828,8 @@ static void cs_automute(struct hda_codec *codec) | |||
| 827 | AC_VERB_SET_PIN_WIDGET_CONTROL, | 828 | AC_VERB_SET_PIN_WIDGET_CONTROL, |
| 828 | hp_present ? 0 : PIN_OUT); | 829 | hp_present ? 0 : PIN_OUT); |
| 829 | } | 830 | } |
| 830 | if (spec->board_config == CS420X_MBP55) { | 831 | if (spec->board_config == CS420X_MBP55 || |
| 832 | spec->board_config == CS420X_IMAC27) { | ||
| 831 | unsigned int gpio = hp_present ? 0x02 : 0x08; | 833 | unsigned int gpio = hp_present ? 0x02 : 0x08; |
| 832 | snd_hda_codec_write(codec, 0x01, 0, | 834 | snd_hda_codec_write(codec, 0x01, 0, |
| 833 | AC_VERB_SET_GPIO_DATA, gpio); | 835 | AC_VERB_SET_GPIO_DATA, gpio); |
| @@ -1069,12 +1071,14 @@ static int cs_parse_auto_config(struct hda_codec *codec) | |||
| 1069 | 1071 | ||
| 1070 | static const char *cs420x_models[CS420X_MODELS] = { | 1072 | static const char *cs420x_models[CS420X_MODELS] = { |
| 1071 | [CS420X_MBP55] = "mbp55", | 1073 | [CS420X_MBP55] = "mbp55", |
| 1074 | [CS420X_IMAC27] = "imac27", | ||
| 1072 | [CS420X_AUTO] = "auto", | 1075 | [CS420X_AUTO] = "auto", |
| 1073 | }; | 1076 | }; |
| 1074 | 1077 | ||
| 1075 | 1078 | ||
| 1076 | static struct snd_pci_quirk cs420x_cfg_tbl[] = { | 1079 | static struct snd_pci_quirk cs420x_cfg_tbl[] = { |
| 1077 | SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), | 1080 | SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), |
| 1081 | SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27), | ||
| 1078 | {} /* terminator */ | 1082 | {} /* terminator */ |
| 1079 | }; | 1083 | }; |
| 1080 | 1084 | ||
| @@ -1097,8 +1101,23 @@ static struct cs_pincfg mbp55_pincfgs[] = { | |||
| 1097 | {} /* terminator */ | 1101 | {} /* terminator */ |
| 1098 | }; | 1102 | }; |
| 1099 | 1103 | ||
| 1104 | static struct cs_pincfg imac27_pincfgs[] = { | ||
| 1105 | { 0x09, 0x012b4050 }, | ||
| 1106 | { 0x0a, 0x90100140 }, | ||
| 1107 | { 0x0b, 0x90100142 }, | ||
| 1108 | { 0x0c, 0x018b3020 }, | ||
| 1109 | { 0x0d, 0x90a00110 }, | ||
| 1110 | { 0x0e, 0x400000f0 }, | ||
| 1111 | { 0x0f, 0x01cbe030 }, | ||
| 1112 | { 0x10, 0x014be060 }, | ||
| 1113 | { 0x12, 0x01ab9070 }, | ||
| 1114 | { 0x15, 0x400000f0 }, | ||
| 1115 | {} /* terminator */ | ||
| 1116 | }; | ||
| 1117 | |||
| 1100 | static struct cs_pincfg *cs_pincfgs[CS420X_MODELS] = { | 1118 | static struct cs_pincfg *cs_pincfgs[CS420X_MODELS] = { |
| 1101 | [CS420X_MBP55] = mbp55_pincfgs, | 1119 | [CS420X_MBP55] = mbp55_pincfgs, |
| 1120 | [CS420X_IMAC27] = imac27_pincfgs, | ||
| 1102 | }; | 1121 | }; |
| 1103 | 1122 | ||
| 1104 | static void fix_pincfg(struct hda_codec *codec, int model) | 1123 | static void fix_pincfg(struct hda_codec *codec, int model) |
| @@ -1128,6 +1147,7 @@ static int patch_cs420x(struct hda_codec *codec) | |||
| 1128 | fix_pincfg(codec, spec->board_config); | 1147 | fix_pincfg(codec, spec->board_config); |
| 1129 | 1148 | ||
| 1130 | switch (spec->board_config) { | 1149 | switch (spec->board_config) { |
| 1150 | case CS420X_IMAC27: | ||
| 1131 | case CS420X_MBP55: | 1151 | case CS420X_MBP55: |
| 1132 | /* GPIO1 = headphones */ | 1152 | /* GPIO1 = headphones */ |
| 1133 | /* GPIO3 = speakers */ | 1153 | /* GPIO3 = speakers */ |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 3d59f8325848..eeda7beeb57a 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
| @@ -2104,6 +2104,7 @@ static unsigned int ref9205_pin_configs[12] = { | |||
| 2104 | 10280204 | 2104 | 10280204 |
| 2105 | 1028021F | 2105 | 1028021F |
| 2106 | 10280228 (Dell Vostro 1500) | 2106 | 10280228 (Dell Vostro 1500) |
| 2107 | 10280229 (Dell Vostro 1700) | ||
| 2107 | */ | 2108 | */ |
| 2108 | static unsigned int dell_9205_m42_pin_configs[12] = { | 2109 | static unsigned int dell_9205_m42_pin_configs[12] = { |
| 2109 | 0x0321101F, 0x03A11020, 0x400003FA, 0x90170310, | 2110 | 0x0321101F, 0x03A11020, 0x400003FA, 0x90170310, |
| @@ -2189,6 +2190,8 @@ static struct snd_pci_quirk stac9205_cfg_tbl[] = { | |||
| 2189 | "Dell Inspiron", STAC_9205_DELL_M44), | 2190 | "Dell Inspiron", STAC_9205_DELL_M44), |
| 2190 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228, | 2191 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228, |
| 2191 | "Dell Vostro 1500", STAC_9205_DELL_M42), | 2192 | "Dell Vostro 1500", STAC_9205_DELL_M42), |
| 2193 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0229, | ||
| 2194 | "Dell Vostro 1700", STAC_9205_DELL_M42), | ||
| 2192 | /* Gateway */ | 2195 | /* Gateway */ |
| 2193 | SND_PCI_QUIRK(0x107b, 0x0560, "Gateway T6834c", STAC_9205_EAPD), | 2196 | SND_PCI_QUIRK(0x107b, 0x0560, "Gateway T6834c", STAC_9205_EAPD), |
| 2194 | SND_PCI_QUIRK(0x107b, 0x0565, "Gateway T1616", STAC_9205_EAPD), | 2197 | SND_PCI_QUIRK(0x107b, 0x0565, "Gateway T1616", STAC_9205_EAPD), |
| @@ -3779,15 +3782,16 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out | |||
| 3779 | err = snd_hda_attach_beep_device(codec, nid); | 3782 | err = snd_hda_attach_beep_device(codec, nid); |
| 3780 | if (err < 0) | 3783 | if (err < 0) |
| 3781 | return err; | 3784 | return err; |
| 3782 | /* IDT/STAC codecs have linear beep tone parameter */ | 3785 | if (codec->beep) { |
| 3783 | codec->beep->linear_tone = 1; | 3786 | /* IDT/STAC codecs have linear beep tone parameter */ |
| 3784 | /* if no beep switch is available, make its own one */ | 3787 | codec->beep->linear_tone = 1; |
| 3785 | caps = query_amp_caps(codec, nid, HDA_OUTPUT); | 3788 | /* if no beep switch is available, make its own one */ |
| 3786 | if (codec->beep && | 3789 | caps = query_amp_caps(codec, nid, HDA_OUTPUT); |
| 3787 | !((caps & AC_AMPCAP_MUTE) >> AC_AMPCAP_MUTE_SHIFT)) { | 3790 | if (!(caps & AC_AMPCAP_MUTE)) { |
| 3788 | err = stac92xx_beep_switch_ctl(codec); | 3791 | err = stac92xx_beep_switch_ctl(codec); |
| 3789 | if (err < 0) | 3792 | if (err < 0) |
| 3790 | return err; | 3793 | return err; |
| 3794 | } | ||
| 3791 | } | 3795 | } |
| 3792 | } | 3796 | } |
| 3793 | #endif | 3797 | #endif |
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 0ac1215dcd9b..e237bf615129 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c | |||
| @@ -463,7 +463,8 @@ static int ac97_write(struct snd_soc_codec *codec, unsigned int reg, | |||
| 463 | { | 463 | { |
| 464 | u16 *cache = codec->reg_cache; | 464 | u16 *cache = codec->reg_cache; |
| 465 | 465 | ||
| 466 | soc_ac97_ops.write(codec->ac97, reg, val); | 466 | if (reg < 0x7c) |
| 467 | soc_ac97_ops.write(codec->ac97, reg, val); | ||
| 467 | reg = reg >> 1; | 468 | reg = reg >> 1; |
| 468 | if (reg < (ARRAY_SIZE(wm9712_reg))) | 469 | if (reg < (ARRAY_SIZE(wm9712_reg))) |
| 469 | cache[reg] = val; | 470 | cache[reg] = val; |
diff --git a/sound/soc/imx/mx27vis_wm8974.c b/sound/soc/imx/mx27vis_wm8974.c index 0267d2d91685..07d2a248438c 100644 --- a/sound/soc/imx/mx27vis_wm8974.c +++ b/sound/soc/imx/mx27vis_wm8974.c | |||
| @@ -180,7 +180,8 @@ static int mx27vis_hifi_hw_free(struct snd_pcm_substream *substream) | |||
| 180 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 180 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; |
| 181 | 181 | ||
| 182 | /* disable the PLL */ | 182 | /* disable the PLL */ |
| 183 | return codec_dai->ops->set_pll(codec_dai, IGNORED_ARG, 0, 0); | 183 | return codec_dai->ops->set_pll(codec_dai, IGNORED_ARG, IGNORED_ARG, |
| 184 | 0, 0); | ||
| 184 | } | 185 | } |
| 185 | 186 | ||
| 186 | /* | 187 | /* |
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 9c49c11c43ce..42813b808389 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
| @@ -876,7 +876,7 @@ static int fsi_probe(struct platform_device *pdev) | |||
| 876 | 876 | ||
| 877 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 877 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 878 | irq = platform_get_irq(pdev, 0); | 878 | irq = platform_get_irq(pdev, 0); |
| 879 | if (!res || !irq) { | 879 | if (!res || (int)irq <= 0) { |
| 880 | dev_err(&pdev->dev, "Not enough FSI platform resources.\n"); | 880 | dev_err(&pdev->dev, "Not enough FSI platform resources.\n"); |
| 881 | ret = -ENODEV; | 881 | ret = -ENODEV; |
| 882 | goto exit; | 882 | goto exit; |
