aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/core/pcm_native.c7
-rw-r--r--sound/core/timer.c5
-rw-r--r--sound/drivers/pcsp/pcsp.h2
-rw-r--r--sound/drivers/pcsp/pcsp_input.c4
-rw-r--r--sound/drivers/pcsp/pcsp_lib.c12
-rw-r--r--sound/isa/sb/es968.c2
-rw-r--r--sound/oss/dmasound/dmasound_paula.c51
-rw-r--r--sound/pci/hda/patch_cirrus.c2
-rw-r--r--sound/pci/hda/patch_conexant.c12
-rw-r--r--sound/pci/hda/patch_realtek.c1
-rw-r--r--sound/pci/hda/patch_sigmatel.c21
-rw-r--r--sound/pci/ice1712/maya44.c6
-rw-r--r--sound/pci/oxygen/xonar_cs43xx.c3
-rw-r--r--sound/soc/pxa/Kconfig1
-rw-r--r--sound/soc/pxa/pxa-ssp.c135
-rw-r--r--sound/soc/txx9/txx9aclc-ac97.c1
-rw-r--r--sound/soc/txx9/txx9aclc-generic.c1
17 files changed, 152 insertions, 114 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 872887624030..20b5982c996b 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -36,6 +36,9 @@
36#include <sound/timer.h> 36#include <sound/timer.h>
37#include <sound/minors.h> 37#include <sound/minors.h>
38#include <asm/io.h> 38#include <asm/io.h>
39#if defined(CONFIG_MIPS) && defined(CONFIG_DMA_NONCOHERENT)
40#include <dma-coherence.h>
41#endif
39 42
40/* 43/*
41 * Compatibility 44 * Compatibility
@@ -3184,6 +3187,10 @@ static int snd_pcm_default_mmap(struct snd_pcm_substream *substream,
3184 substream->runtime->dma_area, 3187 substream->runtime->dma_area,
3185 substream->runtime->dma_addr, 3188 substream->runtime->dma_addr,
3186 area->vm_end - area->vm_start); 3189 area->vm_end - area->vm_start);
3190#elif defined(CONFIG_MIPS) && defined(CONFIG_DMA_NONCOHERENT)
3191 if (substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV &&
3192 !plat_device_is_coherent(substream->dma_buffer.dev.dev))
3193 area->vm_page_prot = pgprot_noncached(area->vm_page_prot);
3187#endif /* ARCH_HAS_DMA_MMAP_COHERENT */ 3194#endif /* ARCH_HAS_DMA_MMAP_COHERENT */
3188 /* mmap with fault handler */ 3195 /* mmap with fault handler */
3189 area->vm_ops = &snd_pcm_vm_ops_data_fault; 3196 area->vm_ops = &snd_pcm_vm_ops_data_fault;
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 73943651caed..5040c7b862fe 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1160,6 +1160,7 @@ static void snd_timer_user_ccallback(struct snd_timer_instance *timeri,
1160{ 1160{
1161 struct snd_timer_user *tu = timeri->callback_data; 1161 struct snd_timer_user *tu = timeri->callback_data;
1162 struct snd_timer_tread r1; 1162 struct snd_timer_tread r1;
1163 unsigned long flags;
1163 1164
1164 if (event >= SNDRV_TIMER_EVENT_START && 1165 if (event >= SNDRV_TIMER_EVENT_START &&
1165 event <= SNDRV_TIMER_EVENT_PAUSE) 1166 event <= SNDRV_TIMER_EVENT_PAUSE)
@@ -1169,9 +1170,9 @@ static void snd_timer_user_ccallback(struct snd_timer_instance *timeri,
1169 r1.event = event; 1170 r1.event = event;
1170 r1.tstamp = *tstamp; 1171 r1.tstamp = *tstamp;
1171 r1.val = resolution; 1172 r1.val = resolution;
1172 spin_lock(&tu->qlock); 1173 spin_lock_irqsave(&tu->qlock, flags);
1173 snd_timer_user_append_to_tqueue(tu, &r1); 1174 snd_timer_user_append_to_tqueue(tu, &r1);
1174 spin_unlock(&tu->qlock); 1175 spin_unlock_irqrestore(&tu->qlock, flags);
1175 kill_fasync(&tu->fasync, SIGIO, POLL_IN); 1176 kill_fasync(&tu->fasync, SIGIO, POLL_IN);
1176 wake_up(&tu->qchange_sleep); 1177 wake_up(&tu->qchange_sleep);
1177} 1178}
diff --git a/sound/drivers/pcsp/pcsp.h b/sound/drivers/pcsp/pcsp.h
index 1e123077923d..4ff6c8cc5077 100644
--- a/sound/drivers/pcsp/pcsp.h
+++ b/sound/drivers/pcsp/pcsp.h
@@ -16,7 +16,7 @@
16#include <asm/i8253.h> 16#include <asm/i8253.h>
17#else 17#else
18#include <asm/8253pit.h> 18#include <asm/8253pit.h>
19static DEFINE_SPINLOCK(i8253_lock); 19static DEFINE_RAW_SPINLOCK(i8253_lock);
20#endif 20#endif
21 21
22#define PCSP_SOUND_VERSION 0x400 /* read 4.00 */ 22#define PCSP_SOUND_VERSION 0x400 /* read 4.00 */
diff --git a/sound/drivers/pcsp/pcsp_input.c b/sound/drivers/pcsp/pcsp_input.c
index 0444cdeb4bec..b5e2b54c2604 100644
--- a/sound/drivers/pcsp/pcsp_input.c
+++ b/sound/drivers/pcsp/pcsp_input.c
@@ -21,7 +21,7 @@ static void pcspkr_do_sound(unsigned int count)
21{ 21{
22 unsigned long flags; 22 unsigned long flags;
23 23
24 spin_lock_irqsave(&i8253_lock, flags); 24 raw_spin_lock_irqsave(&i8253_lock, flags);
25 25
26 if (count) { 26 if (count) {
27 /* set command for counter 2, 2 byte write */ 27 /* set command for counter 2, 2 byte write */
@@ -36,7 +36,7 @@ static void pcspkr_do_sound(unsigned int count)
36 outb(inb_p(0x61) & 0xFC, 0x61); 36 outb(inb_p(0x61) & 0xFC, 0x61);
37 } 37 }
38 38
39 spin_unlock_irqrestore(&i8253_lock, flags); 39 raw_spin_unlock_irqrestore(&i8253_lock, flags);
40} 40}
41 41
42void pcspkr_stop_sound(void) 42void pcspkr_stop_sound(void)
diff --git a/sound/drivers/pcsp/pcsp_lib.c b/sound/drivers/pcsp/pcsp_lib.c
index d77ffa9a9387..ce9e7d170c0d 100644
--- a/sound/drivers/pcsp/pcsp_lib.c
+++ b/sound/drivers/pcsp/pcsp_lib.c
@@ -66,7 +66,7 @@ static u64 pcsp_timer_update(struct snd_pcsp *chip)
66 timer_cnt = val * CUR_DIV() / 256; 66 timer_cnt = val * CUR_DIV() / 256;
67 67
68 if (timer_cnt && chip->enable) { 68 if (timer_cnt && chip->enable) {
69 spin_lock_irqsave(&i8253_lock, flags); 69 raw_spin_lock_irqsave(&i8253_lock, flags);
70 if (!nforce_wa) { 70 if (!nforce_wa) {
71 outb_p(chip->val61, 0x61); 71 outb_p(chip->val61, 0x61);
72 outb_p(timer_cnt, 0x42); 72 outb_p(timer_cnt, 0x42);
@@ -75,7 +75,7 @@ static u64 pcsp_timer_update(struct snd_pcsp *chip)
75 outb(chip->val61 ^ 2, 0x61); 75 outb(chip->val61 ^ 2, 0x61);
76 chip->thalf = 1; 76 chip->thalf = 1;
77 } 77 }
78 spin_unlock_irqrestore(&i8253_lock, flags); 78 raw_spin_unlock_irqrestore(&i8253_lock, flags);
79 } 79 }
80 80
81 chip->ns_rem = PCSP_PERIOD_NS(); 81 chip->ns_rem = PCSP_PERIOD_NS();
@@ -159,10 +159,10 @@ static int pcsp_start_playing(struct snd_pcsp *chip)
159 return -EIO; 159 return -EIO;
160 } 160 }
161 161
162 spin_lock(&i8253_lock); 162 raw_spin_lock(&i8253_lock);
163 chip->val61 = inb(0x61) | 0x03; 163 chip->val61 = inb(0x61) | 0x03;
164 outb_p(0x92, 0x43); /* binary, mode 1, LSB only, ch 2 */ 164 outb_p(0x92, 0x43); /* binary, mode 1, LSB only, ch 2 */
165 spin_unlock(&i8253_lock); 165 raw_spin_unlock(&i8253_lock);
166 atomic_set(&chip->timer_active, 1); 166 atomic_set(&chip->timer_active, 1);
167 chip->thalf = 0; 167 chip->thalf = 0;
168 168
@@ -179,11 +179,11 @@ static void pcsp_stop_playing(struct snd_pcsp *chip)
179 return; 179 return;
180 180
181 atomic_set(&chip->timer_active, 0); 181 atomic_set(&chip->timer_active, 0);
182 spin_lock(&i8253_lock); 182 raw_spin_lock(&i8253_lock);
183 /* restore the timer */ 183 /* restore the timer */
184 outb_p(0xb6, 0x43); /* binary, mode 3, LSB/MSB, ch 2 */ 184 outb_p(0xb6, 0x43); /* binary, mode 3, LSB/MSB, ch 2 */
185 outb(chip->val61 & 0xFC, 0x61); 185 outb(chip->val61 & 0xFC, 0x61);
186 spin_unlock(&i8253_lock); 186 raw_spin_unlock(&i8253_lock);
187} 187}
188 188
189/* 189/*
diff --git a/sound/isa/sb/es968.c b/sound/isa/sb/es968.c
index cafc3a7316a8..ff18286fef9d 100644
--- a/sound/isa/sb/es968.c
+++ b/sound/isa/sb/es968.c
@@ -93,7 +93,7 @@ static int __devinit snd_card_es968_pnp(int dev, struct snd_card_es968 *acard,
93 return err; 93 return err;
94 } 94 }
95 port[dev] = pnp_port_start(pdev, 0); 95 port[dev] = pnp_port_start(pdev, 0);
96 dma8[dev] = pnp_dma(pdev, 1); 96 dma8[dev] = pnp_dma(pdev, 0);
97 irq[dev] = pnp_irq(pdev, 0); 97 irq[dev] = pnp_irq(pdev, 0);
98 98
99 return 0; 99 return 0;
diff --git a/sound/oss/dmasound/dmasound_paula.c b/sound/oss/dmasound/dmasound_paula.c
index bb14e4c67e89..87910e992133 100644
--- a/sound/oss/dmasound/dmasound_paula.c
+++ b/sound/oss/dmasound/dmasound_paula.c
@@ -21,6 +21,7 @@
21#include <linux/ioport.h> 21#include <linux/ioport.h>
22#include <linux/soundcard.h> 22#include <linux/soundcard.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/platform_device.h>
24 25
25#include <asm/uaccess.h> 26#include <asm/uaccess.h>
26#include <asm/setup.h> 27#include <asm/setup.h>
@@ -710,31 +711,41 @@ static MACHINE machAmiga = {
710/*** Config & Setup **********************************************************/ 711/*** Config & Setup **********************************************************/
711 712
712 713
713static int __init dmasound_paula_init(void) 714static int __init amiga_audio_probe(struct platform_device *pdev)
714{ 715{
715 int err; 716 dmasound.mach = machAmiga;
716 717 dmasound.mach.default_hard = def_hard ;
717 if (MACH_IS_AMIGA && AMIGAHW_PRESENT(AMI_AUDIO)) { 718 dmasound.mach.default_soft = def_soft ;
718 if (!request_mem_region(CUSTOM_PHYSADDR+0xa0, 0x40, 719 return dmasound_init();
719 "dmasound [Paula]"))
720 return -EBUSY;
721 dmasound.mach = machAmiga;
722 dmasound.mach.default_hard = def_hard ;
723 dmasound.mach.default_soft = def_soft ;
724 err = dmasound_init();
725 if (err)
726 release_mem_region(CUSTOM_PHYSADDR+0xa0, 0x40);
727 return err;
728 } else
729 return -ENODEV;
730} 720}
731 721
732static void __exit dmasound_paula_cleanup(void) 722static int __exit amiga_audio_remove(struct platform_device *pdev)
733{ 723{
734 dmasound_deinit(); 724 dmasound_deinit();
735 release_mem_region(CUSTOM_PHYSADDR+0xa0, 0x40); 725 return 0;
726}
727
728static struct platform_driver amiga_audio_driver = {
729 .remove = __exit_p(amiga_audio_remove),
730 .driver = {
731 .name = "amiga-audio",
732 .owner = THIS_MODULE,
733 },
734};
735
736static int __init amiga_audio_init(void)
737{
738 return platform_driver_probe(&amiga_audio_driver, amiga_audio_probe);
736} 739}
737 740
738module_init(dmasound_paula_init); 741module_init(amiga_audio_init);
739module_exit(dmasound_paula_cleanup); 742
743static void __exit amiga_audio_exit(void)
744{
745 platform_driver_unregister(&amiga_audio_driver);
746}
747
748module_exit(amiga_audio_exit);
749
740MODULE_LICENSE("GPL"); 750MODULE_LICENSE("GPL");
751MODULE_ALIAS("platform:amiga-audio");
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index 7de782a5b8f4..350ee8ac4153 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -766,7 +766,7 @@ static int build_input(struct hda_codec *codec)
766 for (n = 0; n < AUTO_PIN_LAST; n++) { 766 for (n = 0; n < AUTO_PIN_LAST; n++) {
767 if (!spec->adc_nid[n]) 767 if (!spec->adc_nid[n])
768 continue; 768 continue;
769 err = snd_hda_add_nid(codec, kctl, 0, spec->adc_nid[i]); 769 err = snd_hda_add_nid(codec, kctl, 0, spec->adc_nid[n]);
770 if (err < 0) 770 if (err < 0)
771 return err; 771 return err;
772 } 772 }
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 61682e1d09da..feabb44c7ca4 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -1195,10 +1195,12 @@ static int patch_cxt5045(struct hda_codec *codec)
1195 1195
1196 switch (codec->subsystem_id >> 16) { 1196 switch (codec->subsystem_id >> 16) {
1197 case 0x103c: 1197 case 0x103c:
1198 case 0x1631:
1198 case 0x1734: 1199 case 0x1734:
1199 /* HP & Fujitsu-Siemens laptops have really bad sound over 0dB 1200 case 0x17aa:
1200 * on NID 0x17. Fix max PCM level to 0 dB 1201 /* HP, Packard Bell, Fujitsu-Siemens & Lenovo laptops have
1201 * (originally it has 0x2b steps with 0dB offset 0x14) 1202 * really bad sound over 0dB on NID 0x17. Fix max PCM level to
1203 * 0 dB (originally it has 0x2b steps with 0dB offset 0x14)
1202 */ 1204 */
1203 snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT, 1205 snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT,
1204 (0x14 << AC_AMPCAP_OFFSET_SHIFT) | 1206 (0x14 << AC_AMPCAP_OFFSET_SHIFT) |
@@ -2842,6 +2844,10 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = {
2842 CXT5066_DELL_LAPTOP), 2844 CXT5066_DELL_LAPTOP),
2843 SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT5066_OLPC_XO_1_5), 2845 SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT5066_OLPC_XO_1_5),
2844 SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTO), 2846 SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTO),
2847 SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD),
2848 SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5),
2849 SND_PCI_QUIRK(0x1179, 0xffe0, "Toshiba Satellite Pro T130-15F", CXT5066_OLPC_XO_1_5),
2850 SND_PCI_QUIRK(0x17aa, 0x21b2, "Thinkpad X100e", CXT5066_IDEAPAD),
2845 SND_PCI_QUIRK(0x17aa, 0x3a0d, "ideapad", CXT5066_IDEAPAD), 2851 SND_PCI_QUIRK(0x17aa, 0x3a0d, "ideapad", CXT5066_IDEAPAD),
2846 {} 2852 {}
2847}; 2853};
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 7404dba16f83..886d8e46bb37 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -17871,7 +17871,6 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = {
17871 ALC662_3ST_6ch_DIG), 17871 ALC662_3ST_6ch_DIG),
17872 SND_PCI_QUIRK_MASK(0x1854, 0xf000, 0x2000, "ASUS H13-200x", 17872 SND_PCI_QUIRK_MASK(0x1854, 0xf000, 0x2000, "ASUS H13-200x",
17873 ALC663_ASUS_H13), 17873 ALC663_ASUS_H13),
17874 SND_PCI_QUIRK(0x8086, 0xd604, "Intel mobo", ALC662_3ST_2ch_DIG),
17875 {} 17874 {}
17876}; 17875};
17877 17876
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 7fb7d017a347..a0e06d82da1f 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -104,6 +104,7 @@ enum {
104 STAC_DELL_M4_2, 104 STAC_DELL_M4_2,
105 STAC_DELL_M4_3, 105 STAC_DELL_M4_3,
106 STAC_HP_M4, 106 STAC_HP_M4,
107 STAC_HP_DV4,
107 STAC_HP_DV5, 108 STAC_HP_DV5,
108 STAC_HP_HDX, 109 STAC_HP_HDX,
109 STAC_HP_DV4_1222NR, 110 STAC_HP_DV4_1222NR,
@@ -1544,11 +1545,9 @@ static unsigned int alienware_m17x_pin_configs[13] = {
1544 0x904601b0, 1545 0x904601b0,
1545}; 1546};
1546 1547
1547static unsigned int intel_dg45id_pin_configs[14] = { 1548static unsigned int intel_dg45id_pin_configs[13] = {
1548 0x02214230, 0x02A19240, 0x01013214, 0x01014210, 1549 0x02214230, 0x02A19240, 0x01013214, 0x01014210,
1549 0x01A19250, 0x01011212, 0x01016211, 0x40f000f0, 1550 0x01A19250, 0x01011212, 0x01016211
1550 0x40f000f0, 0x40f000f0, 0x40f000f0, 0x014510A0,
1551 0x074510B0, 0x40f000f0
1552}; 1551};
1553 1552
1554static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = { 1553static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = {
@@ -1693,6 +1692,7 @@ static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = {
1693 [STAC_DELL_M4_2] = dell_m4_2_pin_configs, 1692 [STAC_DELL_M4_2] = dell_m4_2_pin_configs,
1694 [STAC_DELL_M4_3] = dell_m4_3_pin_configs, 1693 [STAC_DELL_M4_3] = dell_m4_3_pin_configs,
1695 [STAC_HP_M4] = NULL, 1694 [STAC_HP_M4] = NULL,
1695 [STAC_HP_DV4] = NULL,
1696 [STAC_HP_DV5] = NULL, 1696 [STAC_HP_DV5] = NULL,
1697 [STAC_HP_HDX] = NULL, 1697 [STAC_HP_HDX] = NULL,
1698 [STAC_HP_DV4_1222NR] = NULL, 1698 [STAC_HP_DV4_1222NR] = NULL,
@@ -1705,6 +1705,7 @@ static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = {
1705 [STAC_DELL_M4_2] = "dell-m4-2", 1705 [STAC_DELL_M4_2] = "dell-m4-2",
1706 [STAC_DELL_M4_3] = "dell-m4-3", 1706 [STAC_DELL_M4_3] = "dell-m4-3",
1707 [STAC_HP_M4] = "hp-m4", 1707 [STAC_HP_M4] = "hp-m4",
1708 [STAC_HP_DV4] = "hp-dv4",
1708 [STAC_HP_DV5] = "hp-dv5", 1709 [STAC_HP_DV5] = "hp-dv5",
1709 [STAC_HP_HDX] = "hp-hdx", 1710 [STAC_HP_HDX] = "hp-hdx",
1710 [STAC_HP_DV4_1222NR] = "hp-dv4-1222nr", 1711 [STAC_HP_DV4_1222NR] = "hp-dv4-1222nr",
@@ -1723,7 +1724,7 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
1723 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3080, 1724 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3080,
1724 "HP", STAC_HP_DV5), 1725 "HP", STAC_HP_DV5),
1725 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x30f0, 1726 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x30f0,
1726 "HP dv4-7", STAC_HP_DV5), 1727 "HP dv4-7", STAC_HP_DV4),
1727 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3600, 1728 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3600,
1728 "HP dv4-7", STAC_HP_DV5), 1729 "HP dv4-7", STAC_HP_DV5),
1729 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3610, 1730 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3610,
@@ -4768,6 +4769,9 @@ static void set_hp_led_gpio(struct hda_codec *codec)
4768 struct sigmatel_spec *spec = codec->spec; 4769 struct sigmatel_spec *spec = codec->spec;
4769 unsigned int gpio; 4770 unsigned int gpio;
4770 4771
4772 if (spec->gpio_led)
4773 return;
4774
4771 gpio = snd_hda_param_read(codec, codec->afg, AC_PAR_GPIO_CAP); 4775 gpio = snd_hda_param_read(codec, codec->afg, AC_PAR_GPIO_CAP);
4772 gpio &= AC_GPIO_IO_COUNT; 4776 gpio &= AC_GPIO_IO_COUNT;
4773 if (gpio > 3) 4777 if (gpio > 3)
@@ -5677,6 +5681,9 @@ again:
5677 spec->num_smuxes = 1; 5681 spec->num_smuxes = 1;
5678 spec->num_dmuxes = 1; 5682 spec->num_dmuxes = 1;
5679 /* fallthrough */ 5683 /* fallthrough */
5684 case STAC_HP_DV4:
5685 spec->gpio_led = 0x01;
5686 /* fallthrough */
5680 case STAC_HP_DV5: 5687 case STAC_HP_DV5:
5681 snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010); 5688 snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010);
5682 stac92xx_auto_set_pinctl(codec, 0x0d, AC_PINCTL_OUT_EN); 5689 stac92xx_auto_set_pinctl(codec, 0x0d, AC_PINCTL_OUT_EN);
@@ -5690,6 +5697,7 @@ again:
5690 spec->num_dmics = 1; 5697 spec->num_dmics = 1;
5691 spec->num_dmuxes = 1; 5698 spec->num_dmuxes = 1;
5692 spec->num_smuxes = 1; 5699 spec->num_smuxes = 1;
5700 spec->gpio_led = 0x08;
5693 break; 5701 break;
5694 } 5702 }
5695 5703
@@ -5746,7 +5754,8 @@ again:
5746 } 5754 }
5747 5755
5748 /* enable bass on HP dv7 */ 5756 /* enable bass on HP dv7 */
5749 if (spec->board_config == STAC_HP_DV5) { 5757 if (spec->board_config == STAC_HP_DV4 ||
5758 spec->board_config == STAC_HP_DV5) {
5750 unsigned int cap; 5759 unsigned int cap;
5751 cap = snd_hda_param_read(codec, 0x1, AC_PAR_GPIO_CAP); 5760 cap = snd_hda_param_read(codec, 0x1, AC_PAR_GPIO_CAP);
5752 cap &= AC_GPIO_IO_COUNT; 5761 cap &= AC_GPIO_IO_COUNT;
diff --git a/sound/pci/ice1712/maya44.c b/sound/pci/ice1712/maya44.c
index 3e1c20ae2f1c..726fd4b92e19 100644
--- a/sound/pci/ice1712/maya44.c
+++ b/sound/pci/ice1712/maya44.c
@@ -347,7 +347,7 @@ static int maya_gpio_sw_put(struct snd_kcontrol *kcontrol,
347 347
348/* known working input slots (0-4) */ 348/* known working input slots (0-4) */
349#define MAYA_LINE_IN 1 /* in-2 */ 349#define MAYA_LINE_IN 1 /* in-2 */
350#define MAYA_MIC_IN 4 /* in-5 */ 350#define MAYA_MIC_IN 3 /* in-4 */
351 351
352static void wm8776_select_input(struct snd_maya44 *chip, int idx, int line) 352static void wm8776_select_input(struct snd_maya44 *chip, int idx, int line)
353{ 353{
@@ -393,8 +393,8 @@ static int maya_rec_src_put(struct snd_kcontrol *kcontrol,
393 int changed; 393 int changed;
394 394
395 mutex_lock(&chip->mutex); 395 mutex_lock(&chip->mutex);
396 changed = maya_set_gpio_bits(chip->ice, GPIO_MIC_RELAY, 396 changed = maya_set_gpio_bits(chip->ice, 1 << GPIO_MIC_RELAY,
397 sel ? GPIO_MIC_RELAY : 0); 397 sel ? (1 << GPIO_MIC_RELAY) : 0);
398 wm8776_select_input(chip, 0, sel ? MAYA_MIC_IN : MAYA_LINE_IN); 398 wm8776_select_input(chip, 0, sel ? MAYA_MIC_IN : MAYA_LINE_IN);
399 mutex_unlock(&chip->mutex); 399 mutex_unlock(&chip->mutex);
400 return changed; 400 return changed;
diff --git a/sound/pci/oxygen/xonar_cs43xx.c b/sound/pci/oxygen/xonar_cs43xx.c
index 16c226bfcd2b..7c4986b27f2b 100644
--- a/sound/pci/oxygen/xonar_cs43xx.c
+++ b/sound/pci/oxygen/xonar_cs43xx.c
@@ -56,6 +56,7 @@
56#include <sound/pcm_params.h> 56#include <sound/pcm_params.h>
57#include <sound/tlv.h> 57#include <sound/tlv.h>
58#include "xonar.h" 58#include "xonar.h"
59#include "cm9780.h"
59#include "cs4398.h" 60#include "cs4398.h"
60#include "cs4362a.h" 61#include "cs4362a.h"
61 62
@@ -172,6 +173,8 @@ static void xonar_d1_init(struct oxygen *chip)
172 oxygen_clear_bits16(chip, OXYGEN_GPIO_DATA, 173 oxygen_clear_bits16(chip, OXYGEN_GPIO_DATA,
173 GPIO_D1_FRONT_PANEL | GPIO_D1_INPUT_ROUTE); 174 GPIO_D1_FRONT_PANEL | GPIO_D1_INPUT_ROUTE);
174 175
176 oxygen_ac97_set_bits(chip, 0, CM9780_JACK, CM9780_FMIC2MIC);
177
175 xonar_init_cs53x1(chip); 178 xonar_init_cs53x1(chip);
176 xonar_enable_output(chip); 179 xonar_enable_output(chip);
177 180
diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig
index 376e14a9c273..78e612100782 100644
--- a/sound/soc/pxa/Kconfig
+++ b/sound/soc/pxa/Kconfig
@@ -23,6 +23,7 @@ config SND_PXA2XX_SOC_I2S
23 23
24config SND_PXA_SOC_SSP 24config SND_PXA_SOC_SSP
25 tristate 25 tristate
26 select PXA_SSP
26 27
27config SND_PXA2XX_SOC_CORGI 28config SND_PXA2XX_SOC_CORGI
28 tristate "SoC Audio support for Sharp Zaurus SL-C7x0" 29 tristate "SoC Audio support for Sharp Zaurus SL-C7x0"
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index 544fd9566f4d..a1fd23e0e3d0 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -32,9 +32,8 @@
32 32
33#include <mach/hardware.h> 33#include <mach/hardware.h>
34#include <mach/dma.h> 34#include <mach/dma.h>
35#include <mach/regs-ssp.h>
36#include <mach/audio.h> 35#include <mach/audio.h>
37#include <mach/ssp.h> 36#include <plat/ssp.h>
38 37
39#include "pxa2xx-pcm.h" 38#include "pxa2xx-pcm.h"
40#include "pxa-ssp.h" 39#include "pxa-ssp.h"
@@ -57,15 +56,15 @@ struct ssp_priv {
57static void dump_registers(struct ssp_device *ssp) 56static void dump_registers(struct ssp_device *ssp)
58{ 57{
59 dev_dbg(&ssp->pdev->dev, "SSCR0 0x%08x SSCR1 0x%08x SSTO 0x%08x\n", 58 dev_dbg(&ssp->pdev->dev, "SSCR0 0x%08x SSCR1 0x%08x SSTO 0x%08x\n",
60 ssp_read_reg(ssp, SSCR0), ssp_read_reg(ssp, SSCR1), 59 pxa_ssp_read_reg(ssp, SSCR0), pxa_ssp_read_reg(ssp, SSCR1),
61 ssp_read_reg(ssp, SSTO)); 60 pxa_ssp_read_reg(ssp, SSTO));
62 61
63 dev_dbg(&ssp->pdev->dev, "SSPSP 0x%08x SSSR 0x%08x SSACD 0x%08x\n", 62 dev_dbg(&ssp->pdev->dev, "SSPSP 0x%08x SSSR 0x%08x SSACD 0x%08x\n",
64 ssp_read_reg(ssp, SSPSP), ssp_read_reg(ssp, SSSR), 63 pxa_ssp_read_reg(ssp, SSPSP), pxa_ssp_read_reg(ssp, SSSR),
65 ssp_read_reg(ssp, SSACD)); 64 pxa_ssp_read_reg(ssp, SSACD));
66} 65}
67 66
68static void ssp_enable(struct ssp_device *ssp) 67static void pxa_ssp_enable(struct ssp_device *ssp)
69{ 68{
70 uint32_t sscr0; 69 uint32_t sscr0;
71 70
@@ -73,7 +72,7 @@ static void ssp_enable(struct ssp_device *ssp)
73 __raw_writel(sscr0, ssp->mmio_base + SSCR0); 72 __raw_writel(sscr0, ssp->mmio_base + SSCR0);
74} 73}
75 74
76static void ssp_disable(struct ssp_device *ssp) 75static void pxa_ssp_disable(struct ssp_device *ssp)
77{ 76{
78 uint32_t sscr0; 77 uint32_t sscr0;
79 78
@@ -87,7 +86,7 @@ struct pxa2xx_pcm_dma_data {
87}; 86};
88 87
89static struct pxa2xx_pcm_dma_params * 88static struct pxa2xx_pcm_dma_params *
90ssp_get_dma_params(struct ssp_device *ssp, int width4, int out) 89pxa_ssp_get_dma_params(struct ssp_device *ssp, int width4, int out)
91{ 90{
92 struct pxa2xx_pcm_dma_data *dma; 91 struct pxa2xx_pcm_dma_data *dma;
93 92
@@ -119,7 +118,7 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream,
119 118
120 if (!cpu_dai->active) { 119 if (!cpu_dai->active) {
121 clk_enable(ssp->clk); 120 clk_enable(ssp->clk);
122 ssp_disable(ssp); 121 pxa_ssp_disable(ssp);
123 } 122 }
124 123
125 kfree(snd_soc_dai_get_dma_data(cpu_dai, substream)); 124 kfree(snd_soc_dai_get_dma_data(cpu_dai, substream));
@@ -137,7 +136,7 @@ static void pxa_ssp_shutdown(struct snd_pcm_substream *substream,
137 struct ssp_device *ssp = priv->ssp; 136 struct ssp_device *ssp = priv->ssp;
138 137
139 if (!cpu_dai->active) { 138 if (!cpu_dai->active) {
140 ssp_disable(ssp); 139 pxa_ssp_disable(ssp);
141 clk_disable(ssp->clk); 140 clk_disable(ssp->clk);
142 } 141 }
143 142
@@ -160,7 +159,7 @@ static int pxa_ssp_suspend(struct snd_soc_dai *cpu_dai)
160 priv->to = __raw_readl(ssp->mmio_base + SSTO); 159 priv->to = __raw_readl(ssp->mmio_base + SSTO);
161 priv->psp = __raw_readl(ssp->mmio_base + SSPSP); 160 priv->psp = __raw_readl(ssp->mmio_base + SSPSP);
162 161
163 ssp_disable(ssp); 162 pxa_ssp_disable(ssp);
164 clk_disable(ssp->clk); 163 clk_disable(ssp->clk);
165 return 0; 164 return 0;
166} 165}
@@ -180,7 +179,7 @@ static int pxa_ssp_resume(struct snd_soc_dai *cpu_dai)
180 __raw_writel(priv->psp, ssp->mmio_base + SSPSP); 179 __raw_writel(priv->psp, ssp->mmio_base + SSPSP);
181 180
182 if (cpu_dai->active) 181 if (cpu_dai->active)
183 ssp_enable(ssp); 182 pxa_ssp_enable(ssp);
184 else 183 else
185 clk_disable(ssp->clk); 184 clk_disable(ssp->clk);
186 185
@@ -196,9 +195,9 @@ static int pxa_ssp_resume(struct snd_soc_dai *cpu_dai)
196 * ssp_set_clkdiv - set SSP clock divider 195 * ssp_set_clkdiv - set SSP clock divider
197 * @div: serial clock rate divider 196 * @div: serial clock rate divider
198 */ 197 */
199static void ssp_set_scr(struct ssp_device *ssp, u32 div) 198static void pxa_ssp_set_scr(struct ssp_device *ssp, u32 div)
200{ 199{
201 u32 sscr0 = ssp_read_reg(ssp, SSCR0); 200 u32 sscr0 = pxa_ssp_read_reg(ssp, SSCR0);
202 201
203 if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) { 202 if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) {
204 sscr0 &= ~0x0000ff00; 203 sscr0 &= ~0x0000ff00;
@@ -207,15 +206,15 @@ static void ssp_set_scr(struct ssp_device *ssp, u32 div)
207 sscr0 &= ~0x000fff00; 206 sscr0 &= ~0x000fff00;
208 sscr0 |= (div - 1) << 8; /* 1..4096 */ 207 sscr0 |= (div - 1) << 8; /* 1..4096 */
209 } 208 }
210 ssp_write_reg(ssp, SSCR0, sscr0); 209 pxa_ssp_write_reg(ssp, SSCR0, sscr0);
211} 210}
212 211
213/** 212/**
214 * ssp_get_clkdiv - get SSP clock divider 213 * pxa_ssp_get_clkdiv - get SSP clock divider
215 */ 214 */
216static u32 ssp_get_scr(struct ssp_device *ssp) 215static u32 pxa_ssp_get_scr(struct ssp_device *ssp)
217{ 216{
218 u32 sscr0 = ssp_read_reg(ssp, SSCR0); 217 u32 sscr0 = pxa_ssp_read_reg(ssp, SSCR0);
219 u32 div; 218 u32 div;
220 219
221 if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) 220 if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP)
@@ -235,7 +234,7 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
235 struct ssp_device *ssp = priv->ssp; 234 struct ssp_device *ssp = priv->ssp;
236 int val; 235 int val;
237 236
238 u32 sscr0 = ssp_read_reg(ssp, SSCR0) & 237 u32 sscr0 = pxa_ssp_read_reg(ssp, SSCR0) &
239 ~(SSCR0_ECS | SSCR0_NCS | SSCR0_MOD | SSCR0_ACS); 238 ~(SSCR0_ECS | SSCR0_NCS | SSCR0_MOD | SSCR0_ACS);
240 239
241 dev_dbg(&ssp->pdev->dev, 240 dev_dbg(&ssp->pdev->dev,
@@ -263,7 +262,7 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
263 break; 262 break;
264 case PXA_SSP_CLK_AUDIO: 263 case PXA_SSP_CLK_AUDIO:
265 priv->sysclk = 0; 264 priv->sysclk = 0;
266 ssp_set_scr(ssp, 1); 265 pxa_ssp_set_scr(ssp, 1);
267 sscr0 |= SSCR0_ACS; 266 sscr0 |= SSCR0_ACS;
268 break; 267 break;
269 default: 268 default:
@@ -274,8 +273,8 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
274 * on PXA2xx. On PXA3xx it must be enabled when doing so. */ 273 * on PXA2xx. On PXA3xx it must be enabled when doing so. */
275 if (!cpu_is_pxa3xx()) 274 if (!cpu_is_pxa3xx())
276 clk_disable(ssp->clk); 275 clk_disable(ssp->clk);
277 val = ssp_read_reg(ssp, SSCR0) | sscr0; 276 val = pxa_ssp_read_reg(ssp, SSCR0) | sscr0;
278 ssp_write_reg(ssp, SSCR0, val); 277 pxa_ssp_write_reg(ssp, SSCR0, val);
279 if (!cpu_is_pxa3xx()) 278 if (!cpu_is_pxa3xx())
280 clk_enable(ssp->clk); 279 clk_enable(ssp->clk);
281 280
@@ -294,11 +293,11 @@ static int pxa_ssp_set_dai_clkdiv(struct snd_soc_dai *cpu_dai,
294 293
295 switch (div_id) { 294 switch (div_id) {
296 case PXA_SSP_AUDIO_DIV_ACDS: 295 case PXA_SSP_AUDIO_DIV_ACDS:
297 val = (ssp_read_reg(ssp, SSACD) & ~0x7) | SSACD_ACDS(div); 296 val = (pxa_ssp_read_reg(ssp, SSACD) & ~0x7) | SSACD_ACDS(div);
298 ssp_write_reg(ssp, SSACD, val); 297 pxa_ssp_write_reg(ssp, SSACD, val);
299 break; 298 break;
300 case PXA_SSP_AUDIO_DIV_SCDB: 299 case PXA_SSP_AUDIO_DIV_SCDB:
301 val = ssp_read_reg(ssp, SSACD); 300 val = pxa_ssp_read_reg(ssp, SSACD);
302 val &= ~SSACD_SCDB; 301 val &= ~SSACD_SCDB;
303#if defined(CONFIG_PXA3xx) 302#if defined(CONFIG_PXA3xx)
304 if (cpu_is_pxa3xx()) 303 if (cpu_is_pxa3xx())
@@ -321,10 +320,10 @@ static int pxa_ssp_set_dai_clkdiv(struct snd_soc_dai *cpu_dai,
321 default: 320 default:
322 return -EINVAL; 321 return -EINVAL;
323 } 322 }
324 ssp_write_reg(ssp, SSACD, val); 323 pxa_ssp_write_reg(ssp, SSACD, val);
325 break; 324 break;
326 case PXA_SSP_DIV_SCR: 325 case PXA_SSP_DIV_SCR:
327 ssp_set_scr(ssp, div); 326 pxa_ssp_set_scr(ssp, div);
328 break; 327 break;
329 default: 328 default:
330 return -ENODEV; 329 return -ENODEV;
@@ -341,11 +340,11 @@ static int pxa_ssp_set_dai_pll(struct snd_soc_dai *cpu_dai, int pll_id,
341{ 340{
342 struct ssp_priv *priv = cpu_dai->private_data; 341 struct ssp_priv *priv = cpu_dai->private_data;
343 struct ssp_device *ssp = priv->ssp; 342 struct ssp_device *ssp = priv->ssp;
344 u32 ssacd = ssp_read_reg(ssp, SSACD) & ~0x70; 343 u32 ssacd = pxa_ssp_read_reg(ssp, SSACD) & ~0x70;
345 344
346#if defined(CONFIG_PXA3xx) 345#if defined(CONFIG_PXA3xx)
347 if (cpu_is_pxa3xx()) 346 if (cpu_is_pxa3xx())
348 ssp_write_reg(ssp, SSACDD, 0); 347 pxa_ssp_write_reg(ssp, SSACDD, 0);
349#endif 348#endif
350 349
351 switch (freq_out) { 350 switch (freq_out) {
@@ -383,7 +382,7 @@ static int pxa_ssp_set_dai_pll(struct snd_soc_dai *cpu_dai, int pll_id,
383 val = tmp; 382 val = tmp;
384 383
385 val = (val << 16) | 64; 384 val = (val << 16) | 64;
386 ssp_write_reg(ssp, SSACDD, val); 385 pxa_ssp_write_reg(ssp, SSACDD, val);
387 386
388 ssacd |= (0x6 << 4); 387 ssacd |= (0x6 << 4);
389 388
@@ -397,7 +396,7 @@ static int pxa_ssp_set_dai_pll(struct snd_soc_dai *cpu_dai, int pll_id,
397 return -EINVAL; 396 return -EINVAL;
398 } 397 }
399 398
400 ssp_write_reg(ssp, SSACD, ssacd); 399 pxa_ssp_write_reg(ssp, SSACD, ssacd);
401 400
402 return 0; 401 return 0;
403} 402}
@@ -412,7 +411,7 @@ static int pxa_ssp_set_dai_tdm_slot(struct snd_soc_dai *cpu_dai,
412 struct ssp_device *ssp = priv->ssp; 411 struct ssp_device *ssp = priv->ssp;
413 u32 sscr0; 412 u32 sscr0;
414 413
415 sscr0 = ssp_read_reg(ssp, SSCR0); 414 sscr0 = pxa_ssp_read_reg(ssp, SSCR0);
416 sscr0 &= ~(SSCR0_MOD | SSCR0_SlotsPerFrm(8) | SSCR0_EDSS | SSCR0_DSS); 415 sscr0 &= ~(SSCR0_MOD | SSCR0_SlotsPerFrm(8) | SSCR0_EDSS | SSCR0_DSS);
417 416
418 /* set slot width */ 417 /* set slot width */
@@ -429,10 +428,10 @@ static int pxa_ssp_set_dai_tdm_slot(struct snd_soc_dai *cpu_dai,
429 sscr0 |= SSCR0_SlotsPerFrm(slots); 428 sscr0 |= SSCR0_SlotsPerFrm(slots);
430 429
431 /* set active slot mask */ 430 /* set active slot mask */
432 ssp_write_reg(ssp, SSTSA, tx_mask); 431 pxa_ssp_write_reg(ssp, SSTSA, tx_mask);
433 ssp_write_reg(ssp, SSRSA, rx_mask); 432 pxa_ssp_write_reg(ssp, SSRSA, rx_mask);
434 } 433 }
435 ssp_write_reg(ssp, SSCR0, sscr0); 434 pxa_ssp_write_reg(ssp, SSCR0, sscr0);
436 435
437 return 0; 436 return 0;
438} 437}
@@ -447,12 +446,12 @@ static int pxa_ssp_set_dai_tristate(struct snd_soc_dai *cpu_dai,
447 struct ssp_device *ssp = priv->ssp; 446 struct ssp_device *ssp = priv->ssp;
448 u32 sscr1; 447 u32 sscr1;
449 448
450 sscr1 = ssp_read_reg(ssp, SSCR1); 449 sscr1 = pxa_ssp_read_reg(ssp, SSCR1);
451 if (tristate) 450 if (tristate)
452 sscr1 &= ~SSCR1_TTE; 451 sscr1 &= ~SSCR1_TTE;
453 else 452 else
454 sscr1 |= SSCR1_TTE; 453 sscr1 |= SSCR1_TTE;
455 ssp_write_reg(ssp, SSCR1, sscr1); 454 pxa_ssp_write_reg(ssp, SSCR1, sscr1);
456 455
457 return 0; 456 return 0;
458} 457}
@@ -476,14 +475,14 @@ static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
476 return 0; 475 return 0;
477 476
478 /* we can only change the settings if the port is not in use */ 477 /* we can only change the settings if the port is not in use */
479 if (ssp_read_reg(ssp, SSCR0) & SSCR0_SSE) { 478 if (pxa_ssp_read_reg(ssp, SSCR0) & SSCR0_SSE) {
480 dev_err(&ssp->pdev->dev, 479 dev_err(&ssp->pdev->dev,
481 "can't change hardware dai format: stream is in use"); 480 "can't change hardware dai format: stream is in use");
482 return -EINVAL; 481 return -EINVAL;
483 } 482 }
484 483
485 /* reset port settings */ 484 /* reset port settings */
486 sscr0 = ssp_read_reg(ssp, SSCR0) & 485 sscr0 = pxa_ssp_read_reg(ssp, SSCR0) &
487 (SSCR0_ECS | SSCR0_NCS | SSCR0_MOD | SSCR0_ACS); 486 (SSCR0_ECS | SSCR0_NCS | SSCR0_MOD | SSCR0_ACS);
488 sscr1 = SSCR1_RxTresh(8) | SSCR1_TxTresh(7); 487 sscr1 = SSCR1_RxTresh(8) | SSCR1_TxTresh(7);
489 sspsp = 0; 488 sspsp = 0;
@@ -535,9 +534,9 @@ static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
535 return -EINVAL; 534 return -EINVAL;
536 } 535 }
537 536
538 ssp_write_reg(ssp, SSCR0, sscr0); 537 pxa_ssp_write_reg(ssp, SSCR0, sscr0);
539 ssp_write_reg(ssp, SSCR1, sscr1); 538 pxa_ssp_write_reg(ssp, SSCR1, sscr1);
540 ssp_write_reg(ssp, SSPSP, sspsp); 539 pxa_ssp_write_reg(ssp, SSPSP, sspsp);
541 540
542 dump_registers(ssp); 541 dump_registers(ssp);
543 542
@@ -566,7 +565,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
566 u32 sscr0; 565 u32 sscr0;
567 u32 sspsp; 566 u32 sspsp;
568 int width = snd_pcm_format_physical_width(params_format(params)); 567 int width = snd_pcm_format_physical_width(params_format(params));
569 int ttsa = ssp_read_reg(ssp, SSTSA) & 0xf; 568 int ttsa = pxa_ssp_read_reg(ssp, SSTSA) & 0xf;
570 struct pxa2xx_pcm_dma_params *dma_data; 569 struct pxa2xx_pcm_dma_params *dma_data;
571 570
572 dma_data = snd_soc_dai_get_dma_data(dai, substream); 571 dma_data = snd_soc_dai_get_dma_data(dai, substream);
@@ -578,22 +577,22 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
578 * to force 16-bit frame width on the wire (for S16_LE), even 577 * to force 16-bit frame width on the wire (for S16_LE), even
579 * with two channels. Use 16-bit DMA transfers for this case. 578 * with two channels. Use 16-bit DMA transfers for this case.
580 */ 579 */
581 dma_data = ssp_get_dma_params(ssp, 580 dma_data = pxa_ssp_get_dma_params(ssp,
582 ((chn == 2) && (ttsa != 1)) || (width == 32), 581 ((chn == 2) && (ttsa != 1)) || (width == 32),
583 substream->stream == SNDRV_PCM_STREAM_PLAYBACK); 582 substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
584 583
585 snd_soc_dai_set_dma_data(dai, substream, dma_data); 584 snd_soc_dai_set_dma_data(dai, substream, dma_data);
586 585
587 /* we can only change the settings if the port is not in use */ 586 /* we can only change the settings if the port is not in use */
588 if (ssp_read_reg(ssp, SSCR0) & SSCR0_SSE) 587 if (pxa_ssp_read_reg(ssp, SSCR0) & SSCR0_SSE)
589 return 0; 588 return 0;
590 589
591 /* clear selected SSP bits */ 590 /* clear selected SSP bits */
592 sscr0 = ssp_read_reg(ssp, SSCR0) & ~(SSCR0_DSS | SSCR0_EDSS); 591 sscr0 = pxa_ssp_read_reg(ssp, SSCR0) & ~(SSCR0_DSS | SSCR0_EDSS);
593 ssp_write_reg(ssp, SSCR0, sscr0); 592 pxa_ssp_write_reg(ssp, SSCR0, sscr0);
594 593
595 /* bit size */ 594 /* bit size */
596 sscr0 = ssp_read_reg(ssp, SSCR0); 595 sscr0 = pxa_ssp_read_reg(ssp, SSCR0);
597 switch (params_format(params)) { 596 switch (params_format(params)) {
598 case SNDRV_PCM_FORMAT_S16_LE: 597 case SNDRV_PCM_FORMAT_S16_LE:
599#ifdef CONFIG_PXA3xx 598#ifdef CONFIG_PXA3xx
@@ -609,13 +608,13 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
609 sscr0 |= (SSCR0_EDSS | SSCR0_DataSize(16)); 608 sscr0 |= (SSCR0_EDSS | SSCR0_DataSize(16));
610 break; 609 break;
611 } 610 }
612 ssp_write_reg(ssp, SSCR0, sscr0); 611 pxa_ssp_write_reg(ssp, SSCR0, sscr0);
613 612
614 switch (priv->dai_fmt & SND_SOC_DAIFMT_FORMAT_MASK) { 613 switch (priv->dai_fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
615 case SND_SOC_DAIFMT_I2S: 614 case SND_SOC_DAIFMT_I2S:
616 sspsp = ssp_read_reg(ssp, SSPSP); 615 sspsp = pxa_ssp_read_reg(ssp, SSPSP);
617 616
618 if ((ssp_get_scr(ssp) == 4) && (width == 16)) { 617 if ((pxa_ssp_get_scr(ssp) == 4) && (width == 16)) {
619 /* This is a special case where the bitclk is 64fs 618 /* This is a special case where the bitclk is 64fs
620 * and we're not dealing with 2*32 bits of audio 619 * and we're not dealing with 2*32 bits of audio
621 * samples. 620 * samples.
@@ -649,7 +648,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
649 sspsp |= SSPSP_DMYSTRT(1); 648 sspsp |= SSPSP_DMYSTRT(1);
650 } 649 }
651 650
652 ssp_write_reg(ssp, SSPSP, sspsp); 651 pxa_ssp_write_reg(ssp, SSPSP, sspsp);
653 break; 652 break;
654 default: 653 default:
655 break; 654 break;
@@ -680,45 +679,45 @@ static int pxa_ssp_trigger(struct snd_pcm_substream *substream, int cmd,
680 679
681 switch (cmd) { 680 switch (cmd) {
682 case SNDRV_PCM_TRIGGER_RESUME: 681 case SNDRV_PCM_TRIGGER_RESUME:
683 ssp_enable(ssp); 682 pxa_ssp_enable(ssp);
684 break; 683 break;
685 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 684 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
686 val = ssp_read_reg(ssp, SSCR1); 685 val = pxa_ssp_read_reg(ssp, SSCR1);
687 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 686 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
688 val |= SSCR1_TSRE; 687 val |= SSCR1_TSRE;
689 else 688 else
690 val |= SSCR1_RSRE; 689 val |= SSCR1_RSRE;
691 ssp_write_reg(ssp, SSCR1, val); 690 pxa_ssp_write_reg(ssp, SSCR1, val);
692 val = ssp_read_reg(ssp, SSSR); 691 val = pxa_ssp_read_reg(ssp, SSSR);
693 ssp_write_reg(ssp, SSSR, val); 692 pxa_ssp_write_reg(ssp, SSSR, val);
694 break; 693 break;
695 case SNDRV_PCM_TRIGGER_START: 694 case SNDRV_PCM_TRIGGER_START:
696 val = ssp_read_reg(ssp, SSCR1); 695 val = pxa_ssp_read_reg(ssp, SSCR1);
697 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 696 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
698 val |= SSCR1_TSRE; 697 val |= SSCR1_TSRE;
699 else 698 else
700 val |= SSCR1_RSRE; 699 val |= SSCR1_RSRE;
701 ssp_write_reg(ssp, SSCR1, val); 700 pxa_ssp_write_reg(ssp, SSCR1, val);
702 ssp_enable(ssp); 701 pxa_ssp_enable(ssp);
703 break; 702 break;
704 case SNDRV_PCM_TRIGGER_STOP: 703 case SNDRV_PCM_TRIGGER_STOP:
705 val = ssp_read_reg(ssp, SSCR1); 704 val = pxa_ssp_read_reg(ssp, SSCR1);
706 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 705 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
707 val &= ~SSCR1_TSRE; 706 val &= ~SSCR1_TSRE;
708 else 707 else
709 val &= ~SSCR1_RSRE; 708 val &= ~SSCR1_RSRE;
710 ssp_write_reg(ssp, SSCR1, val); 709 pxa_ssp_write_reg(ssp, SSCR1, val);
711 break; 710 break;
712 case SNDRV_PCM_TRIGGER_SUSPEND: 711 case SNDRV_PCM_TRIGGER_SUSPEND:
713 ssp_disable(ssp); 712 pxa_ssp_disable(ssp);
714 break; 713 break;
715 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 714 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
716 val = ssp_read_reg(ssp, SSCR1); 715 val = pxa_ssp_read_reg(ssp, SSCR1);
717 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 716 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
718 val &= ~SSCR1_TSRE; 717 val &= ~SSCR1_TSRE;
719 else 718 else
720 val &= ~SSCR1_RSRE; 719 val &= ~SSCR1_RSRE;
721 ssp_write_reg(ssp, SSCR1, val); 720 pxa_ssp_write_reg(ssp, SSCR1, val);
722 break; 721 break;
723 722
724 default: 723 default:
@@ -740,7 +739,7 @@ static int pxa_ssp_probe(struct platform_device *pdev,
740 if (!priv) 739 if (!priv)
741 return -ENOMEM; 740 return -ENOMEM;
742 741
743 priv->ssp = ssp_request(dai->id + 1, "SoC audio"); 742 priv->ssp = pxa_ssp_request(dai->id + 1, "SoC audio");
744 if (priv->ssp == NULL) { 743 if (priv->ssp == NULL) {
745 ret = -ENODEV; 744 ret = -ENODEV;
746 goto err_priv; 745 goto err_priv;
@@ -760,7 +759,7 @@ static void pxa_ssp_remove(struct platform_device *pdev,
760 struct snd_soc_dai *dai) 759 struct snd_soc_dai *dai)
761{ 760{
762 struct ssp_priv *priv = dai->private_data; 761 struct ssp_priv *priv = dai->private_data;
763 ssp_free(priv->ssp); 762 pxa_ssp_free(priv->ssp);
764} 763}
765 764
766#define PXA_SSP_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ 765#define PXA_SSP_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c
index 612e18b4bf4e..0ec20b68e8cb 100644
--- a/sound/soc/txx9/txx9aclc-ac97.c
+++ b/sound/soc/txx9/txx9aclc-ac97.c
@@ -254,3 +254,4 @@ module_exit(txx9aclc_ac97_exit);
254MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); 254MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>");
255MODULE_DESCRIPTION("TXx9 ACLC AC97 driver"); 255MODULE_DESCRIPTION("TXx9 ACLC AC97 driver");
256MODULE_LICENSE("GPL"); 256MODULE_LICENSE("GPL");
257MODULE_ALIAS("platform:txx9aclc-ac97");
diff --git a/sound/soc/txx9/txx9aclc-generic.c b/sound/soc/txx9/txx9aclc-generic.c
index 3175de9a92cb..95b17f731aec 100644
--- a/sound/soc/txx9/txx9aclc-generic.c
+++ b/sound/soc/txx9/txx9aclc-generic.c
@@ -96,3 +96,4 @@ module_exit(txx9aclc_generic_exit);
96MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); 96MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>");
97MODULE_DESCRIPTION("Generic TXx9 ACLC ALSA SoC audio driver"); 97MODULE_DESCRIPTION("Generic TXx9 ACLC ALSA SoC audio driver");
98MODULE_LICENSE("GPL"); 98MODULE_LICENSE("GPL");
99MODULE_ALIAS("platform:txx9aclc-generic");