diff options
| author | Steve French <sfrench@us.ibm.com> | 2011-06-25 15:22:28 -0400 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2011-06-25 15:22:28 -0400 |
| commit | daf6c4501e048eed56b256401d030d6b28e92ff1 (patch) | |
| tree | 7b1af88901b9c62cba26f9d5694a05bf2a1badac | |
| parent | 9b8e072a31180eb5cd6991d08524d9c4fa235ade (diff) | |
| parent | 8abf55883431a91d4877933240c8419b7fc17274 (diff) | |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
| -rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 10 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_suspend.c | 5 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 3 | ||||
| -rw-r--r-- | drivers/rtc/rtc-vt8500.c | 45 | ||||
| -rw-r--r-- | include/sound/soc.h | 3 | ||||
| -rw-r--r-- | kernel/time/alarmtimer.c | 158 | ||||
| -rw-r--r-- | sound/pci/asihpi/asihpi.c | 1 | ||||
| -rw-r--r-- | sound/pci/hda/patch_realtek.c | 13 | ||||
| -rw-r--r-- | sound/pci/hda/patch_via.c | 35 | ||||
| -rw-r--r-- | sound/soc/codecs/wm8991.c | 1 | ||||
| -rw-r--r-- | sound/soc/imx/Kconfig | 7 | ||||
| -rw-r--r-- | sound/soc/imx/imx-pcm-dma-mx2.c | 2 | ||||
| -rw-r--r-- | sound/soc/imx/imx-ssi.c | 2 | ||||
| -rw-r--r-- | sound/soc/pxa/pxa2xx-pcm.c | 4 | ||||
| -rw-r--r-- | sound/soc/soc-cache.c | 3 |
18 files changed, 147 insertions, 151 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 94c84d74410..c6389de5316 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
| @@ -1219,11 +1219,11 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
| 1219 | ret = i915_gem_object_bind_to_gtt(obj, 0, true); | 1219 | ret = i915_gem_object_bind_to_gtt(obj, 0, true); |
| 1220 | if (ret) | 1220 | if (ret) |
| 1221 | goto unlock; | 1221 | goto unlock; |
| 1222 | } | ||
| 1223 | 1222 | ||
| 1224 | ret = i915_gem_object_set_to_gtt_domain(obj, write); | 1223 | ret = i915_gem_object_set_to_gtt_domain(obj, write); |
| 1225 | if (ret) | 1224 | if (ret) |
| 1226 | goto unlock; | 1225 | goto unlock; |
| 1226 | } | ||
| 1227 | 1227 | ||
| 1228 | if (obj->tiling_mode == I915_TILING_NONE) | 1228 | if (obj->tiling_mode == I915_TILING_NONE) |
| 1229 | ret = i915_gem_object_put_fence(obj); | 1229 | ret = i915_gem_object_put_fence(obj); |
| @@ -2926,8 +2926,6 @@ i915_gem_object_flush_gtt_write_domain(struct drm_i915_gem_object *obj) | |||
| 2926 | */ | 2926 | */ |
| 2927 | wmb(); | 2927 | wmb(); |
| 2928 | 2928 | ||
| 2929 | i915_gem_release_mmap(obj); | ||
| 2930 | |||
| 2931 | old_write_domain = obj->base.write_domain; | 2929 | old_write_domain = obj->base.write_domain; |
| 2932 | obj->base.write_domain = 0; | 2930 | obj->base.write_domain = 0; |
| 2933 | 2931 | ||
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 20a4cc5b818..4934cf84c32 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |||
| @@ -187,10 +187,6 @@ i915_gem_object_set_to_gpu_domain(struct drm_i915_gem_object *obj, | |||
| 187 | if ((flush_domains | invalidate_domains) & I915_GEM_DOMAIN_CPU) | 187 | if ((flush_domains | invalidate_domains) & I915_GEM_DOMAIN_CPU) |
| 188 | i915_gem_clflush_object(obj); | 188 | i915_gem_clflush_object(obj); |
| 189 | 189 | ||
| 190 | /* blow away mappings if mapped through GTT */ | ||
| 191 | if ((flush_domains | invalidate_domains) & I915_GEM_DOMAIN_GTT) | ||
| 192 | i915_gem_release_mmap(obj); | ||
| 193 | |||
| 194 | if (obj->base.pending_write_domain) | 190 | if (obj->base.pending_write_domain) |
| 195 | cd->flips |= atomic_read(&obj->pending_flip); | 191 | cd->flips |= atomic_read(&obj->pending_flip); |
| 196 | 192 | ||
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 9e34a1abeb6..ae2b49969b9 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
| @@ -1749,6 +1749,7 @@ void ironlake_irq_preinstall(struct drm_device *dev) | |||
| 1749 | * happens. | 1749 | * happens. |
| 1750 | */ | 1750 | */ |
| 1751 | I915_WRITE(GEN6_BLITTER_HWSTAM, ~GEN6_BLITTER_USER_INTERRUPT); | 1751 | I915_WRITE(GEN6_BLITTER_HWSTAM, ~GEN6_BLITTER_USER_INTERRUPT); |
| 1752 | I915_WRITE(GEN6_BSD_HWSTAM, ~GEN6_BSD_USER_INTERRUPT); | ||
| 1752 | } | 1753 | } |
| 1753 | 1754 | ||
| 1754 | /* XXX hotplug from PCH */ | 1755 | /* XXX hotplug from PCH */ |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 2f967af8e62..5d5def756c9 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
| @@ -531,6 +531,7 @@ | |||
| 531 | #define GEN6_BSD_SLEEP_PSMI_CONTROL_RC_ILDL_MESSAGE_ENABLE 0 | 531 | #define GEN6_BSD_SLEEP_PSMI_CONTROL_RC_ILDL_MESSAGE_ENABLE 0 |
| 532 | #define GEN6_BSD_SLEEP_PSMI_CONTROL_IDLE_INDICATOR (1 << 3) | 532 | #define GEN6_BSD_SLEEP_PSMI_CONTROL_IDLE_INDICATOR (1 << 3) |
| 533 | 533 | ||
| 534 | #define GEN6_BSD_HWSTAM 0x12098 | ||
| 534 | #define GEN6_BSD_IMR 0x120a8 | 535 | #define GEN6_BSD_IMR 0x120a8 |
| 535 | #define GEN6_BSD_USER_INTERRUPT (1 << 12) | 536 | #define GEN6_BSD_USER_INTERRUPT (1 << 12) |
| 536 | 537 | ||
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index 60a94d2b526..e8152d23d5b 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c | |||
| @@ -678,6 +678,7 @@ void i915_save_display(struct drm_device *dev) | |||
| 678 | } | 678 | } |
| 679 | 679 | ||
| 680 | /* VGA state */ | 680 | /* VGA state */ |
| 681 | mutex_lock(&dev->struct_mutex); | ||
| 681 | dev_priv->saveVGA0 = I915_READ(VGA0); | 682 | dev_priv->saveVGA0 = I915_READ(VGA0); |
| 682 | dev_priv->saveVGA1 = I915_READ(VGA1); | 683 | dev_priv->saveVGA1 = I915_READ(VGA1); |
| 683 | dev_priv->saveVGA_PD = I915_READ(VGA_PD); | 684 | dev_priv->saveVGA_PD = I915_READ(VGA_PD); |
| @@ -687,6 +688,7 @@ void i915_save_display(struct drm_device *dev) | |||
| 687 | dev_priv->saveVGACNTRL = I915_READ(VGACNTRL); | 688 | dev_priv->saveVGACNTRL = I915_READ(VGACNTRL); |
| 688 | 689 | ||
| 689 | i915_save_vga(dev); | 690 | i915_save_vga(dev); |
| 691 | mutex_unlock(&dev->struct_mutex); | ||
| 690 | } | 692 | } |
| 691 | 693 | ||
| 692 | void i915_restore_display(struct drm_device *dev) | 694 | void i915_restore_display(struct drm_device *dev) |
| @@ -780,6 +782,8 @@ void i915_restore_display(struct drm_device *dev) | |||
| 780 | I915_WRITE(CPU_VGACNTRL, dev_priv->saveVGACNTRL); | 782 | I915_WRITE(CPU_VGACNTRL, dev_priv->saveVGACNTRL); |
| 781 | else | 783 | else |
| 782 | I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL); | 784 | I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL); |
| 785 | |||
| 786 | mutex_lock(&dev->struct_mutex); | ||
| 783 | I915_WRITE(VGA0, dev_priv->saveVGA0); | 787 | I915_WRITE(VGA0, dev_priv->saveVGA0); |
| 784 | I915_WRITE(VGA1, dev_priv->saveVGA1); | 788 | I915_WRITE(VGA1, dev_priv->saveVGA1); |
| 785 | I915_WRITE(VGA_PD, dev_priv->saveVGA_PD); | 789 | I915_WRITE(VGA_PD, dev_priv->saveVGA_PD); |
| @@ -787,6 +791,7 @@ void i915_restore_display(struct drm_device *dev) | |||
| 787 | udelay(150); | 791 | udelay(150); |
| 788 | 792 | ||
| 789 | i915_restore_vga(dev); | 793 | i915_restore_vga(dev); |
| 794 | mutex_unlock(&dev->struct_mutex); | ||
| 790 | } | 795 | } |
| 791 | 796 | ||
| 792 | int i915_save_state(struct drm_device *dev) | 797 | int i915_save_state(struct drm_device *dev) |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 81a9059b6a9..aa43e7be605 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
| @@ -4687,6 +4687,7 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc, | |||
| 4687 | 4687 | ||
| 4688 | I915_WRITE(DSPCNTR(plane), dspcntr); | 4688 | I915_WRITE(DSPCNTR(plane), dspcntr); |
| 4689 | POSTING_READ(DSPCNTR(plane)); | 4689 | POSTING_READ(DSPCNTR(plane)); |
| 4690 | intel_enable_plane(dev_priv, plane, pipe); | ||
| 4690 | 4691 | ||
| 4691 | ret = intel_pipe_set_base(crtc, x, y, old_fb); | 4692 | ret = intel_pipe_set_base(crtc, x, y, old_fb); |
| 4692 | 4693 | ||
| @@ -5217,8 +5218,6 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc, | |||
| 5217 | 5218 | ||
| 5218 | I915_WRITE(DSPCNTR(plane), dspcntr); | 5219 | I915_WRITE(DSPCNTR(plane), dspcntr); |
| 5219 | POSTING_READ(DSPCNTR(plane)); | 5220 | POSTING_READ(DSPCNTR(plane)); |
| 5220 | if (!HAS_PCH_SPLIT(dev)) | ||
| 5221 | intel_enable_plane(dev_priv, plane, pipe); | ||
| 5222 | 5221 | ||
| 5223 | ret = intel_pipe_set_base(crtc, x, y, old_fb); | 5222 | ret = intel_pipe_set_base(crtc, x, y, old_fb); |
| 5224 | 5223 | ||
diff --git a/drivers/rtc/rtc-vt8500.c b/drivers/rtc/rtc-vt8500.c index b8bc862903a..efd6066b5cd 100644 --- a/drivers/rtc/rtc-vt8500.c +++ b/drivers/rtc/rtc-vt8500.c | |||
| @@ -78,7 +78,6 @@ struct vt8500_rtc { | |||
| 78 | void __iomem *regbase; | 78 | void __iomem *regbase; |
| 79 | struct resource *res; | 79 | struct resource *res; |
| 80 | int irq_alarm; | 80 | int irq_alarm; |
| 81 | int irq_hz; | ||
| 82 | struct rtc_device *rtc; | 81 | struct rtc_device *rtc; |
| 83 | spinlock_t lock; /* Protects this structure */ | 82 | spinlock_t lock; /* Protects this structure */ |
| 84 | }; | 83 | }; |
| @@ -100,10 +99,6 @@ static irqreturn_t vt8500_rtc_irq(int irq, void *dev_id) | |||
| 100 | if (isr & 1) | 99 | if (isr & 1) |
| 101 | events |= RTC_AF | RTC_IRQF; | 100 | events |= RTC_AF | RTC_IRQF; |
| 102 | 101 | ||
| 103 | /* Only second/minute interrupts are supported */ | ||
| 104 | if (isr & 2) | ||
| 105 | events |= RTC_UF | RTC_IRQF; | ||
| 106 | |||
| 107 | rtc_update_irq(vt8500_rtc->rtc, 1, events); | 102 | rtc_update_irq(vt8500_rtc->rtc, 1, events); |
| 108 | 103 | ||
| 109 | return IRQ_HANDLED; | 104 | return IRQ_HANDLED; |
| @@ -199,27 +194,12 @@ static int vt8500_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
| 199 | return 0; | 194 | return 0; |
| 200 | } | 195 | } |
| 201 | 196 | ||
| 202 | static int vt8500_update_irq_enable(struct device *dev, unsigned int enabled) | ||
| 203 | { | ||
| 204 | struct vt8500_rtc *vt8500_rtc = dev_get_drvdata(dev); | ||
| 205 | unsigned long tmp = readl(vt8500_rtc->regbase + VT8500_RTC_CR); | ||
| 206 | |||
| 207 | if (enabled) | ||
| 208 | tmp |= VT8500_RTC_CR_SM_SEC | VT8500_RTC_CR_SM_ENABLE; | ||
| 209 | else | ||
| 210 | tmp &= ~VT8500_RTC_CR_SM_ENABLE; | ||
| 211 | |||
| 212 | writel(tmp, vt8500_rtc->regbase + VT8500_RTC_CR); | ||
| 213 | return 0; | ||
| 214 | } | ||
| 215 | |||
| 216 | static const struct rtc_class_ops vt8500_rtc_ops = { | 197 | static const struct rtc_class_ops vt8500_rtc_ops = { |
| 217 | .read_time = vt8500_rtc_read_time, | 198 | .read_time = vt8500_rtc_read_time, |
| 218 | .set_time = vt8500_rtc_set_time, | 199 | .set_time = vt8500_rtc_set_time, |
| 219 | .read_alarm = vt8500_rtc_read_alarm, | 200 | .read_alarm = vt8500_rtc_read_alarm, |
| 220 | .set_alarm = vt8500_rtc_set_alarm, | 201 | .set_alarm = vt8500_rtc_set_alarm, |
| 221 | .alarm_irq_enable = vt8500_alarm_irq_enable, | 202 | .alarm_irq_enable = vt8500_alarm_irq_enable, |
| 222 | .update_irq_enable = vt8500_update_irq_enable, | ||
| 223 | }; | 203 | }; |
| 224 | 204 | ||
| 225 | static int __devinit vt8500_rtc_probe(struct platform_device *pdev) | 205 | static int __devinit vt8500_rtc_probe(struct platform_device *pdev) |
| @@ -248,13 +228,6 @@ static int __devinit vt8500_rtc_probe(struct platform_device *pdev) | |||
| 248 | goto err_free; | 228 | goto err_free; |
| 249 | } | 229 | } |
| 250 | 230 | ||
| 251 | vt8500_rtc->irq_hz = platform_get_irq(pdev, 1); | ||
| 252 | if (vt8500_rtc->irq_hz < 0) { | ||
| 253 | dev_err(&pdev->dev, "No 1Hz IRQ resource defined\n"); | ||
| 254 | ret = -ENXIO; | ||
| 255 | goto err_free; | ||
| 256 | } | ||
| 257 | |||
| 258 | vt8500_rtc->res = request_mem_region(vt8500_rtc->res->start, | 231 | vt8500_rtc->res = request_mem_region(vt8500_rtc->res->start, |
| 259 | resource_size(vt8500_rtc->res), | 232 | resource_size(vt8500_rtc->res), |
| 260 | "vt8500-rtc"); | 233 | "vt8500-rtc"); |
| @@ -272,9 +245,8 @@ static int __devinit vt8500_rtc_probe(struct platform_device *pdev) | |||
| 272 | goto err_release; | 245 | goto err_release; |
| 273 | } | 246 | } |
| 274 | 247 | ||
| 275 | /* Enable the second/minute interrupt generation and enable RTC */ | 248 | /* Enable RTC and set it to 24-hour mode */ |
| 276 | writel(VT8500_RTC_CR_ENABLE | VT8500_RTC_CR_24H | 249 | writel(VT8500_RTC_CR_ENABLE | VT8500_RTC_CR_24H, |
| 277 | | VT8500_RTC_CR_SM_ENABLE | VT8500_RTC_CR_SM_SEC, | ||
| 278 | vt8500_rtc->regbase + VT8500_RTC_CR); | 250 | vt8500_rtc->regbase + VT8500_RTC_CR); |
| 279 | 251 | ||
| 280 | vt8500_rtc->rtc = rtc_device_register("vt8500-rtc", &pdev->dev, | 252 | vt8500_rtc->rtc = rtc_device_register("vt8500-rtc", &pdev->dev, |
| @@ -286,26 +258,16 @@ static int __devinit vt8500_rtc_probe(struct platform_device *pdev) | |||
| 286 | goto err_unmap; | 258 | goto err_unmap; |
| 287 | } | 259 | } |
| 288 | 260 | ||
| 289 | ret = request_irq(vt8500_rtc->irq_hz, vt8500_rtc_irq, 0, | ||
| 290 | "rtc 1Hz", vt8500_rtc); | ||
| 291 | if (ret < 0) { | ||
| 292 | dev_err(&pdev->dev, "can't get irq %i, err %d\n", | ||
| 293 | vt8500_rtc->irq_hz, ret); | ||
| 294 | goto err_unreg; | ||
| 295 | } | ||
| 296 | |||
| 297 | ret = request_irq(vt8500_rtc->irq_alarm, vt8500_rtc_irq, 0, | 261 | ret = request_irq(vt8500_rtc->irq_alarm, vt8500_rtc_irq, 0, |
| 298 | "rtc alarm", vt8500_rtc); | 262 | "rtc alarm", vt8500_rtc); |
| 299 | if (ret < 0) { | 263 | if (ret < 0) { |
| 300 | dev_err(&pdev->dev, "can't get irq %i, err %d\n", | 264 | dev_err(&pdev->dev, "can't get irq %i, err %d\n", |
| 301 | vt8500_rtc->irq_alarm, ret); | 265 | vt8500_rtc->irq_alarm, ret); |
| 302 | goto err_free_hz; | 266 | goto err_unreg; |
| 303 | } | 267 | } |
| 304 | 268 | ||
| 305 | return 0; | 269 | return 0; |
| 306 | 270 | ||
| 307 | err_free_hz: | ||
| 308 | free_irq(vt8500_rtc->irq_hz, vt8500_rtc); | ||
| 309 | err_unreg: | 271 | err_unreg: |
| 310 | rtc_device_unregister(vt8500_rtc->rtc); | 272 | rtc_device_unregister(vt8500_rtc->rtc); |
| 311 | err_unmap: | 273 | err_unmap: |
| @@ -323,7 +285,6 @@ static int __devexit vt8500_rtc_remove(struct platform_device *pdev) | |||
| 323 | struct vt8500_rtc *vt8500_rtc = platform_get_drvdata(pdev); | 285 | struct vt8500_rtc *vt8500_rtc = platform_get_drvdata(pdev); |
| 324 | 286 | ||
| 325 | free_irq(vt8500_rtc->irq_alarm, vt8500_rtc); | 287 | free_irq(vt8500_rtc->irq_alarm, vt8500_rtc); |
| 326 | free_irq(vt8500_rtc->irq_hz, vt8500_rtc); | ||
| 327 | 288 | ||
| 328 | rtc_device_unregister(vt8500_rtc->rtc); | 289 | rtc_device_unregister(vt8500_rtc->rtc); |
| 329 | 290 | ||
diff --git a/include/sound/soc.h b/include/sound/soc.h index f1de3e0c75b..3a4bd3a3c68 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
| @@ -248,8 +248,7 @@ typedef int (*hw_write_t)(void *,const char* ,int); | |||
| 248 | extern struct snd_ac97_bus_ops soc_ac97_ops; | 248 | extern struct snd_ac97_bus_ops soc_ac97_ops; |
| 249 | 249 | ||
| 250 | enum snd_soc_control_type { | 250 | enum snd_soc_control_type { |
| 251 | SND_SOC_CUSTOM = 1, | 251 | SND_SOC_I2C = 1, |
| 252 | SND_SOC_I2C, | ||
| 253 | SND_SOC_SPI, | 252 | SND_SOC_SPI, |
| 254 | }; | 253 | }; |
| 255 | 254 | ||
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index 2d966244ea6..59f369f98a0 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c | |||
| @@ -42,15 +42,75 @@ static struct alarm_base { | |||
| 42 | clockid_t base_clockid; | 42 | clockid_t base_clockid; |
| 43 | } alarm_bases[ALARM_NUMTYPE]; | 43 | } alarm_bases[ALARM_NUMTYPE]; |
| 44 | 44 | ||
| 45 | /* freezer delta & lock used to handle clock_nanosleep triggered wakeups */ | ||
| 46 | static ktime_t freezer_delta; | ||
| 47 | static DEFINE_SPINLOCK(freezer_delta_lock); | ||
| 48 | |||
| 45 | #ifdef CONFIG_RTC_CLASS | 49 | #ifdef CONFIG_RTC_CLASS |
| 46 | /* rtc timer and device for setting alarm wakeups at suspend */ | 50 | /* rtc timer and device for setting alarm wakeups at suspend */ |
| 47 | static struct rtc_timer rtctimer; | 51 | static struct rtc_timer rtctimer; |
| 48 | static struct rtc_device *rtcdev; | 52 | static struct rtc_device *rtcdev; |
| 49 | #endif | 53 | static DEFINE_SPINLOCK(rtcdev_lock); |
| 50 | 54 | ||
| 51 | /* freezer delta & lock used to handle clock_nanosleep triggered wakeups */ | 55 | /** |
| 52 | static ktime_t freezer_delta; | 56 | * has_wakealarm - check rtc device has wakealarm ability |
| 53 | static DEFINE_SPINLOCK(freezer_delta_lock); | 57 | * @dev: current device |
| 58 | * @name_ptr: name to be returned | ||
| 59 | * | ||
| 60 | * This helper function checks to see if the rtc device can wake | ||
| 61 | * from suspend. | ||
| 62 | */ | ||
| 63 | static int has_wakealarm(struct device *dev, void *name_ptr) | ||
| 64 | { | ||
| 65 | struct rtc_device *candidate = to_rtc_device(dev); | ||
| 66 | |||
| 67 | if (!candidate->ops->set_alarm) | ||
| 68 | return 0; | ||
| 69 | if (!device_may_wakeup(candidate->dev.parent)) | ||
| 70 | return 0; | ||
| 71 | |||
| 72 | *(const char **)name_ptr = dev_name(dev); | ||
| 73 | return 1; | ||
| 74 | } | ||
| 75 | |||
| 76 | /** | ||
| 77 | * alarmtimer_get_rtcdev - Return selected rtcdevice | ||
| 78 | * | ||
| 79 | * This function returns the rtc device to use for wakealarms. | ||
| 80 | * If one has not already been chosen, it checks to see if a | ||
| 81 | * functional rtc device is available. | ||
| 82 | */ | ||
| 83 | static struct rtc_device *alarmtimer_get_rtcdev(void) | ||
| 84 | { | ||
| 85 | struct device *dev; | ||
| 86 | char *str; | ||
| 87 | unsigned long flags; | ||
| 88 | struct rtc_device *ret; | ||
| 89 | |||
| 90 | spin_lock_irqsave(&rtcdev_lock, flags); | ||
| 91 | if (!rtcdev) { | ||
| 92 | /* Find an rtc device and init the rtc_timer */ | ||
| 93 | dev = class_find_device(rtc_class, NULL, &str, has_wakealarm); | ||
| 94 | /* If we have a device then str is valid. See has_wakealarm() */ | ||
| 95 | if (dev) { | ||
| 96 | rtcdev = rtc_class_open(str); | ||
| 97 | /* | ||
| 98 | * Drop the reference we got in class_find_device, | ||
| 99 | * rtc_open takes its own. | ||
| 100 | */ | ||
| 101 | put_device(dev); | ||
| 102 | rtc_timer_init(&rtctimer, NULL, NULL); | ||
| 103 | } | ||
| 104 | } | ||
| 105 | ret = rtcdev; | ||
| 106 | spin_unlock_irqrestore(&rtcdev_lock, flags); | ||
| 107 | |||
| 108 | return ret; | ||
| 109 | } | ||
| 110 | #else | ||
| 111 | #define alarmtimer_get_rtcdev() (0) | ||
| 112 | #define rtcdev (0) | ||
| 113 | #endif | ||
| 54 | 114 | ||
| 55 | 115 | ||
| 56 | /** | 116 | /** |
| @@ -166,6 +226,7 @@ static int alarmtimer_suspend(struct device *dev) | |||
| 166 | struct rtc_time tm; | 226 | struct rtc_time tm; |
| 167 | ktime_t min, now; | 227 | ktime_t min, now; |
| 168 | unsigned long flags; | 228 | unsigned long flags; |
| 229 | struct rtc_device *rtc; | ||
| 169 | int i; | 230 | int i; |
| 170 | 231 | ||
| 171 | spin_lock_irqsave(&freezer_delta_lock, flags); | 232 | spin_lock_irqsave(&freezer_delta_lock, flags); |
| @@ -173,8 +234,9 @@ static int alarmtimer_suspend(struct device *dev) | |||
| 173 | freezer_delta = ktime_set(0, 0); | 234 | freezer_delta = ktime_set(0, 0); |
| 174 | spin_unlock_irqrestore(&freezer_delta_lock, flags); | 235 | spin_unlock_irqrestore(&freezer_delta_lock, flags); |
| 175 | 236 | ||
| 237 | rtc = rtcdev; | ||
| 176 | /* If we have no rtcdev, just return */ | 238 | /* If we have no rtcdev, just return */ |
| 177 | if (!rtcdev) | 239 | if (!rtc) |
| 178 | return 0; | 240 | return 0; |
| 179 | 241 | ||
| 180 | /* Find the soonest timer to expire*/ | 242 | /* Find the soonest timer to expire*/ |
| @@ -199,12 +261,12 @@ static int alarmtimer_suspend(struct device *dev) | |||
| 199 | WARN_ON(min.tv64 < NSEC_PER_SEC); | 261 | WARN_ON(min.tv64 < NSEC_PER_SEC); |
| 200 | 262 | ||
| 201 | /* Setup an rtc timer to fire that far in the future */ | 263 | /* Setup an rtc timer to fire that far in the future */ |
| 202 | rtc_timer_cancel(rtcdev, &rtctimer); | 264 | rtc_timer_cancel(rtc, &rtctimer); |
| 203 | rtc_read_time(rtcdev, &tm); | 265 | rtc_read_time(rtc, &tm); |
| 204 | now = rtc_tm_to_ktime(tm); | 266 | now = rtc_tm_to_ktime(tm); |
| 205 | now = ktime_add(now, min); | 267 | now = ktime_add(now, min); |
| 206 | 268 | ||
| 207 | rtc_timer_start(rtcdev, &rtctimer, now, ktime_set(0, 0)); | 269 | rtc_timer_start(rtc, &rtctimer, now, ktime_set(0, 0)); |
| 208 | 270 | ||
| 209 | return 0; | 271 | return 0; |
| 210 | } | 272 | } |
| @@ -322,6 +384,9 @@ static int alarm_clock_getres(const clockid_t which_clock, struct timespec *tp) | |||
| 322 | { | 384 | { |
| 323 | clockid_t baseid = alarm_bases[clock2alarm(which_clock)].base_clockid; | 385 | clockid_t baseid = alarm_bases[clock2alarm(which_clock)].base_clockid; |
| 324 | 386 | ||
| 387 | if (!alarmtimer_get_rtcdev()) | ||
| 388 | return -ENOTSUPP; | ||
| 389 | |||
| 325 | return hrtimer_get_res(baseid, tp); | 390 | return hrtimer_get_res(baseid, tp); |
| 326 | } | 391 | } |
| 327 | 392 | ||
| @@ -336,6 +401,9 @@ static int alarm_clock_get(clockid_t which_clock, struct timespec *tp) | |||
| 336 | { | 401 | { |
| 337 | struct alarm_base *base = &alarm_bases[clock2alarm(which_clock)]; | 402 | struct alarm_base *base = &alarm_bases[clock2alarm(which_clock)]; |
| 338 | 403 | ||
| 404 | if (!alarmtimer_get_rtcdev()) | ||
| 405 | return -ENOTSUPP; | ||
| 406 | |||
| 339 | *tp = ktime_to_timespec(base->gettime()); | 407 | *tp = ktime_to_timespec(base->gettime()); |
| 340 | return 0; | 408 | return 0; |
| 341 | } | 409 | } |
| @@ -351,6 +419,9 @@ static int alarm_timer_create(struct k_itimer *new_timer) | |||
| 351 | enum alarmtimer_type type; | 419 | enum alarmtimer_type type; |
| 352 | struct alarm_base *base; | 420 | struct alarm_base *base; |
| 353 | 421 | ||
| 422 | if (!alarmtimer_get_rtcdev()) | ||
| 423 | return -ENOTSUPP; | ||
| 424 | |||
| 354 | if (!capable(CAP_WAKE_ALARM)) | 425 | if (!capable(CAP_WAKE_ALARM)) |
| 355 | return -EPERM; | 426 | return -EPERM; |
| 356 | 427 | ||
| @@ -385,6 +456,9 @@ static void alarm_timer_get(struct k_itimer *timr, | |||
| 385 | */ | 456 | */ |
| 386 | static int alarm_timer_del(struct k_itimer *timr) | 457 | static int alarm_timer_del(struct k_itimer *timr) |
| 387 | { | 458 | { |
| 459 | if (!rtcdev) | ||
| 460 | return -ENOTSUPP; | ||
| 461 | |||
| 388 | alarm_cancel(&timr->it.alarmtimer); | 462 | alarm_cancel(&timr->it.alarmtimer); |
| 389 | return 0; | 463 | return 0; |
| 390 | } | 464 | } |
| @@ -402,6 +476,9 @@ static int alarm_timer_set(struct k_itimer *timr, int flags, | |||
| 402 | struct itimerspec *new_setting, | 476 | struct itimerspec *new_setting, |
| 403 | struct itimerspec *old_setting) | 477 | struct itimerspec *old_setting) |
| 404 | { | 478 | { |
| 479 | if (!rtcdev) | ||
| 480 | return -ENOTSUPP; | ||
| 481 | |||
| 405 | /* Save old values */ | 482 | /* Save old values */ |
| 406 | old_setting->it_interval = | 483 | old_setting->it_interval = |
| 407 | ktime_to_timespec(timr->it.alarmtimer.period); | 484 | ktime_to_timespec(timr->it.alarmtimer.period); |
| @@ -541,6 +618,9 @@ static int alarm_timer_nsleep(const clockid_t which_clock, int flags, | |||
| 541 | int ret = 0; | 618 | int ret = 0; |
| 542 | struct restart_block *restart; | 619 | struct restart_block *restart; |
| 543 | 620 | ||
| 621 | if (!alarmtimer_get_rtcdev()) | ||
| 622 | return -ENOTSUPP; | ||
| 623 | |||
| 544 | if (!capable(CAP_WAKE_ALARM)) | 624 | if (!capable(CAP_WAKE_ALARM)) |
| 545 | return -EPERM; | 625 | return -EPERM; |
| 546 | 626 | ||
| @@ -638,65 +718,3 @@ static int __init alarmtimer_init(void) | |||
| 638 | } | 718 | } |
| 639 | device_initcall(alarmtimer_init); | 719 | device_initcall(alarmtimer_init); |
| 640 | 720 | ||
| 641 | #ifdef CONFIG_RTC_CLASS | ||
| 642 | /** | ||
| 643 | * has_wakealarm - check rtc device has wakealarm ability | ||
| 644 | * @dev: current device | ||
| 645 | * @name_ptr: name to be returned | ||
| 646 | * | ||
| 647 | * This helper function checks to see if the rtc device can wake | ||
| 648 | * from suspend. | ||
| 649 | */ | ||
| 650 | static int __init has_wakealarm(struct device *dev, void *name_ptr) | ||
| 651 | { | ||
| 652 | struct rtc_device *candidate = to_rtc_device(dev); | ||
| 653 | |||
| 654 | if (!candidate->ops->set_alarm) | ||
| 655 | return 0; | ||
| 656 | if (!device_may_wakeup(candidate->dev.parent)) | ||
| 657 | return 0; | ||
| 658 | |||
| 659 | *(const char **)name_ptr = dev_name(dev); | ||
| 660 | return 1; | ||
| 661 | } | ||
| 662 | |||
| 663 | /** | ||
| 664 | * alarmtimer_init_late - Late initializing of alarmtimer code | ||
| 665 | * | ||
| 666 | * This function locates a rtc device to use for wakealarms. | ||
| 667 | * Run as late_initcall to make sure rtc devices have been | ||
| 668 | * registered. | ||
| 669 | */ | ||
| 670 | static int __init alarmtimer_init_late(void) | ||
| 671 | { | ||
| 672 | struct device *dev; | ||
| 673 | char *str; | ||
| 674 | |||
| 675 | /* Find an rtc device and init the rtc_timer */ | ||
| 676 | dev = class_find_device(rtc_class, NULL, &str, has_wakealarm); | ||
| 677 | /* If we have a device then str is valid. See has_wakealarm() */ | ||
| 678 | if (dev) { | ||
| 679 | rtcdev = rtc_class_open(str); | ||
| 680 | /* | ||
| 681 | * Drop the reference we got in class_find_device, | ||
| 682 | * rtc_open takes its own. | ||
| 683 | */ | ||
| 684 | put_device(dev); | ||
| 685 | } | ||
| 686 | if (!rtcdev) { | ||
| 687 | printk(KERN_WARNING "No RTC device found, ALARM timers will" | ||
| 688 | " not wake from suspend"); | ||
| 689 | } | ||
| 690 | rtc_timer_init(&rtctimer, NULL, NULL); | ||
| 691 | |||
| 692 | return 0; | ||
| 693 | } | ||
| 694 | #else | ||
| 695 | static int __init alarmtimer_init_late(void) | ||
| 696 | { | ||
| 697 | printk(KERN_WARNING "Kernel not built with RTC support, ALARM timers" | ||
| 698 | " will not wake from suspend"); | ||
| 699 | return 0; | ||
| 700 | } | ||
| 701 | #endif | ||
| 702 | late_initcall(alarmtimer_init_late); | ||
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index 2ca6f4f85b4..e3569bdd3b6 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c | |||
| @@ -27,7 +27,6 @@ | |||
| 27 | #include "hpioctl.h" | 27 | #include "hpioctl.h" |
| 28 | 28 | ||
| 29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
| 30 | #include <linux/version.h> | ||
| 31 | #include <linux/init.h> | 30 | #include <linux/init.h> |
| 32 | #include <linux/jiffies.h> | 31 | #include <linux/jiffies.h> |
| 33 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 61a774b3d3c..d21191dcfe8 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -4883,7 +4883,6 @@ static const struct snd_pci_quirk alc880_cfg_tbl[] = { | |||
| 4883 | SND_PCI_QUIRK(0x1025, 0xe309, "ULI", ALC880_3ST_DIG), | 4883 | SND_PCI_QUIRK(0x1025, 0xe309, "ULI", ALC880_3ST_DIG), |
| 4884 | SND_PCI_QUIRK(0x1025, 0xe310, "ULI", ALC880_3ST), | 4884 | SND_PCI_QUIRK(0x1025, 0xe310, "ULI", ALC880_3ST), |
| 4885 | SND_PCI_QUIRK(0x1039, 0x1234, NULL, ALC880_6ST_DIG), | 4885 | SND_PCI_QUIRK(0x1039, 0x1234, NULL, ALC880_6ST_DIG), |
| 4886 | SND_PCI_QUIRK(0x103c, 0x2a09, "HP", ALC880_5ST), | ||
| 4887 | SND_PCI_QUIRK(0x1043, 0x10b3, "ASUS W1V", ALC880_ASUS_W1V), | 4886 | SND_PCI_QUIRK(0x1043, 0x10b3, "ASUS W1V", ALC880_ASUS_W1V), |
| 4888 | SND_PCI_QUIRK(0x1043, 0x10c2, "ASUS W6A", ALC880_ASUS_DIG), | 4887 | SND_PCI_QUIRK(0x1043, 0x10c2, "ASUS W6A", ALC880_ASUS_DIG), |
| 4889 | SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS Wxx", ALC880_ASUS_DIG), | 4888 | SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS Wxx", ALC880_ASUS_DIG), |
| @@ -12600,6 +12599,7 @@ static const struct hda_verb alc262_toshiba_rx1_unsol_verbs[] = { | |||
| 12600 | */ | 12599 | */ |
| 12601 | enum { | 12600 | enum { |
| 12602 | PINFIX_FSC_H270, | 12601 | PINFIX_FSC_H270, |
| 12602 | PINFIX_HP_Z200, | ||
| 12603 | }; | 12603 | }; |
| 12604 | 12604 | ||
| 12605 | static const struct alc_fixup alc262_fixups[] = { | 12605 | static const struct alc_fixup alc262_fixups[] = { |
| @@ -12612,9 +12612,17 @@ static const struct alc_fixup alc262_fixups[] = { | |||
| 12612 | { } | 12612 | { } |
| 12613 | } | 12613 | } |
| 12614 | }, | 12614 | }, |
| 12615 | [PINFIX_HP_Z200] = { | ||
| 12616 | .type = ALC_FIXUP_PINS, | ||
| 12617 | .v.pins = (const struct alc_pincfg[]) { | ||
| 12618 | { 0x16, 0x99130120 }, /* internal speaker */ | ||
| 12619 | { } | ||
| 12620 | } | ||
| 12621 | }, | ||
| 12615 | }; | 12622 | }; |
| 12616 | 12623 | ||
| 12617 | static const struct snd_pci_quirk alc262_fixup_tbl[] = { | 12624 | static const struct snd_pci_quirk alc262_fixup_tbl[] = { |
| 12625 | SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", PINFIX_HP_Z200), | ||
| 12618 | SND_PCI_QUIRK(0x1734, 0x1147, "FSC Celsius H270", PINFIX_FSC_H270), | 12626 | SND_PCI_QUIRK(0x1734, 0x1147, "FSC Celsius H270", PINFIX_FSC_H270), |
| 12619 | {} | 12627 | {} |
| 12620 | }; | 12628 | }; |
| @@ -12731,6 +12739,8 @@ static const struct snd_pci_quirk alc262_cfg_tbl[] = { | |||
| 12731 | ALC262_HP_BPC), | 12739 | ALC262_HP_BPC), |
| 12732 | SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x1500, "HP z series", | 12740 | SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x1500, "HP z series", |
| 12733 | ALC262_HP_BPC), | 12741 | ALC262_HP_BPC), |
| 12742 | SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", | ||
| 12743 | ALC262_AUTO), | ||
| 12734 | SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x1700, "HP xw series", | 12744 | SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x1700, "HP xw series", |
| 12735 | ALC262_HP_BPC), | 12745 | ALC262_HP_BPC), |
| 12736 | SND_PCI_QUIRK(0x103c, 0x2800, "HP D7000", ALC262_HP_BPC_D7000_WL), | 12746 | SND_PCI_QUIRK(0x103c, 0x2800, "HP D7000", ALC262_HP_BPC_D7000_WL), |
| @@ -13872,7 +13882,6 @@ static const struct snd_pci_quirk alc268_cfg_tbl[] = { | |||
| 13872 | SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), | 13882 | SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), |
| 13873 | SND_PCI_QUIRK(0x1170, 0x0040, "ZEPTO", ALC268_ZEPTO), | 13883 | SND_PCI_QUIRK(0x1170, 0x0040, "ZEPTO", ALC268_ZEPTO), |
| 13874 | SND_PCI_QUIRK(0x14c0, 0x0025, "COMPAL IFL90/JFL-92", ALC268_TOSHIBA), | 13884 | SND_PCI_QUIRK(0x14c0, 0x0025, "COMPAL IFL90/JFL-92", ALC268_TOSHIBA), |
| 13875 | SND_PCI_QUIRK(0x152d, 0x0763, "Diverse (CPR2000)", ALC268_ACER), | ||
| 13876 | SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1), | 13885 | SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1), |
| 13877 | {} | 13886 | {} |
| 13878 | }; | 13887 | }; |
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index c952582fb21..f43bb0eaed8 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
| @@ -745,12 +745,23 @@ static int via_independent_hp_put(struct snd_kcontrol *kcontrol, | |||
| 745 | struct via_spec *spec = codec->spec; | 745 | struct via_spec *spec = codec->spec; |
| 746 | hda_nid_t nid = kcontrol->private_value; | 746 | hda_nid_t nid = kcontrol->private_value; |
| 747 | unsigned int pinsel = ucontrol->value.enumerated.item[0]; | 747 | unsigned int pinsel = ucontrol->value.enumerated.item[0]; |
| 748 | unsigned int parm0, parm1; | ||
| 748 | /* Get Independent Mode index of headphone pin widget */ | 749 | /* Get Independent Mode index of headphone pin widget */ |
| 749 | spec->hp_independent_mode = spec->hp_independent_mode_index == pinsel | 750 | spec->hp_independent_mode = spec->hp_independent_mode_index == pinsel |
| 750 | ? 1 : 0; | 751 | ? 1 : 0; |
| 751 | if (spec->codec_type == VT1718S) | 752 | if (spec->codec_type == VT1718S) { |
| 752 | snd_hda_codec_write(codec, nid, 0, | 753 | snd_hda_codec_write(codec, nid, 0, |
| 753 | AC_VERB_SET_CONNECT_SEL, pinsel ? 2 : 0); | 754 | AC_VERB_SET_CONNECT_SEL, pinsel ? 2 : 0); |
| 755 | /* Set correct mute switch for MW3 */ | ||
| 756 | parm0 = spec->hp_independent_mode ? | ||
| 757 | AMP_IN_UNMUTE(0) : AMP_IN_MUTE(0); | ||
| 758 | parm1 = spec->hp_independent_mode ? | ||
| 759 | AMP_IN_MUTE(1) : AMP_IN_UNMUTE(1); | ||
| 760 | snd_hda_codec_write(codec, 0x1b, 0, | ||
| 761 | AC_VERB_SET_AMP_GAIN_MUTE, parm0); | ||
| 762 | snd_hda_codec_write(codec, 0x1b, 0, | ||
| 763 | AC_VERB_SET_AMP_GAIN_MUTE, parm1); | ||
| 764 | } | ||
| 754 | else | 765 | else |
| 755 | snd_hda_codec_write(codec, nid, 0, | 766 | snd_hda_codec_write(codec, nid, 0, |
| 756 | AC_VERB_SET_CONNECT_SEL, pinsel); | 767 | AC_VERB_SET_CONNECT_SEL, pinsel); |
| @@ -4283,9 +4294,6 @@ static const struct hda_verb vt1718S_volume_init_verbs[] = { | |||
| 4283 | {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, | 4294 | {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, |
| 4284 | {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, | 4295 | {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, |
| 4285 | {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(5)}, | 4296 | {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(5)}, |
| 4286 | |||
| 4287 | /* Setup default input of Front HP to MW9 */ | ||
| 4288 | {0x28, AC_VERB_SET_CONNECT_SEL, 0x1}, | ||
| 4289 | /* PW9 PW10 Output enable */ | 4297 | /* PW9 PW10 Output enable */ |
| 4290 | {0x2d, AC_VERB_SET_PIN_WIDGET_CONTROL, AC_PINCTL_OUT_EN}, | 4298 | {0x2d, AC_VERB_SET_PIN_WIDGET_CONTROL, AC_PINCTL_OUT_EN}, |
| 4291 | {0x2e, AC_VERB_SET_PIN_WIDGET_CONTROL, AC_PINCTL_OUT_EN}, | 4299 | {0x2e, AC_VERB_SET_PIN_WIDGET_CONTROL, AC_PINCTL_OUT_EN}, |
| @@ -4294,10 +4302,10 @@ static const struct hda_verb vt1718S_volume_init_verbs[] = { | |||
| 4294 | /* Enable Boost Volume backdoor */ | 4302 | /* Enable Boost Volume backdoor */ |
| 4295 | {0x1, 0xf88, 0x8}, | 4303 | {0x1, 0xf88, 0x8}, |
| 4296 | /* MW0/1/2/3/4: un-mute index 0 (AOWx), mute index 1 (MW9) */ | 4304 | /* MW0/1/2/3/4: un-mute index 0 (AOWx), mute index 1 (MW9) */ |
| 4297 | {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 4305 | {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, |
| 4298 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 4306 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
| 4299 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 4307 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
| 4300 | {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 4308 | {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, |
| 4301 | {0x1c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 4309 | {0x1c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
| 4302 | {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | 4310 | {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, |
| 4303 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | 4311 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, |
| @@ -4307,8 +4315,6 @@ static const struct hda_verb vt1718S_volume_init_verbs[] = { | |||
| 4307 | /* set MUX1 = 2 (AOW4), MUX2 = 1 (AOW3) */ | 4315 | /* set MUX1 = 2 (AOW4), MUX2 = 1 (AOW3) */ |
| 4308 | {0x34, AC_VERB_SET_CONNECT_SEL, 0x2}, | 4316 | {0x34, AC_VERB_SET_CONNECT_SEL, 0x2}, |
| 4309 | {0x35, AC_VERB_SET_CONNECT_SEL, 0x1}, | 4317 | {0x35, AC_VERB_SET_CONNECT_SEL, 0x1}, |
| 4310 | /* Unmute MW4's index 0 */ | ||
| 4311 | {0x1c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
| 4312 | { } | 4318 | { } |
| 4313 | }; | 4319 | }; |
| 4314 | 4320 | ||
| @@ -4456,6 +4462,19 @@ static int vt1718S_auto_create_multi_out_ctls(struct via_spec *spec, | |||
| 4456 | if (err < 0) | 4462 | if (err < 0) |
| 4457 | return err; | 4463 | return err; |
| 4458 | } else if (i == AUTO_SEQ_FRONT) { | 4464 | } else if (i == AUTO_SEQ_FRONT) { |
| 4465 | /* add control to mixer index 0 */ | ||
| 4466 | err = via_add_control(spec, VIA_CTL_WIDGET_VOL, | ||
| 4467 | "Master Front Playback Volume", | ||
| 4468 | HDA_COMPOSE_AMP_VAL(0x21, 3, 5, | ||
| 4469 | HDA_INPUT)); | ||
| 4470 | if (err < 0) | ||
| 4471 | return err; | ||
| 4472 | err = via_add_control(spec, VIA_CTL_WIDGET_MUTE, | ||
| 4473 | "Master Front Playback Switch", | ||
| 4474 | HDA_COMPOSE_AMP_VAL(0x21, 3, 5, | ||
| 4475 | HDA_INPUT)); | ||
| 4476 | if (err < 0) | ||
| 4477 | return err; | ||
| 4459 | /* Front */ | 4478 | /* Front */ |
| 4460 | sprintf(name, "%s Playback Volume", chname[i]); | 4479 | sprintf(name, "%s Playback Volume", chname[i]); |
| 4461 | err = via_add_control( | 4480 | err = via_add_control( |
diff --git a/sound/soc/codecs/wm8991.c b/sound/soc/codecs/wm8991.c index 3c2ee1bb73c..6af23d06870 100644 --- a/sound/soc/codecs/wm8991.c +++ b/sound/soc/codecs/wm8991.c | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | 13 | ||
| 14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 15 | #include <linux/moduleparam.h> | 15 | #include <linux/moduleparam.h> |
| 16 | #include <linux/version.h> | ||
| 17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
| 18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
| 19 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
diff --git a/sound/soc/imx/Kconfig b/sound/soc/imx/Kconfig index d8f130d39dd..bb699bb55a5 100644 --- a/sound/soc/imx/Kconfig +++ b/sound/soc/imx/Kconfig | |||
| @@ -11,9 +11,6 @@ menuconfig SND_IMX_SOC | |||
| 11 | 11 | ||
| 12 | if SND_IMX_SOC | 12 | if SND_IMX_SOC |
| 13 | 13 | ||
| 14 | config SND_MXC_SOC_SSI | ||
| 15 | tristate | ||
| 16 | |||
| 17 | config SND_MXC_SOC_FIQ | 14 | config SND_MXC_SOC_FIQ |
| 18 | tristate | 15 | tristate |
| 19 | 16 | ||
| @@ -24,7 +21,6 @@ config SND_MXC_SOC_WM1133_EV1 | |||
| 24 | tristate "Audio on the the i.MX31ADS with WM1133-EV1 fitted" | 21 | tristate "Audio on the the i.MX31ADS with WM1133-EV1 fitted" |
| 25 | depends on MACH_MX31ADS_WM1133_EV1 && EXPERIMENTAL | 22 | depends on MACH_MX31ADS_WM1133_EV1 && EXPERIMENTAL |
| 26 | select SND_SOC_WM8350 | 23 | select SND_SOC_WM8350 |
| 27 | select SND_MXC_SOC_SSI | ||
| 28 | select SND_MXC_SOC_FIQ | 24 | select SND_MXC_SOC_FIQ |
| 29 | help | 25 | help |
| 30 | Enable support for audio on the i.MX31ADS with the WM1133-EV1 | 26 | Enable support for audio on the i.MX31ADS with the WM1133-EV1 |
| @@ -34,7 +30,6 @@ config SND_SOC_MX27VIS_AIC32X4 | |||
| 34 | tristate "SoC audio support for Visstrim M10 boards" | 30 | tristate "SoC audio support for Visstrim M10 boards" |
| 35 | depends on MACH_IMX27_VISSTRIM_M10 | 31 | depends on MACH_IMX27_VISSTRIM_M10 |
| 36 | select SND_SOC_TVL320AIC32X4 | 32 | select SND_SOC_TVL320AIC32X4 |
| 37 | select SND_MXC_SOC_SSI | ||
| 38 | select SND_MXC_SOC_MX2 | 33 | select SND_MXC_SOC_MX2 |
| 39 | help | 34 | help |
| 40 | Say Y if you want to add support for SoC audio on Visstrim SM10 | 35 | Say Y if you want to add support for SoC audio on Visstrim SM10 |
| @@ -44,7 +39,6 @@ config SND_SOC_PHYCORE_AC97 | |||
| 44 | tristate "SoC Audio support for Phytec phyCORE (and phyCARD) boards" | 39 | tristate "SoC Audio support for Phytec phyCORE (and phyCARD) boards" |
| 45 | depends on MACH_PCM043 || MACH_PCA100 | 40 | depends on MACH_PCM043 || MACH_PCA100 |
| 46 | select SND_SOC_WM9712 | 41 | select SND_SOC_WM9712 |
| 47 | select SND_MXC_SOC_SSI | ||
| 48 | select SND_MXC_SOC_FIQ | 42 | select SND_MXC_SOC_FIQ |
| 49 | help | 43 | help |
| 50 | Say Y if you want to add support for SoC audio on Phytec phyCORE | 44 | Say Y if you want to add support for SoC audio on Phytec phyCORE |
| @@ -57,7 +51,6 @@ config SND_SOC_EUKREA_TLV320 | |||
| 57 | || MACH_EUKREA_MBIMXSD35_BASEBOARD \ | 51 | || MACH_EUKREA_MBIMXSD35_BASEBOARD \ |
| 58 | || MACH_EUKREA_MBIMXSD51_BASEBOARD | 52 | || MACH_EUKREA_MBIMXSD51_BASEBOARD |
| 59 | select SND_SOC_TLV320AIC23 | 53 | select SND_SOC_TLV320AIC23 |
| 60 | select SND_MXC_SOC_SSI | ||
| 61 | select SND_MXC_SOC_FIQ | 54 | select SND_MXC_SOC_FIQ |
| 62 | help | 55 | help |
| 63 | Enable I2S based access to the TLV320AIC23B codec attached | 56 | Enable I2S based access to the TLV320AIC23B codec attached |
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c index aab7765f401..4173b3d87f9 100644 --- a/sound/soc/imx/imx-pcm-dma-mx2.c +++ b/sound/soc/imx/imx-pcm-dma-mx2.c | |||
| @@ -337,3 +337,5 @@ static void __exit snd_imx_pcm_exit(void) | |||
| 337 | platform_driver_unregister(&imx_pcm_driver); | 337 | platform_driver_unregister(&imx_pcm_driver); |
| 338 | } | 338 | } |
| 339 | module_exit(snd_imx_pcm_exit); | 339 | module_exit(snd_imx_pcm_exit); |
| 340 | MODULE_LICENSE("GPL"); | ||
| 341 | MODULE_ALIAS("platform:imx-pcm-audio"); | ||
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c index 5b13feca753..61fceb09cdb 100644 --- a/sound/soc/imx/imx-ssi.c +++ b/sound/soc/imx/imx-ssi.c | |||
| @@ -774,4 +774,4 @@ module_exit(imx_ssi_exit); | |||
| 774 | MODULE_AUTHOR("Sascha Hauer, <s.hauer@pengutronix.de>"); | 774 | MODULE_AUTHOR("Sascha Hauer, <s.hauer@pengutronix.de>"); |
| 775 | MODULE_DESCRIPTION("i.MX I2S/ac97 SoC Interface"); | 775 | MODULE_DESCRIPTION("i.MX I2S/ac97 SoC Interface"); |
| 776 | MODULE_LICENSE("GPL"); | 776 | MODULE_LICENSE("GPL"); |
| 777 | 777 | MODULE_ALIAS("platform:imx-ssi"); | |
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c index 2ce0b2d891d..fab20a54e86 100644 --- a/sound/soc/pxa/pxa2xx-pcm.c +++ b/sound/soc/pxa/pxa2xx-pcm.c | |||
| @@ -95,14 +95,14 @@ static int pxa2xx_soc_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, | |||
| 95 | if (!card->dev->coherent_dma_mask) | 95 | if (!card->dev->coherent_dma_mask) |
| 96 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); | 96 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); |
| 97 | 97 | ||
| 98 | if (dai->driver->playback.channels_min) { | 98 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
| 99 | ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, | 99 | ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, |
| 100 | SNDRV_PCM_STREAM_PLAYBACK); | 100 | SNDRV_PCM_STREAM_PLAYBACK); |
| 101 | if (ret) | 101 | if (ret) |
| 102 | goto out; | 102 | goto out; |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | if (dai->driver->capture.channels_min) { | 105 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
| 106 | ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, | 106 | ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, |
| 107 | SNDRV_PCM_STREAM_CAPTURE); | 107 | SNDRV_PCM_STREAM_CAPTURE); |
| 108 | if (ret) | 108 | if (ret) |
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index c005ceb70c9..039b9532b27 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c | |||
| @@ -409,9 +409,6 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, | |||
| 409 | codec->bulk_write_raw = snd_soc_hw_bulk_write_raw; | 409 | codec->bulk_write_raw = snd_soc_hw_bulk_write_raw; |
| 410 | 410 | ||
| 411 | switch (control) { | 411 | switch (control) { |
| 412 | case SND_SOC_CUSTOM: | ||
| 413 | break; | ||
| 414 | |||
| 415 | case SND_SOC_I2C: | 412 | case SND_SOC_I2C: |
| 416 | #if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE)) | 413 | #if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE)) |
| 417 | codec->hw_write = (hw_write_t)i2c_master_send; | 414 | codec->hw_write = (hw_write_t)i2c_master_send; |
