aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/oss/kahlua.c2
-rw-r--r--sound/pci/ad1889.c2
-rw-r--r--sound/pci/atiixp.c2
-rw-r--r--sound/pci/atiixp_modem.c2
-rw-r--r--sound/pci/au88x0/au88x0.c3
-rw-r--r--sound/pci/bt87x.c3
-rw-r--r--sound/pci/cs4281.c4
-rw-r--r--sound/pci/cs5530.c4
-rw-r--r--sound/pci/hda/hda_intel.c2
-rw-r--r--sound/pci/hda/patch_realtek.c77
-rw-r--r--sound/pci/mixart/mixart.c3
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.c34
-rw-r--r--sound/sound_core.c2
13 files changed, 112 insertions, 28 deletions
diff --git a/sound/oss/kahlua.c b/sound/oss/kahlua.c
index eb9bc365530d..c180598f1710 100644
--- a/sound/oss/kahlua.c
+++ b/sound/oss/kahlua.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Initialisation code for Cyrix/NatSemi VSA1 softaudio 2 * Initialisation code for Cyrix/NatSemi VSA1 softaudio
3 * 3 *
4 * (C) Copyright 2003 Red Hat Inc <alan@redhat.com> 4 * (C) Copyright 2003 Red Hat Inc <alan@lxorguk.ukuu.org.uk>
5 * 5 *
6 * XpressAudio(tm) is used on the Cyrix MediaGX (now NatSemi Geode) systems. 6 * XpressAudio(tm) is used on the Cyrix MediaGX (now NatSemi Geode) systems.
7 * The older version (VSA1) provides fairly good soundblaster emulation 7 * The older version (VSA1) provides fairly good soundblaster emulation
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c
index 92f3a976ef2e..a7f38e63303f 100644
--- a/sound/pci/ad1889.c
+++ b/sound/pci/ad1889.c
@@ -932,7 +932,7 @@ snd_ad1889_create(struct snd_card *card,
932 goto free_and_ret; 932 goto free_and_ret;
933 933
934 chip->bar = pci_resource_start(pci, 0); 934 chip->bar = pci_resource_start(pci, 0);
935 chip->iobase = ioremap_nocache(chip->bar, pci_resource_len(pci, 0)); 935 chip->iobase = pci_ioremap_bar(pci, 0);
936 if (chip->iobase == NULL) { 936 if (chip->iobase == NULL) {
937 printk(KERN_ERR PFX "unable to reserve region.\n"); 937 printk(KERN_ERR PFX "unable to reserve region.\n");
938 err = -EBUSY; 938 err = -EBUSY;
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index 085a52b8c807..226fe8237d31 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -1609,7 +1609,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card,
1609 return err; 1609 return err;
1610 } 1610 }
1611 chip->addr = pci_resource_start(pci, 0); 1611 chip->addr = pci_resource_start(pci, 0);
1612 chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci, 0)); 1612 chip->remap_addr = pci_ioremap_bar(pci, 0);
1613 if (chip->remap_addr == NULL) { 1613 if (chip->remap_addr == NULL) {
1614 snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); 1614 snd_printk(KERN_ERR "AC'97 space ioremap problem\n");
1615 snd_atiixp_free(chip); 1615 snd_atiixp_free(chip);
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index 2f106306c7fe..0e6e5cc1c501 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -1252,7 +1252,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card,
1252 return err; 1252 return err;
1253 } 1253 }
1254 chip->addr = pci_resource_start(pci, 0); 1254 chip->addr = pci_resource_start(pci, 0);
1255 chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci, 0)); 1255 chip->remap_addr = pci_ioremap_bar(pci, 0);
1256 if (chip->remap_addr == NULL) { 1256 if (chip->remap_addr == NULL) {
1257 snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); 1257 snd_printk(KERN_ERR "AC'97 space ioremap problem\n");
1258 snd_atiixp_free(chip); 1258 snd_atiixp_free(chip);
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c
index 68368e490074..a36d4d1fd419 100644
--- a/sound/pci/au88x0/au88x0.c
+++ b/sound/pci/au88x0/au88x0.c
@@ -180,8 +180,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
180 if ((err = pci_request_regions(pci, CARD_NAME_SHORT)) != 0) 180 if ((err = pci_request_regions(pci, CARD_NAME_SHORT)) != 0)
181 goto regions_out; 181 goto regions_out;
182 182
183 chip->mmio = ioremap_nocache(pci_resource_start(pci, 0), 183 chip->mmio = pci_ioremap_bar(pci, 0);
184 pci_resource_len(pci, 0));
185 if (!chip->mmio) { 184 if (!chip->mmio) {
186 printk(KERN_ERR "MMIO area remap failed.\n"); 185 printk(KERN_ERR "MMIO area remap failed.\n");
187 err = -ENOMEM; 186 err = -ENOMEM;
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index 3aa8d973540a..1aa1c0402540 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -749,8 +749,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card,
749 pci_disable_device(pci); 749 pci_disable_device(pci);
750 return err; 750 return err;
751 } 751 }
752 chip->mmio = ioremap_nocache(pci_resource_start(pci, 0), 752 chip->mmio = pci_ioremap_bar(pci, 0);
753 pci_resource_len(pci, 0));
754 if (!chip->mmio) { 753 if (!chip->mmio) {
755 snd_printk(KERN_ERR "cannot remap io memory\n"); 754 snd_printk(KERN_ERR "cannot remap io memory\n");
756 err = -ENOMEM; 755 err = -ENOMEM;
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c
index ef9308f7c45b..192e7842e181 100644
--- a/sound/pci/cs4281.c
+++ b/sound/pci/cs4281.c
@@ -1382,8 +1382,8 @@ static int __devinit snd_cs4281_create(struct snd_card *card,
1382 chip->ba0_addr = pci_resource_start(pci, 0); 1382 chip->ba0_addr = pci_resource_start(pci, 0);
1383 chip->ba1_addr = pci_resource_start(pci, 1); 1383 chip->ba1_addr = pci_resource_start(pci, 1);
1384 1384
1385 chip->ba0 = ioremap_nocache(chip->ba0_addr, pci_resource_len(pci, 0)); 1385 chip->ba0 = pci_ioremap_bar(pci, 0);
1386 chip->ba1 = ioremap_nocache(chip->ba1_addr, pci_resource_len(pci, 1)); 1386 chip->ba1 = pci_ioremap_bar(pci, 1);
1387 if (!chip->ba0 || !chip->ba1) { 1387 if (!chip->ba0 || !chip->ba1) {
1388 snd_cs4281_free(chip); 1388 snd_cs4281_free(chip);
1389 return -ENOMEM; 1389 return -ENOMEM;
diff --git a/sound/pci/cs5530.c b/sound/pci/cs5530.c
index 7ff8b68e997e..6dea5b5cc774 100644
--- a/sound/pci/cs5530.c
+++ b/sound/pci/cs5530.c
@@ -2,7 +2,7 @@
2 * cs5530.c - Initialisation code for Cyrix/NatSemi VSA1 softaudio 2 * cs5530.c - Initialisation code for Cyrix/NatSemi VSA1 softaudio
3 * 3 *
4 * (C) Copyright 2007 Ash Willis <ashwillis@programmer.net> 4 * (C) Copyright 2007 Ash Willis <ashwillis@programmer.net>
5 * (C) Copyright 2003 Red Hat Inc <alan@redhat.com> 5 * (C) Copyright 2003 Red Hat Inc <alan@lxorguk.ukuu.org.uk>
6 * 6 *
7 * This driver was ported (shamelessly ripped ;) from oss/kahlua.c but I did 7 * This driver was ported (shamelessly ripped ;) from oss/kahlua.c but I did
8 * mess with it a bit. The chip seems to have to have trouble with full duplex 8 * mess with it a bit. The chip seems to have to have trouble with full duplex
@@ -132,7 +132,7 @@ static int __devinit snd_cs5530_create(struct snd_card *card,
132 } 132 }
133 chip->pci_base = pci_resource_start(pci, 0); 133 chip->pci_base = pci_resource_start(pci, 0);
134 134
135 mem = ioremap_nocache(chip->pci_base, pci_resource_len(pci, 0)); 135 mem = pci_ioremap_bar(pci, 0);
136 if (mem == NULL) { 136 if (mem == NULL) {
137 kfree(chip); 137 kfree(chip);
138 pci_disable_device(pci); 138 pci_disable_device(pci);
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 9f316c1b2790..f080f8ce0ecb 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2158,7 +2158,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
2158 } 2158 }
2159 2159
2160 chip->addr = pci_resource_start(pci, 0); 2160 chip->addr = pci_resource_start(pci, 0);
2161 chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci,0)); 2161 chip->remap_addr = pci_ioremap_bar(pci, 0);
2162 if (chip->remap_addr == NULL) { 2162 if (chip->remap_addr == NULL) {
2163 snd_printk(KERN_ERR SFX "ioremap error\n"); 2163 snd_printk(KERN_ERR SFX "ioremap error\n");
2164 err = -ENXIO; 2164 err = -ENXIO;
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index ef4955c73c88..4eceab9bd109 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -307,6 +307,13 @@ struct alc_spec {
307 /* for PLL fix */ 307 /* for PLL fix */
308 hda_nid_t pll_nid; 308 hda_nid_t pll_nid;
309 unsigned int pll_coef_idx, pll_coef_bit; 309 unsigned int pll_coef_idx, pll_coef_bit;
310
311#ifdef SND_HDA_NEEDS_RESUME
312#define ALC_MAX_PINS 16
313 unsigned int num_pins;
314 hda_nid_t pin_nids[ALC_MAX_PINS];
315 unsigned int pin_cfgs[ALC_MAX_PINS];
316#endif
310}; 317};
311 318
312/* 319/*
@@ -2778,6 +2785,64 @@ static void alc_free(struct hda_codec *codec)
2778 codec->spec = NULL; /* to be sure */ 2785 codec->spec = NULL; /* to be sure */
2779} 2786}
2780 2787
2788#ifdef SND_HDA_NEEDS_RESUME
2789static void store_pin_configs(struct hda_codec *codec)
2790{
2791 struct alc_spec *spec = codec->spec;
2792 hda_nid_t nid, end_nid;
2793
2794 end_nid = codec->start_nid + codec->num_nodes;
2795 for (nid = codec->start_nid; nid < end_nid; nid++) {
2796 unsigned int wid_caps = get_wcaps(codec, nid);
2797 unsigned int wid_type =
2798 (wid_caps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
2799 if (wid_type != AC_WID_PIN)
2800 continue;
2801 if (spec->num_pins >= ARRAY_SIZE(spec->pin_nids))
2802 break;
2803 spec->pin_nids[spec->num_pins] = nid;
2804 spec->pin_cfgs[spec->num_pins] =
2805 snd_hda_codec_read(codec, nid, 0,
2806 AC_VERB_GET_CONFIG_DEFAULT, 0);
2807 spec->num_pins++;
2808 }
2809}
2810
2811static void resume_pin_configs(struct hda_codec *codec)
2812{
2813 struct alc_spec *spec = codec->spec;
2814 int i;
2815
2816 for (i = 0; i < spec->num_pins; i++) {
2817 hda_nid_t pin_nid = spec->pin_nids[i];
2818 unsigned int pin_config = spec->pin_cfgs[i];
2819 snd_hda_codec_write(codec, pin_nid, 0,
2820 AC_VERB_SET_CONFIG_DEFAULT_BYTES_0,
2821 pin_config & 0x000000ff);
2822 snd_hda_codec_write(codec, pin_nid, 0,
2823 AC_VERB_SET_CONFIG_DEFAULT_BYTES_1,
2824 (pin_config & 0x0000ff00) >> 8);
2825 snd_hda_codec_write(codec, pin_nid, 0,
2826 AC_VERB_SET_CONFIG_DEFAULT_BYTES_2,
2827 (pin_config & 0x00ff0000) >> 16);
2828 snd_hda_codec_write(codec, pin_nid, 0,
2829 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3,
2830 pin_config >> 24);
2831 }
2832}
2833
2834static int alc_resume(struct hda_codec *codec)
2835{
2836 resume_pin_configs(codec);
2837 codec->patch_ops.init(codec);
2838 snd_hda_codec_resume_amp(codec);
2839 snd_hda_codec_resume_cache(codec);
2840 return 0;
2841}
2842#else
2843#define store_pin_configs(codec)
2844#endif
2845
2781/* 2846/*
2782 */ 2847 */
2783static struct hda_codec_ops alc_patch_ops = { 2848static struct hda_codec_ops alc_patch_ops = {
@@ -2786,6 +2851,9 @@ static struct hda_codec_ops alc_patch_ops = {
2786 .init = alc_init, 2851 .init = alc_init,
2787 .free = alc_free, 2852 .free = alc_free,
2788 .unsol_event = alc_unsol_event, 2853 .unsol_event = alc_unsol_event,
2854#ifdef SND_HDA_NEEDS_RESUME
2855 .resume = alc_resume,
2856#endif
2789#ifdef CONFIG_SND_HDA_POWER_SAVE 2857#ifdef CONFIG_SND_HDA_POWER_SAVE
2790 .check_power_status = alc_check_power_status, 2858 .check_power_status = alc_check_power_status,
2791#endif 2859#endif
@@ -3832,6 +3900,7 @@ static int alc880_parse_auto_config(struct hda_codec *codec)
3832 spec->num_mux_defs = 1; 3900 spec->num_mux_defs = 1;
3833 spec->input_mux = &spec->private_imux; 3901 spec->input_mux = &spec->private_imux;
3834 3902
3903 store_pin_configs(codec);
3835 return 1; 3904 return 1;
3836} 3905}
3837 3906
@@ -5250,6 +5319,7 @@ static int alc260_parse_auto_config(struct hda_codec *codec)
5250 } 5319 }
5251 spec->num_mixers++; 5320 spec->num_mixers++;
5252 5321
5322 store_pin_configs(codec);
5253 return 1; 5323 return 1;
5254} 5324}
5255 5325
@@ -10313,6 +10383,7 @@ static int alc262_parse_auto_config(struct hda_codec *codec)
10313 if (err < 0) 10383 if (err < 0)
10314 return err; 10384 return err;
10315 10385
10386 store_pin_configs(codec);
10316 return 1; 10387 return 1;
10317} 10388}
10318 10389
@@ -11447,6 +11518,7 @@ static int alc268_parse_auto_config(struct hda_codec *codec)
11447 if (err < 0) 11518 if (err < 0)
11448 return err; 11519 return err;
11449 11520
11521 store_pin_configs(codec);
11450 return 1; 11522 return 1;
11451} 11523}
11452 11524
@@ -12230,6 +12302,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
12230 spec->mixers[spec->num_mixers] = alc269_capture_mixer; 12302 spec->mixers[spec->num_mixers] = alc269_capture_mixer;
12231 spec->num_mixers++; 12303 spec->num_mixers++;
12232 12304
12305 store_pin_configs(codec);
12233 return 1; 12306 return 1;
12234} 12307}
12235 12308
@@ -13316,6 +13389,7 @@ static int alc861_parse_auto_config(struct hda_codec *codec)
13316 spec->mixers[spec->num_mixers] = alc861_capture_mixer; 13389 spec->mixers[spec->num_mixers] = alc861_capture_mixer;
13317 spec->num_mixers++; 13390 spec->num_mixers++;
13318 13391
13392 store_pin_configs(codec);
13319 return 1; 13393 return 1;
13320} 13394}
13321 13395
@@ -14427,6 +14501,7 @@ static int alc861vd_parse_auto_config(struct hda_codec *codec)
14427 if (err < 0) 14501 if (err < 0)
14428 return err; 14502 return err;
14429 14503
14504 store_pin_configs(codec);
14430 return 1; 14505 return 1;
14431} 14506}
14432 14507
@@ -16258,6 +16333,8 @@ static int alc662_parse_auto_config(struct hda_codec *codec)
16258 16333
16259 spec->mixers[spec->num_mixers] = alc662_capture_mixer; 16334 spec->mixers[spec->num_mixers] = alc662_capture_mixer;
16260 spec->num_mixers++; 16335 spec->num_mixers++;
16336
16337 store_pin_configs(codec);
16261 return 1; 16338 return 1;
16262} 16339}
16263 16340
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
index 2d0dce649a64..ae7601f353a7 100644
--- a/sound/pci/mixart/mixart.c
+++ b/sound/pci/mixart/mixart.c
@@ -1314,8 +1314,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci,
1314 } 1314 }
1315 for (i = 0; i < 2; i++) { 1315 for (i = 0; i < 2; i++) {
1316 mgr->mem[i].phys = pci_resource_start(pci, i); 1316 mgr->mem[i].phys = pci_resource_start(pci, i);
1317 mgr->mem[i].virt = ioremap_nocache(mgr->mem[i].phys, 1317 mgr->mem[i].virt = pci_ioremap_bar(pci, i);
1318 pci_resource_len(pci, i));
1319 if (!mgr->mem[i].virt) { 1318 if (!mgr->mem[i].virt) {
1320 printk(KERN_ERR "unable to remap resource 0x%lx\n", 1319 printk(KERN_ERR "unable to remap resource 0x%lx\n",
1321 mgr->mem[i].phys); 1320 mgr->mem[i].phys);
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c
index 827587f08180..e020c160ee44 100644
--- a/sound/soc/blackfin/bf5xx-i2s.c
+++ b/sound/soc/blackfin/bf5xx-i2s.c
@@ -70,12 +70,24 @@ static struct sport_param sport_params[2] = {
70 } 70 }
71}; 71};
72 72
73static u16 sport_req[][7] = { 73/*
74 { P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, 74 * Setting the TFS pin selector for SPORT 0 based on whether the selected
75 P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0}, 75 * port id F or G. If the port is F then no conflict should exist for the
76 { P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, 76 * TFS. When Port G is selected and EMAC then there is a conflict between
77 P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0}, 77 * the PHY interrupt line and TFS. Current settings prevent the conflict
78}; 78 * by ignoring the TFS pin when Port G is selected. This allows both
79 * ssm2602 using Port G and EMAC concurrently.
80 */
81#ifdef CONFIG_BF527_SPORT0_PORTF
82#define LOCAL_SPORT0_TFS (P_SPORT0_TFS)
83#else
84#define LOCAL_SPORT0_TFS (0)
85#endif
86
87static u16 sport_req[][7] = { {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
88 P_SPORT0_DRPRI, P_SPORT0_RSCLK, LOCAL_SPORT0_TFS, 0},
89 {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, P_SPORT1_DRPRI,
90 P_SPORT1_RSCLK, P_SPORT1_TFS, 0} };
79 91
80static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, 92static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
81 unsigned int fmt) 93 unsigned int fmt)
@@ -98,23 +110,21 @@ static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
98 ret = -EINVAL; 110 ret = -EINVAL;
99 break; 111 break;
100 default: 112 default:
113 printk(KERN_ERR "%s: Unknown DAI format type\n", __func__);
101 ret = -EINVAL; 114 ret = -EINVAL;
102 break; 115 break;
103 } 116 }
104 117
105 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { 118 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
106 case SND_SOC_DAIFMT_CBS_CFS:
107 ret = -EINVAL;
108 break;
109 case SND_SOC_DAIFMT_CBM_CFS:
110 ret = -EINVAL;
111 break;
112 case SND_SOC_DAIFMT_CBM_CFM: 119 case SND_SOC_DAIFMT_CBM_CFM:
113 break; 120 break;
121 case SND_SOC_DAIFMT_CBS_CFS:
122 case SND_SOC_DAIFMT_CBM_CFS:
114 case SND_SOC_DAIFMT_CBS_CFM: 123 case SND_SOC_DAIFMT_CBS_CFM:
115 ret = -EINVAL; 124 ret = -EINVAL;
116 break; 125 break;
117 default: 126 default:
127 printk(KERN_ERR "%s: Unknown DAI master type\n", __func__);
118 ret = -EINVAL; 128 ret = -EINVAL;
119 break; 129 break;
120 } 130 }
diff --git a/sound/sound_core.c b/sound/sound_core.c
index faef87a9bc3f..a75b289a5d78 100644
--- a/sound/sound_core.c
+++ b/sound/sound_core.c
@@ -57,7 +57,7 @@ module_exit(cleanup_soundcore);
57/* 57/*
58 * OSS sound core handling. Breaks out sound functions to submodules 58 * OSS sound core handling. Breaks out sound functions to submodules
59 * 59 *
60 * Author: Alan Cox <alan.cox@linux.org> 60 * Author: Alan Cox <alan@lxorguk.ukuu.org.uk>
61 * 61 *
62 * Fixes: 62 * Fixes:
63 * 63 *