aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-08-20 15:26:04 -0400
committerTakashi Iwai <tiwai@suse.de>2012-08-20 15:26:04 -0400
commitf0b433e9f362e0b7f0ce7d1489dd7feba068605d (patch)
treed4bfd9489cf4a96a55d83af20919f477a846d585 /sound
parentfa2f5bf09610d3c216d4c74855edbe00d636467c (diff)
parent28c42c28309244d0b15d1b385e33429d59997679 (diff)
Merge tag 'asoc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Additional updates for 3.6 A batch more bugfixes, all driver-specific and fairly small and unremarkable in a global context. The biggest batch are for the newly added Arizona drivers.
Diffstat (limited to 'sound')
-rw-r--r--sound/aoa/codecs/onyx.c75
-rw-r--r--sound/aoa/codecs/tas.c80
-rw-r--r--sound/core/misc.c13
-rw-r--r--sound/i2c/other/tea575x-tuner.c45
-rw-r--r--sound/oss/vwsnd.c2
-rw-r--r--sound/soc/blackfin/bf6xx-sport.c7
-rw-r--r--sound/soc/codecs/twl6040.c2
-rw-r--r--sound/soc/codecs/wm5102.c25
-rw-r--r--sound/soc/codecs/wm5110.c12
-rw-r--r--sound/soc/codecs/wm8962.c15
-rw-r--r--sound/soc/codecs/wm8994.c2
-rw-r--r--sound/soc/codecs/wm9712.c21
-rw-r--r--sound/soc/davinci/davinci-mcasp.c10
-rw-r--r--sound/soc/fsl/imx-pcm-fiq.c1
-rw-r--r--sound/soc/fsl/imx-ssi.c5
-rw-r--r--sound/soc/kirkwood/kirkwood-i2s.c8
-rw-r--r--sound/soc/mxs/Kconfig2
-rw-r--r--sound/soc/omap/mcbsp.c2
-rw-r--r--sound/soc/samsung/dma.c18
-rw-r--r--sound/soc/samsung/pcm.c2
-rw-r--r--sound/soc/sh/fsi.c4
-rw-r--r--sound/soc/sh/siu_pcm.c12
-rw-r--r--sound/soc/soc-core.c10
-rw-r--r--sound/soc/soc-dapm.c2
-rw-r--r--sound/soc/soc-jack.c2
-rw-r--r--sound/soc/tegra/Kconfig10
-rw-r--r--sound/soc/tegra/tegra20_i2s.c4
-rw-r--r--sound/soc/tegra/tegra20_spdif.c4
-rw-r--r--sound/soc/tegra/tegra30_ahub.c8
-rw-r--r--sound/soc/tegra/tegra30_i2s.c4
-rw-r--r--sound/soc/tegra/tegra_asoc_utils.c12
-rw-r--r--sound/sound_firmware.c8
32 files changed, 160 insertions, 267 deletions
diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c
index 270790d384e2..4cedc6950d72 100644
--- a/sound/aoa/codecs/onyx.c
+++ b/sound/aoa/codecs/onyx.c
@@ -997,45 +997,10 @@ static void onyx_exit_codec(struct aoa_codec *codec)
997 onyx->codec.soundbus_dev->detach_codec(onyx->codec.soundbus_dev, onyx); 997 onyx->codec.soundbus_dev->detach_codec(onyx->codec.soundbus_dev, onyx);
998} 998}
999 999
1000static int onyx_create(struct i2c_adapter *adapter,
1001 struct device_node *node,
1002 int addr)
1003{
1004 struct i2c_board_info info;
1005 struct i2c_client *client;
1006
1007 memset(&info, 0, sizeof(struct i2c_board_info));
1008 strlcpy(info.type, "aoa_codec_onyx", I2C_NAME_SIZE);
1009 info.addr = addr;
1010 info.platform_data = node;
1011 client = i2c_new_device(adapter, &info);
1012 if (!client)
1013 return -ENODEV;
1014
1015 /*
1016 * We know the driver is already loaded, so the device should be
1017 * already bound. If not it means binding failed, which suggests
1018 * the device doesn't really exist and should be deleted.
1019 * Ideally this would be replaced by better checks _before_
1020 * instantiating the device.
1021 */
1022 if (!client->driver) {
1023 i2c_unregister_device(client);
1024 return -ENODEV;
1025 }
1026
1027 /*
1028 * Let i2c-core delete that device on driver removal.
1029 * This is safe because i2c-core holds the core_lock mutex for us.
1030 */
1031 list_add_tail(&client->detected, &client->driver->clients);
1032 return 0;
1033}
1034
1035static int onyx_i2c_probe(struct i2c_client *client, 1000static int onyx_i2c_probe(struct i2c_client *client,
1036 const struct i2c_device_id *id) 1001 const struct i2c_device_id *id)
1037{ 1002{
1038 struct device_node *node = client->dev.platform_data; 1003 struct device_node *node = client->dev.of_node;
1039 struct onyx *onyx; 1004 struct onyx *onyx;
1040 u8 dummy; 1005 u8 dummy;
1041 1006
@@ -1071,40 +1036,6 @@ static int onyx_i2c_probe(struct i2c_client *client,
1071 return -ENODEV; 1036 return -ENODEV;
1072} 1037}
1073 1038
1074static int onyx_i2c_attach(struct i2c_adapter *adapter)
1075{
1076 struct device_node *busnode, *dev = NULL;
1077 struct pmac_i2c_bus *bus;
1078
1079 bus = pmac_i2c_adapter_to_bus(adapter);
1080 if (bus == NULL)
1081 return -ENODEV;
1082 busnode = pmac_i2c_get_bus_node(bus);
1083
1084 while ((dev = of_get_next_child(busnode, dev)) != NULL) {
1085 if (of_device_is_compatible(dev, "pcm3052")) {
1086 const u32 *addr;
1087 printk(KERN_DEBUG PFX "found pcm3052\n");
1088 addr = of_get_property(dev, "reg", NULL);
1089 if (!addr)
1090 return -ENODEV;
1091 return onyx_create(adapter, dev, (*addr)>>1);
1092 }
1093 }
1094
1095 /* if that didn't work, try desperate mode for older
1096 * machines that have stuff missing from the device tree */
1097
1098 if (!of_device_is_compatible(busnode, "k2-i2c"))
1099 return -ENODEV;
1100
1101 printk(KERN_DEBUG PFX "found k2-i2c, checking if onyx chip is on it\n");
1102 /* probe both possible addresses for the onyx chip */
1103 if (onyx_create(adapter, NULL, 0x46) == 0)
1104 return 0;
1105 return onyx_create(adapter, NULL, 0x47);
1106}
1107
1108static int onyx_i2c_remove(struct i2c_client *client) 1039static int onyx_i2c_remove(struct i2c_client *client)
1109{ 1040{
1110 struct onyx *onyx = i2c_get_clientdata(client); 1041 struct onyx *onyx = i2c_get_clientdata(client);
@@ -1117,16 +1048,16 @@ static int onyx_i2c_remove(struct i2c_client *client)
1117} 1048}
1118 1049
1119static const struct i2c_device_id onyx_i2c_id[] = { 1050static const struct i2c_device_id onyx_i2c_id[] = {
1120 { "aoa_codec_onyx", 0 }, 1051 { "MAC,pcm3052", 0 },
1121 { } 1052 { }
1122}; 1053};
1054MODULE_DEVICE_TABLE(i2c,onyx_i2c_id);
1123 1055
1124static struct i2c_driver onyx_driver = { 1056static struct i2c_driver onyx_driver = {
1125 .driver = { 1057 .driver = {
1126 .name = "aoa_codec_onyx", 1058 .name = "aoa_codec_onyx",
1127 .owner = THIS_MODULE, 1059 .owner = THIS_MODULE,
1128 }, 1060 },
1129 .attach_adapter = onyx_i2c_attach,
1130 .probe = onyx_i2c_probe, 1061 .probe = onyx_i2c_probe,
1131 .remove = onyx_i2c_remove, 1062 .remove = onyx_i2c_remove,
1132 .id_table = onyx_i2c_id, 1063 .id_table = onyx_i2c_id,
diff --git a/sound/aoa/codecs/tas.c b/sound/aoa/codecs/tas.c
index 8e63d1f35ce1..c491ae0f749c 100644
--- a/sound/aoa/codecs/tas.c
+++ b/sound/aoa/codecs/tas.c
@@ -883,43 +883,10 @@ static void tas_exit_codec(struct aoa_codec *codec)
883} 883}
884 884
885 885
886static int tas_create(struct i2c_adapter *adapter,
887 struct device_node *node,
888 int addr)
889{
890 struct i2c_board_info info;
891 struct i2c_client *client;
892
893 memset(&info, 0, sizeof(struct i2c_board_info));
894 strlcpy(info.type, "aoa_codec_tas", I2C_NAME_SIZE);
895 info.addr = addr;
896 info.platform_data = node;
897
898 client = i2c_new_device(adapter, &info);
899 if (!client)
900 return -ENODEV;
901 /*
902 * We know the driver is already loaded, so the device should be
903 * already bound. If not it means binding failed, and then there
904 * is no point in keeping the device instantiated.
905 */
906 if (!client->driver) {
907 i2c_unregister_device(client);
908 return -ENODEV;
909 }
910
911 /*
912 * Let i2c-core delete that device on driver removal.
913 * This is safe because i2c-core holds the core_lock mutex for us.
914 */
915 list_add_tail(&client->detected, &client->driver->clients);
916 return 0;
917}
918
919static int tas_i2c_probe(struct i2c_client *client, 886static int tas_i2c_probe(struct i2c_client *client,
920 const struct i2c_device_id *id) 887 const struct i2c_device_id *id)
921{ 888{
922 struct device_node *node = client->dev.platform_data; 889 struct device_node *node = client->dev.of_node;
923 struct tas *tas; 890 struct tas *tas;
924 891
925 tas = kzalloc(sizeof(struct tas), GFP_KERNEL); 892 tas = kzalloc(sizeof(struct tas), GFP_KERNEL);
@@ -953,47 +920,6 @@ static int tas_i2c_probe(struct i2c_client *client,
953 return -EINVAL; 920 return -EINVAL;
954} 921}
955 922
956static int tas_i2c_attach(struct i2c_adapter *adapter)
957{
958 struct device_node *busnode, *dev = NULL;
959 struct pmac_i2c_bus *bus;
960
961 bus = pmac_i2c_adapter_to_bus(adapter);
962 if (bus == NULL)
963 return -ENODEV;
964 busnode = pmac_i2c_get_bus_node(bus);
965
966 while ((dev = of_get_next_child(busnode, dev)) != NULL) {
967 if (of_device_is_compatible(dev, "tas3004")) {
968 const u32 *addr;
969 printk(KERN_DEBUG PFX "found tas3004\n");
970 addr = of_get_property(dev, "reg", NULL);
971 if (!addr)
972 continue;
973 return tas_create(adapter, dev, ((*addr) >> 1) & 0x7f);
974 }
975 /* older machines have no 'codec' node with a 'compatible'
976 * property that says 'tas3004', they just have a 'deq'
977 * node without any such property... */
978 if (strcmp(dev->name, "deq") == 0) {
979 const u32 *_addr;
980 u32 addr;
981 printk(KERN_DEBUG PFX "found 'deq' node\n");
982 _addr = of_get_property(dev, "i2c-address", NULL);
983 if (!_addr)
984 continue;
985 addr = ((*_addr) >> 1) & 0x7f;
986 /* now, if the address doesn't match any of the two
987 * that a tas3004 can have, we cannot handle this.
988 * I doubt it ever happens but hey. */
989 if (addr != 0x34 && addr != 0x35)
990 continue;
991 return tas_create(adapter, dev, addr);
992 }
993 }
994 return -ENODEV;
995}
996
997static int tas_i2c_remove(struct i2c_client *client) 923static int tas_i2c_remove(struct i2c_client *client)
998{ 924{
999 struct tas *tas = i2c_get_clientdata(client); 925 struct tas *tas = i2c_get_clientdata(client);
@@ -1011,16 +937,16 @@ static int tas_i2c_remove(struct i2c_client *client)
1011} 937}
1012 938
1013static const struct i2c_device_id tas_i2c_id[] = { 939static const struct i2c_device_id tas_i2c_id[] = {
1014 { "aoa_codec_tas", 0 }, 940 { "MAC,tas3004", 0 },
1015 { } 941 { }
1016}; 942};
943MODULE_DEVICE_TABLE(i2c,tas_i2c_id);
1017 944
1018static struct i2c_driver tas_driver = { 945static struct i2c_driver tas_driver = {
1019 .driver = { 946 .driver = {
1020 .name = "aoa_codec_tas", 947 .name = "aoa_codec_tas",
1021 .owner = THIS_MODULE, 948 .owner = THIS_MODULE,
1022 }, 949 },
1023 .attach_adapter = tas_i2c_attach,
1024 .probe = tas_i2c_probe, 950 .probe = tas_i2c_probe,
1025 .remove = tas_i2c_remove, 951 .remove = tas_i2c_remove,
1026 .id_table = tas_i2c_id, 952 .id_table = tas_i2c_id,
diff --git a/sound/core/misc.c b/sound/core/misc.c
index 768167925409..30e027ecf4da 100644
--- a/sound/core/misc.c
+++ b/sound/core/misc.c
@@ -68,6 +68,7 @@ void __snd_printk(unsigned int level, const char *path, int line,
68{ 68{
69 va_list args; 69 va_list args;
70#ifdef CONFIG_SND_VERBOSE_PRINTK 70#ifdef CONFIG_SND_VERBOSE_PRINTK
71 int kern_level;
71 struct va_format vaf; 72 struct va_format vaf;
72 char verbose_fmt[] = KERN_DEFAULT "ALSA %s:%d %pV"; 73 char verbose_fmt[] = KERN_DEFAULT "ALSA %s:%d %pV";
73#endif 74#endif
@@ -81,12 +82,16 @@ void __snd_printk(unsigned int level, const char *path, int line,
81#ifdef CONFIG_SND_VERBOSE_PRINTK 82#ifdef CONFIG_SND_VERBOSE_PRINTK
82 vaf.fmt = format; 83 vaf.fmt = format;
83 vaf.va = &args; 84 vaf.va = &args;
84 if (format[0] == '<' && format[2] == '>') { 85
85 memcpy(verbose_fmt, format, 3); 86 kern_level = printk_get_level(format);
86 vaf.fmt = format + 3; 87 if (kern_level) {
88 const char *end_of_header = printk_skip_level(format);
89 memcpy(verbose_fmt, format, end_of_header - format);
90 vaf.fmt = end_of_header;
87 } else if (level) 91 } else if (level)
88 memcpy(verbose_fmt, KERN_DEBUG, 3); 92 memcpy(verbose_fmt, KERN_DEBUG, sizeof(KERN_DEBUG) - 1);
89 printk(verbose_fmt, sanity_file_name(path), line, &vaf); 93 printk(verbose_fmt, sanity_file_name(path), line, &vaf);
94
90#else 95#else
91 vprintk(format, args); 96 vprintk(format, args);
92#endif 97#endif
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c
index 7eca25fae413..d14edb7d6484 100644
--- a/sound/i2c/other/tea575x-tuner.c
+++ b/sound/i2c/other/tea575x-tuner.c
@@ -71,6 +71,9 @@ static void snd_tea575x_write(struct snd_tea575x *tea, unsigned int val)
71 u16 l; 71 u16 l;
72 u8 data; 72 u8 data;
73 73
74 if (tea->ops->write_val)
75 return tea->ops->write_val(tea, val);
76
74 tea->ops->set_direction(tea, 1); 77 tea->ops->set_direction(tea, 1);
75 udelay(16); 78 udelay(16);
76 79
@@ -94,6 +97,9 @@ static u32 snd_tea575x_read(struct snd_tea575x *tea)
94 u16 l, rdata; 97 u16 l, rdata;
95 u32 data = 0; 98 u32 data = 0;
96 99
100 if (tea->ops->read_val)
101 return tea->ops->read_val(tea);
102
97 tea->ops->set_direction(tea, 0); 103 tea->ops->set_direction(tea, 0);
98 tea->ops->set_pins(tea, 0); 104 tea->ops->set_pins(tea, 0);
99 udelay(16); 105 udelay(16);
@@ -197,6 +203,8 @@ static int vidioc_g_tuner(struct file *file, void *priv,
197 strcpy(v->name, "FM"); 203 strcpy(v->name, "FM");
198 v->type = V4L2_TUNER_RADIO; 204 v->type = V4L2_TUNER_RADIO;
199 v->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO; 205 v->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;
206 if (!tea->cannot_read_data)
207 v->capability |= V4L2_TUNER_CAP_HWSEEK_BOUNDED;
200 v->rangelow = FREQ_LO; 208 v->rangelow = FREQ_LO;
201 v->rangehigh = FREQ_HI; 209 v->rangehigh = FREQ_HI;
202 v->rxsubchans = tea->stereo ? V4L2_TUNER_SUB_STEREO : V4L2_TUNER_SUB_MONO; 210 v->rxsubchans = tea->stereo ? V4L2_TUNER_SUB_STEREO : V4L2_TUNER_SUB_MONO;
@@ -305,7 +313,7 @@ static int vidioc_s_hw_freq_seek(struct file *file, void *fh,
305 } 313 }
306 tea->val &= ~TEA575X_BIT_SEARCH; 314 tea->val &= ~TEA575X_BIT_SEARCH;
307 snd_tea575x_set_freq(tea); 315 snd_tea575x_set_freq(tea);
308 return -EAGAIN; 316 return -ENODATA;
309} 317}
310 318
311static int tea575x_s_ctrl(struct v4l2_ctrl *ctrl) 319static int tea575x_s_ctrl(struct v4l2_ctrl *ctrl)
@@ -377,7 +385,6 @@ int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner)
377 strlcpy(tea->vd.name, tea->v4l2_dev->name, sizeof(tea->vd.name)); 385 strlcpy(tea->vd.name, tea->v4l2_dev->name, sizeof(tea->vd.name));
378 tea->vd.lock = &tea->mutex; 386 tea->vd.lock = &tea->mutex;
379 tea->vd.v4l2_dev = tea->v4l2_dev; 387 tea->vd.v4l2_dev = tea->v4l2_dev;
380 tea->vd.ctrl_handler = &tea->ctrl_handler;
381 tea->fops = tea575x_fops; 388 tea->fops = tea575x_fops;
382 tea->fops.owner = owner; 389 tea->fops.owner = owner;
383 tea->vd.fops = &tea->fops; 390 tea->vd.fops = &tea->fops;
@@ -386,29 +393,33 @@ int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner)
386 if (tea->cannot_read_data) 393 if (tea->cannot_read_data)
387 v4l2_disable_ioctl(&tea->vd, VIDIOC_S_HW_FREQ_SEEK); 394 v4l2_disable_ioctl(&tea->vd, VIDIOC_S_HW_FREQ_SEEK);
388 395
389 v4l2_ctrl_handler_init(&tea->ctrl_handler, 1); 396 if (!tea->cannot_mute) {
390 v4l2_ctrl_new_std(&tea->ctrl_handler, &tea575x_ctrl_ops, V4L2_CID_AUDIO_MUTE, 0, 1, 1, 1); 397 tea->vd.ctrl_handler = &tea->ctrl_handler;
391 retval = tea->ctrl_handler.error; 398 v4l2_ctrl_handler_init(&tea->ctrl_handler, 1);
392 if (retval) { 399 v4l2_ctrl_new_std(&tea->ctrl_handler, &tea575x_ctrl_ops,
393 v4l2_err(tea->v4l2_dev, "can't initialize controls\n"); 400 V4L2_CID_AUDIO_MUTE, 0, 1, 1, 1);
394 v4l2_ctrl_handler_free(&tea->ctrl_handler); 401 retval = tea->ctrl_handler.error;
395 return retval;
396 }
397
398 if (tea->ext_init) {
399 retval = tea->ext_init(tea);
400 if (retval) { 402 if (retval) {
403 v4l2_err(tea->v4l2_dev, "can't initialize controls\n");
401 v4l2_ctrl_handler_free(&tea->ctrl_handler); 404 v4l2_ctrl_handler_free(&tea->ctrl_handler);
402 return retval; 405 return retval;
403 } 406 }
404 }
405 407
406 v4l2_ctrl_handler_setup(&tea->ctrl_handler); 408 if (tea->ext_init) {
409 retval = tea->ext_init(tea);
410 if (retval) {
411 v4l2_ctrl_handler_free(&tea->ctrl_handler);
412 return retval;
413 }
414 }
415
416 v4l2_ctrl_handler_setup(&tea->ctrl_handler);
417 }
407 418
408 retval = video_register_device(&tea->vd, VFL_TYPE_RADIO, tea->radio_nr); 419 retval = video_register_device(&tea->vd, VFL_TYPE_RADIO, tea->radio_nr);
409 if (retval) { 420 if (retval) {
410 v4l2_err(tea->v4l2_dev, "can't register video device!\n"); 421 v4l2_err(tea->v4l2_dev, "can't register video device!\n");
411 v4l2_ctrl_handler_free(&tea->ctrl_handler); 422 v4l2_ctrl_handler_free(tea->vd.ctrl_handler);
412 return retval; 423 return retval;
413 } 424 }
414 425
@@ -418,7 +429,7 @@ int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner)
418void snd_tea575x_exit(struct snd_tea575x *tea) 429void snd_tea575x_exit(struct snd_tea575x *tea)
419{ 430{
420 video_unregister_device(&tea->vd); 431 video_unregister_device(&tea->vd);
421 v4l2_ctrl_handler_free(&tea->ctrl_handler); 432 v4l2_ctrl_handler_free(tea->vd.ctrl_handler);
422} 433}
423 434
424static int __init alsa_tea575x_module_init(void) 435static int __init alsa_tea575x_module_init(void)
diff --git a/sound/oss/vwsnd.c b/sound/oss/vwsnd.c
index 643f1113b1d8..7e814a5c3677 100644
--- a/sound/oss/vwsnd.c
+++ b/sound/oss/vwsnd.c
@@ -438,7 +438,7 @@ static __inline__ void li_writeb(lithium_t *lith, int off, unsigned char val)
438 * 438 *
439 * Observe that (mask & -mask) is (1 << low_set_bit_of(mask)). 439 * Observe that (mask & -mask) is (1 << low_set_bit_of(mask)).
440 * As long as mask is constant, we trust the compiler will change the 440 * As long as mask is constant, we trust the compiler will change the
441 * multipy and divide into shifts. 441 * multiply and divide into shifts.
442 */ 442 */
443 443
444#define SHIFT_FIELD(val, mask) (((val) * ((mask) & -(mask))) & (mask)) 444#define SHIFT_FIELD(val, mask) (((val) * ((mask) & -(mask))) & (mask))
diff --git a/sound/soc/blackfin/bf6xx-sport.c b/sound/soc/blackfin/bf6xx-sport.c
index 318c5ba5360f..dfb744381c42 100644
--- a/sound/soc/blackfin/bf6xx-sport.c
+++ b/sound/soc/blackfin/bf6xx-sport.c
@@ -413,7 +413,14 @@ EXPORT_SYMBOL(sport_create);
413 413
414void sport_delete(struct sport_device *sport) 414void sport_delete(struct sport_device *sport)
415{ 415{
416 if (sport->tx_desc)
417 dma_free_coherent(NULL, sport->tx_desc_size,
418 sport->tx_desc, 0);
419 if (sport->rx_desc)
420 dma_free_coherent(NULL, sport->rx_desc_size,
421 sport->rx_desc, 0);
416 sport_free_resource(sport); 422 sport_free_resource(sport);
423 kfree(sport);
417} 424}
418EXPORT_SYMBOL(sport_delete); 425EXPORT_SYMBOL(sport_delete);
419 426
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index 0ff1e70b7770..c084c549942e 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -653,7 +653,7 @@ int twl6040_get_hs_step_size(struct snd_soc_codec *codec)
653{ 653{
654 struct twl6040 *twl6040 = codec->control_data; 654 struct twl6040 *twl6040 = codec->control_data;
655 655
656 if (twl6040_get_revid(twl6040) < TWL6040_REV_ES1_2) 656 if (twl6040_get_revid(twl6040) < TWL6040_REV_ES1_3)
657 /* For ES under ES_1.3 HS step is 2 mV */ 657 /* For ES under ES_1.3 HS step is 2 mV */
658 return 2; 658 return 2;
659 else 659 else
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index 6537f16d383e..e33d327396ad 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -128,13 +128,9 @@ SOC_SINGLE_TLV("EQ4 B5 Volume", ARIZONA_EQ4_2, ARIZONA_EQ4_B5_GAIN_SHIFT,
128 128
129ARIZONA_MIXER_CONTROLS("DRC1L", ARIZONA_DRC1LMIX_INPUT_1_SOURCE), 129ARIZONA_MIXER_CONTROLS("DRC1L", ARIZONA_DRC1LMIX_INPUT_1_SOURCE),
130ARIZONA_MIXER_CONTROLS("DRC1R", ARIZONA_DRC1RMIX_INPUT_1_SOURCE), 130ARIZONA_MIXER_CONTROLS("DRC1R", ARIZONA_DRC1RMIX_INPUT_1_SOURCE),
131ARIZONA_MIXER_CONTROLS("DRC2L", ARIZONA_DRC2LMIX_INPUT_1_SOURCE),
132ARIZONA_MIXER_CONTROLS("DRC2R", ARIZONA_DRC2RMIX_INPUT_1_SOURCE),
133 131
134SND_SOC_BYTES_MASK("DRC1", ARIZONA_DRC1_CTRL1, 5, 132SND_SOC_BYTES_MASK("DRC1", ARIZONA_DRC1_CTRL1, 5,
135 ARIZONA_DRC1R_ENA | ARIZONA_DRC1L_ENA), 133 ARIZONA_DRC1R_ENA | ARIZONA_DRC1L_ENA),
136SND_SOC_BYTES_MASK("DRC2", ARIZONA_DRC2_CTRL1, 5,
137 ARIZONA_DRC2R_ENA | ARIZONA_DRC2L_ENA),
138 134
139ARIZONA_MIXER_CONTROLS("LHPF1", ARIZONA_HPLP1MIX_INPUT_1_SOURCE), 135ARIZONA_MIXER_CONTROLS("LHPF1", ARIZONA_HPLP1MIX_INPUT_1_SOURCE),
140ARIZONA_MIXER_CONTROLS("LHPF2", ARIZONA_HPLP2MIX_INPUT_1_SOURCE), 136ARIZONA_MIXER_CONTROLS("LHPF2", ARIZONA_HPLP2MIX_INPUT_1_SOURCE),
@@ -236,8 +232,6 @@ ARIZONA_MIXER_ENUMS(EQ4, ARIZONA_EQ4MIX_INPUT_1_SOURCE);
236 232
237ARIZONA_MIXER_ENUMS(DRC1L, ARIZONA_DRC1LMIX_INPUT_1_SOURCE); 233ARIZONA_MIXER_ENUMS(DRC1L, ARIZONA_DRC1LMIX_INPUT_1_SOURCE);
238ARIZONA_MIXER_ENUMS(DRC1R, ARIZONA_DRC1RMIX_INPUT_1_SOURCE); 234ARIZONA_MIXER_ENUMS(DRC1R, ARIZONA_DRC1RMIX_INPUT_1_SOURCE);
239ARIZONA_MIXER_ENUMS(DRC2L, ARIZONA_DRC2LMIX_INPUT_1_SOURCE);
240ARIZONA_MIXER_ENUMS(DRC2R, ARIZONA_DRC2RMIX_INPUT_1_SOURCE);
241 235
242ARIZONA_MIXER_ENUMS(LHPF1, ARIZONA_HPLP1MIX_INPUT_1_SOURCE); 236ARIZONA_MIXER_ENUMS(LHPF1, ARIZONA_HPLP1MIX_INPUT_1_SOURCE);
243ARIZONA_MIXER_ENUMS(LHPF2, ARIZONA_HPLP2MIX_INPUT_1_SOURCE); 237ARIZONA_MIXER_ENUMS(LHPF2, ARIZONA_HPLP2MIX_INPUT_1_SOURCE);
@@ -349,10 +343,6 @@ SND_SOC_DAPM_PGA("DRC1L", ARIZONA_DRC1_CTRL1, ARIZONA_DRC1L_ENA_SHIFT, 0,
349 NULL, 0), 343 NULL, 0),
350SND_SOC_DAPM_PGA("DRC1R", ARIZONA_DRC1_CTRL1, ARIZONA_DRC1R_ENA_SHIFT, 0, 344SND_SOC_DAPM_PGA("DRC1R", ARIZONA_DRC1_CTRL1, ARIZONA_DRC1R_ENA_SHIFT, 0,
351 NULL, 0), 345 NULL, 0),
352SND_SOC_DAPM_PGA("DRC2L", ARIZONA_DRC2_CTRL1, ARIZONA_DRC2L_ENA_SHIFT, 0,
353 NULL, 0),
354SND_SOC_DAPM_PGA("DRC2R", ARIZONA_DRC2_CTRL1, ARIZONA_DRC2R_ENA_SHIFT, 0,
355 NULL, 0),
356 346
357SND_SOC_DAPM_PGA("LHPF1", ARIZONA_HPLPF1_1, ARIZONA_LHPF1_ENA_SHIFT, 0, 347SND_SOC_DAPM_PGA("LHPF1", ARIZONA_HPLPF1_1, ARIZONA_LHPF1_ENA_SHIFT, 0,
358 NULL, 0), 348 NULL, 0),
@@ -466,8 +456,6 @@ ARIZONA_MIXER_WIDGETS(EQ4, "EQ4"),
466 456
467ARIZONA_MIXER_WIDGETS(DRC1L, "DRC1L"), 457ARIZONA_MIXER_WIDGETS(DRC1L, "DRC1L"),
468ARIZONA_MIXER_WIDGETS(DRC1R, "DRC1R"), 458ARIZONA_MIXER_WIDGETS(DRC1R, "DRC1R"),
469ARIZONA_MIXER_WIDGETS(DRC2L, "DRC2L"),
470ARIZONA_MIXER_WIDGETS(DRC2R, "DRC2R"),
471 459
472ARIZONA_MIXER_WIDGETS(LHPF1, "LHPF1"), 460ARIZONA_MIXER_WIDGETS(LHPF1, "LHPF1"),
473ARIZONA_MIXER_WIDGETS(LHPF2, "LHPF2"), 461ARIZONA_MIXER_WIDGETS(LHPF2, "LHPF2"),
@@ -553,8 +541,6 @@ SND_SOC_DAPM_OUTPUT("SPKDAT1R"),
553 { name, "EQ4", "EQ4" }, \ 541 { name, "EQ4", "EQ4" }, \
554 { name, "DRC1L", "DRC1L" }, \ 542 { name, "DRC1L", "DRC1L" }, \
555 { name, "DRC1R", "DRC1R" }, \ 543 { name, "DRC1R", "DRC1R" }, \
556 { name, "DRC2L", "DRC2L" }, \
557 { name, "DRC2R", "DRC2R" }, \
558 { name, "LHPF1", "LHPF1" }, \ 544 { name, "LHPF1", "LHPF1" }, \
559 { name, "LHPF2", "LHPF2" }, \ 545 { name, "LHPF2", "LHPF2" }, \
560 { name, "LHPF3", "LHPF3" }, \ 546 { name, "LHPF3", "LHPF3" }, \
@@ -639,6 +625,15 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = {
639 { "AIF2 Capture", NULL, "SYSCLK" }, 625 { "AIF2 Capture", NULL, "SYSCLK" },
640 { "AIF3 Capture", NULL, "SYSCLK" }, 626 { "AIF3 Capture", NULL, "SYSCLK" },
641 627
628 { "IN1L PGA", NULL, "IN1L" },
629 { "IN1R PGA", NULL, "IN1R" },
630
631 { "IN2L PGA", NULL, "IN2L" },
632 { "IN2R PGA", NULL, "IN2R" },
633
634 { "IN3L PGA", NULL, "IN3L" },
635 { "IN3R PGA", NULL, "IN3R" },
636
642 ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"), 637 ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"),
643 ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"), 638 ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"),
644 ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"), 639 ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"),
@@ -675,8 +670,6 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = {
675 670
676 ARIZONA_MIXER_ROUTES("DRC1L", "DRC1L"), 671 ARIZONA_MIXER_ROUTES("DRC1L", "DRC1L"),
677 ARIZONA_MIXER_ROUTES("DRC1R", "DRC1R"), 672 ARIZONA_MIXER_ROUTES("DRC1R", "DRC1R"),
678 ARIZONA_MIXER_ROUTES("DRC2L", "DRC2L"),
679 ARIZONA_MIXER_ROUTES("DRC2R", "DRC2R"),
680 673
681 ARIZONA_MIXER_ROUTES("LHPF1", "LHPF1"), 674 ARIZONA_MIXER_ROUTES("LHPF1", "LHPF1"),
682 ARIZONA_MIXER_ROUTES("LHPF2", "LHPF2"), 675 ARIZONA_MIXER_ROUTES("LHPF2", "LHPF2"),
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 8033f7065189..01ebbcc5c6a4 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -681,6 +681,18 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = {
681 { "AIF2 Capture", NULL, "SYSCLK" }, 681 { "AIF2 Capture", NULL, "SYSCLK" },
682 { "AIF3 Capture", NULL, "SYSCLK" }, 682 { "AIF3 Capture", NULL, "SYSCLK" },
683 683
684 { "IN1L PGA", NULL, "IN1L" },
685 { "IN1R PGA", NULL, "IN1R" },
686
687 { "IN2L PGA", NULL, "IN2L" },
688 { "IN2R PGA", NULL, "IN2R" },
689
690 { "IN3L PGA", NULL, "IN3L" },
691 { "IN3R PGA", NULL, "IN3R" },
692
693 { "IN4L PGA", NULL, "IN4L" },
694 { "IN4R PGA", NULL, "IN4R" },
695
684 ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"), 696 ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"),
685 ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"), 697 ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"),
686 ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"), 698 ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"),
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index aa9ce9dd7d8a..ce6720073798 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3733,21 +3733,6 @@ static int wm8962_runtime_resume(struct device *dev)
3733 3733
3734 regcache_sync(wm8962->regmap); 3734 regcache_sync(wm8962->regmap);
3735 3735
3736 regmap_update_bits(wm8962->regmap, WM8962_ANTI_POP,
3737 WM8962_STARTUP_BIAS_ENA | WM8962_VMID_BUF_ENA,
3738 WM8962_STARTUP_BIAS_ENA | WM8962_VMID_BUF_ENA);
3739
3740 /* Bias enable at 2*50k for ramp */
3741 regmap_update_bits(wm8962->regmap, WM8962_PWR_MGMT_1,
3742 WM8962_VMID_SEL_MASK | WM8962_BIAS_ENA,
3743 WM8962_BIAS_ENA | 0x180);
3744
3745 msleep(5);
3746
3747 /* VMID back to 2x250k for standby */
3748 regmap_update_bits(wm8962->regmap, WM8962_PWR_MGMT_1,
3749 WM8962_VMID_SEL_MASK, 0x100);
3750
3751 return 0; 3736 return 0;
3752} 3737}
3753 3738
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 04ef03175c51..6c9eeca85b95 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -4038,6 +4038,8 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
4038 break; 4038 break;
4039 case WM8958: 4039 case WM8958:
4040 if (wm8994->revision < 1) { 4040 if (wm8994->revision < 1) {
4041 snd_soc_dapm_add_routes(dapm, wm8994_intercon,
4042 ARRAY_SIZE(wm8994_intercon));
4041 snd_soc_dapm_add_routes(dapm, wm8994_revd_intercon, 4043 snd_soc_dapm_add_routes(dapm, wm8994_revd_intercon,
4042 ARRAY_SIZE(wm8994_revd_intercon)); 4044 ARRAY_SIZE(wm8994_revd_intercon));
4043 snd_soc_dapm_add_routes(dapm, wm8994_lateclk_revd_intercon, 4045 snd_soc_dapm_add_routes(dapm, wm8994_lateclk_revd_intercon,
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index f16fb361a4eb..c6d2076a796b 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -148,7 +148,7 @@ SOC_SINGLE("Treble Volume", AC97_MASTER_TONE, 0, 15, 1),
148 148
149SOC_SINGLE("Capture ADC Switch", AC97_REC_GAIN, 15, 1, 1), 149SOC_SINGLE("Capture ADC Switch", AC97_REC_GAIN, 15, 1, 1),
150SOC_ENUM("Capture Volume Steps", wm9712_enum[6]), 150SOC_ENUM("Capture Volume Steps", wm9712_enum[6]),
151SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 1), 151SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 0),
152SOC_SINGLE("Capture ZC Switch", AC97_REC_GAIN, 7, 1, 0), 152SOC_SINGLE("Capture ZC Switch", AC97_REC_GAIN, 7, 1, 0),
153 153
154SOC_SINGLE_TLV("Mic 1 Volume", AC97_MIC, 8, 31, 1, main_tlv), 154SOC_SINGLE_TLV("Mic 1 Volume", AC97_MIC, 8, 31, 1, main_tlv),
@@ -272,7 +272,7 @@ SOC_DAPM_ENUM("Route", wm9712_enum[9]);
272 272
273/* Mic select */ 273/* Mic select */
274static const struct snd_kcontrol_new wm9712_mic_src_controls = 274static const struct snd_kcontrol_new wm9712_mic_src_controls =
275SOC_DAPM_ENUM("Route", wm9712_enum[7]); 275SOC_DAPM_ENUM("Mic Source Select", wm9712_enum[7]);
276 276
277/* diff select */ 277/* diff select */
278static const struct snd_kcontrol_new wm9712_diff_sel_controls = 278static const struct snd_kcontrol_new wm9712_diff_sel_controls =
@@ -291,7 +291,9 @@ SND_SOC_DAPM_MUX("Left Capture Select", SND_SOC_NOPM, 0, 0,
291 &wm9712_capture_selectl_controls), 291 &wm9712_capture_selectl_controls),
292SND_SOC_DAPM_MUX("Right Capture Select", SND_SOC_NOPM, 0, 0, 292SND_SOC_DAPM_MUX("Right Capture Select", SND_SOC_NOPM, 0, 0,
293 &wm9712_capture_selectr_controls), 293 &wm9712_capture_selectr_controls),
294SND_SOC_DAPM_MUX("Mic Select Source", SND_SOC_NOPM, 0, 0, 294SND_SOC_DAPM_MUX("Left Mic Select Source", SND_SOC_NOPM, 0, 0,
295 &wm9712_mic_src_controls),
296SND_SOC_DAPM_MUX("Right Mic Select Source", SND_SOC_NOPM, 0, 0,
295 &wm9712_mic_src_controls), 297 &wm9712_mic_src_controls),
296SND_SOC_DAPM_MUX("Differential Source", SND_SOC_NOPM, 0, 0, 298SND_SOC_DAPM_MUX("Differential Source", SND_SOC_NOPM, 0, 0,
297 &wm9712_diff_sel_controls), 299 &wm9712_diff_sel_controls),
@@ -319,6 +321,7 @@ SND_SOC_DAPM_PGA("Out 3 PGA", AC97_INT_PAGING, 5, 1, NULL, 0),
319SND_SOC_DAPM_PGA("Line PGA", AC97_INT_PAGING, 2, 1, NULL, 0), 321SND_SOC_DAPM_PGA("Line PGA", AC97_INT_PAGING, 2, 1, NULL, 0),
320SND_SOC_DAPM_PGA("Phone PGA", AC97_INT_PAGING, 1, 1, NULL, 0), 322SND_SOC_DAPM_PGA("Phone PGA", AC97_INT_PAGING, 1, 1, NULL, 0),
321SND_SOC_DAPM_PGA("Mic PGA", AC97_INT_PAGING, 0, 1, NULL, 0), 323SND_SOC_DAPM_PGA("Mic PGA", AC97_INT_PAGING, 0, 1, NULL, 0),
324SND_SOC_DAPM_PGA("Differential Mic", SND_SOC_NOPM, 0, 0, NULL, 0),
322SND_SOC_DAPM_MICBIAS("Mic Bias", AC97_INT_PAGING, 10, 1), 325SND_SOC_DAPM_MICBIAS("Mic Bias", AC97_INT_PAGING, 10, 1),
323SND_SOC_DAPM_OUTPUT("MONOOUT"), 326SND_SOC_DAPM_OUTPUT("MONOOUT"),
324SND_SOC_DAPM_OUTPUT("HPOUTL"), 327SND_SOC_DAPM_OUTPUT("HPOUTL"),
@@ -379,6 +382,18 @@ static const struct snd_soc_dapm_route wm9712_audio_map[] = {
379 {"Mic PGA", NULL, "MIC1"}, 382 {"Mic PGA", NULL, "MIC1"},
380 {"Mic PGA", NULL, "MIC2"}, 383 {"Mic PGA", NULL, "MIC2"},
381 384
385 /* microphones */
386 {"Differential Mic", NULL, "MIC1"},
387 {"Differential Mic", NULL, "MIC2"},
388 {"Left Mic Select Source", "Mic 1", "MIC1"},
389 {"Left Mic Select Source", "Mic 2", "MIC2"},
390 {"Left Mic Select Source", "Stereo", "MIC1"},
391 {"Left Mic Select Source", "Differential", "Differential Mic"},
392 {"Right Mic Select Source", "Mic 1", "MIC1"},
393 {"Right Mic Select Source", "Mic 2", "MIC2"},
394 {"Right Mic Select Source", "Stereo", "MIC2"},
395 {"Right Mic Select Source", "Differential", "Differential Mic"},
396
382 /* left capture selector */ 397 /* left capture selector */
383 {"Left Capture Select", "Mic", "MIC1"}, 398 {"Left Capture Select", "Mic", "MIC1"},
384 {"Left Capture Select", "Speaker Mixer", "Speaker Mixer"}, 399 {"Left Capture Select", "Speaker Mixer", "Speaker Mixer"},
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 95441bfc8190..ce5e5cd254dd 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -380,14 +380,20 @@ static void mcasp_start_tx(struct davinci_audio_dev *dev)
380static void davinci_mcasp_start(struct davinci_audio_dev *dev, int stream) 380static void davinci_mcasp_start(struct davinci_audio_dev *dev, int stream)
381{ 381{
382 if (stream == SNDRV_PCM_STREAM_PLAYBACK) { 382 if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
383 if (dev->txnumevt) /* enable FIFO */ 383 if (dev->txnumevt) { /* enable FIFO */
384 mcasp_clr_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
385 FIFO_ENABLE);
384 mcasp_set_bits(dev->base + DAVINCI_MCASP_WFIFOCTL, 386 mcasp_set_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
385 FIFO_ENABLE); 387 FIFO_ENABLE);
388 }
386 mcasp_start_tx(dev); 389 mcasp_start_tx(dev);
387 } else { 390 } else {
388 if (dev->rxnumevt) /* enable FIFO */ 391 if (dev->rxnumevt) { /* enable FIFO */
392 mcasp_clr_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
393 FIFO_ENABLE);
389 mcasp_set_bits(dev->base + DAVINCI_MCASP_RFIFOCTL, 394 mcasp_set_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
390 FIFO_ENABLE); 395 FIFO_ENABLE);
396 }
391 mcasp_start_rx(dev); 397 mcasp_start_rx(dev);
392 } 398 }
393} 399}
diff --git a/sound/soc/fsl/imx-pcm-fiq.c b/sound/soc/fsl/imx-pcm-fiq.c
index 456b7d723d66..ee27ba3933bd 100644
--- a/sound/soc/fsl/imx-pcm-fiq.c
+++ b/sound/soc/fsl/imx-pcm-fiq.c
@@ -29,6 +29,7 @@
29 29
30#include <asm/fiq.h> 30#include <asm/fiq.h>
31 31
32#include <mach/irqs.h>
32#include <mach/ssi.h> 33#include <mach/ssi.h>
33 34
34#include "imx-ssi.h" 35#include "imx-ssi.h"
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index 28dd76c7cb1c..81d7728cf67f 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -380,13 +380,14 @@ static int imx_ssi_dai_probe(struct snd_soc_dai *dai)
380static struct snd_soc_dai_driver imx_ssi_dai = { 380static struct snd_soc_dai_driver imx_ssi_dai = {
381 .probe = imx_ssi_dai_probe, 381 .probe = imx_ssi_dai_probe,
382 .playback = { 382 .playback = {
383 .channels_min = 1, 383 /* The SSI does not support monaural audio. */
384 .channels_min = 2,
384 .channels_max = 2, 385 .channels_max = 2,
385 .rates = SNDRV_PCM_RATE_8000_96000, 386 .rates = SNDRV_PCM_RATE_8000_96000,
386 .formats = SNDRV_PCM_FMTBIT_S16_LE, 387 .formats = SNDRV_PCM_FMTBIT_S16_LE,
387 }, 388 },
388 .capture = { 389 .capture = {
389 .channels_min = 1, 390 .channels_min = 2,
390 .channels_max = 2, 391 .channels_max = 2,
391 .rates = SNDRV_PCM_RATE_8000_96000, 392 .rates = SNDRV_PCM_RATE_8000_96000,
392 .formats = SNDRV_PCM_FMTBIT_S16_LE, 393 .formats = SNDRV_PCM_FMTBIT_S16_LE,
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index fa4556750451..7646dd7f30cb 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -458,7 +458,13 @@ static __devinit int kirkwood_i2s_dev_probe(struct platform_device *pdev)
458 } 458 }
459 clk_prepare_enable(priv->clk); 459 clk_prepare_enable(priv->clk);
460 460
461 return snd_soc_register_dai(&pdev->dev, &kirkwood_i2s_dai); 461 err = snd_soc_register_dai(&pdev->dev, &kirkwood_i2s_dai);
462 if (!err)
463 return 0;
464 dev_err(&pdev->dev, "snd_soc_register_dai failed\n");
465
466 clk_disable_unprepare(priv->clk);
467 clk_put(priv->clk);
462 468
463err_ioremap: 469err_ioremap:
464 iounmap(priv->io); 470 iounmap(priv->io);
diff --git a/sound/soc/mxs/Kconfig b/sound/soc/mxs/Kconfig
index 99a997f19bb9..b6fa77678d97 100644
--- a/sound/soc/mxs/Kconfig
+++ b/sound/soc/mxs/Kconfig
@@ -10,7 +10,7 @@ menuconfig SND_MXS_SOC
10if SND_MXS_SOC 10if SND_MXS_SOC
11 11
12config SND_SOC_MXS_SGTL5000 12config SND_SOC_MXS_SGTL5000
13 tristate "SoC Audio support for i.MX boards with sgtl5000" 13 tristate "SoC Audio support for MXS boards with sgtl5000"
14 depends on I2C 14 depends on I2C
15 select SND_SOC_SGTL5000 15 select SND_SOC_SGTL5000
16 help 16 help
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
index 34835e8a9160..d33c48baaf71 100644
--- a/sound/soc/omap/mcbsp.c
+++ b/sound/soc/omap/mcbsp.c
@@ -745,7 +745,7 @@ int omap_mcbsp_6pin_src_mux(struct omap_mcbsp *mcbsp, u8 mux)
745{ 745{
746 const char *signal, *src; 746 const char *signal, *src;
747 747
748 if (mcbsp->pdata->mux_signal) 748 if (!mcbsp->pdata->mux_signal)
749 return -EINVAL; 749 return -EINVAL;
750 750
751 switch (mux) { 751 switch (mux) {
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c
index ddc6cde14e2a..f3ebc38c10fe 100644
--- a/sound/soc/samsung/dma.c
+++ b/sound/soc/samsung/dma.c
@@ -74,7 +74,7 @@ static void dma_enqueue(struct snd_pcm_substream *substream)
74 struct runtime_data *prtd = substream->runtime->private_data; 74 struct runtime_data *prtd = substream->runtime->private_data;
75 dma_addr_t pos = prtd->dma_pos; 75 dma_addr_t pos = prtd->dma_pos;
76 unsigned int limit; 76 unsigned int limit;
77 struct samsung_dma_prep_info dma_info; 77 struct samsung_dma_prep dma_info;
78 78
79 pr_debug("Entered %s\n", __func__); 79 pr_debug("Entered %s\n", __func__);
80 80
@@ -146,7 +146,8 @@ static int dma_hw_params(struct snd_pcm_substream *substream,
146 unsigned long totbytes = params_buffer_bytes(params); 146 unsigned long totbytes = params_buffer_bytes(params);
147 struct s3c_dma_params *dma = 147 struct s3c_dma_params *dma =
148 snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); 148 snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
149 struct samsung_dma_info dma_info; 149 struct samsung_dma_req req;
150 struct samsung_dma_config config;
150 151
151 pr_debug("Entered %s\n", __func__); 152 pr_debug("Entered %s\n", __func__);
152 153
@@ -166,16 +167,17 @@ static int dma_hw_params(struct snd_pcm_substream *substream,
166 167
167 prtd->params->ops = samsung_dma_get_ops(); 168 prtd->params->ops = samsung_dma_get_ops();
168 169
169 dma_info.cap = (samsung_dma_has_circular() ? 170 req.cap = (samsung_dma_has_circular() ?
170 DMA_CYCLIC : DMA_SLAVE); 171 DMA_CYCLIC : DMA_SLAVE);
171 dma_info.client = prtd->params->client; 172 req.client = prtd->params->client;
172 dma_info.direction = 173 config.direction =
173 (substream->stream == SNDRV_PCM_STREAM_PLAYBACK 174 (substream->stream == SNDRV_PCM_STREAM_PLAYBACK
174 ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM); 175 ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM);
175 dma_info.width = prtd->params->dma_size; 176 config.width = prtd->params->dma_size;
176 dma_info.fifo = prtd->params->dma_addr; 177 config.fifo = prtd->params->dma_addr;
177 prtd->params->ch = prtd->params->ops->request( 178 prtd->params->ch = prtd->params->ops->request(
178 prtd->params->channel, &dma_info); 179 prtd->params->channel, &req);
180 prtd->params->ops->config(prtd->params->ch, &config);
179 } 181 }
180 182
181 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); 183 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c
index b7b2a1f91425..89b064650f14 100644
--- a/sound/soc/samsung/pcm.c
+++ b/sound/soc/samsung/pcm.c
@@ -20,7 +20,7 @@
20#include <sound/pcm_params.h> 20#include <sound/pcm_params.h>
21 21
22#include <plat/audio.h> 22#include <plat/audio.h>
23#include <plat/dma.h> 23#include <mach/dma.h>
24 24
25#include "dma.h" 25#include "dma.h"
26#include "pcm.h" 26#include "pcm.h"
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 53486ff9c2af..0540408a9fa9 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1631,8 +1631,8 @@ static void fsi_handler_init(struct fsi_priv *fsi)
1631 fsi->capture.priv = fsi; 1631 fsi->capture.priv = fsi;
1632 1632
1633 if (fsi->info->tx_id) { 1633 if (fsi->info->tx_id) {
1634 fsi->playback.slave.slave_id = fsi->info->tx_id; 1634 fsi->playback.slave.shdma_slave.slave_id = fsi->info->tx_id;
1635 fsi->playback.handler = &fsi_dma_push_handler; 1635 fsi->playback.handler = &fsi_dma_push_handler;
1636 } 1636 }
1637} 1637}
1638 1638
diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c
index 5cfcc655e95f..488f9becb44f 100644
--- a/sound/soc/sh/siu_pcm.c
+++ b/sound/soc/sh/siu_pcm.c
@@ -330,12 +330,9 @@ static bool filter(struct dma_chan *chan, void *slave)
330{ 330{
331 struct sh_dmae_slave *param = slave; 331 struct sh_dmae_slave *param = slave;
332 332
333 pr_debug("%s: slave ID %d\n", __func__, param->slave_id); 333 pr_debug("%s: slave ID %d\n", __func__, param->shdma_slave.slave_id);
334 334
335 if (unlikely(param->dma_dev != chan->device->dev)) 335 chan->private = &param->shdma_slave;
336 return false;
337
338 chan->private = param;
339 return true; 336 return true;
340} 337}
341 338
@@ -360,16 +357,15 @@ static int siu_pcm_open(struct snd_pcm_substream *ss)
360 if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) { 357 if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) {
361 siu_stream = &port_info->playback; 358 siu_stream = &port_info->playback;
362 param = &siu_stream->param; 359 param = &siu_stream->param;
363 param->slave_id = port ? pdata->dma_slave_tx_b : 360 param->shdma_slave.slave_id = port ? pdata->dma_slave_tx_b :
364 pdata->dma_slave_tx_a; 361 pdata->dma_slave_tx_a;
365 } else { 362 } else {
366 siu_stream = &port_info->capture; 363 siu_stream = &port_info->capture;
367 param = &siu_stream->param; 364 param = &siu_stream->param;
368 param->slave_id = port ? pdata->dma_slave_rx_b : 365 param->shdma_slave.slave_id = port ? pdata->dma_slave_rx_b :
369 pdata->dma_slave_rx_a; 366 pdata->dma_slave_rx_a;
370 } 367 }
371 368
372 param->dma_dev = pdata->dma_dev;
373 /* Get DMA channel */ 369 /* Get DMA channel */
374 siu_stream->chan = dma_request_channel(mask, filter, param); 370 siu_stream->chan = dma_request_channel(mask, filter, param);
375 if (!siu_stream->chan) { 371 if (!siu_stream->chan) {
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index f81c5976b961..c501af6d8dbe 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -826,7 +826,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
826 } 826 }
827 827
828 if (!rtd->cpu_dai) { 828 if (!rtd->cpu_dai) {
829 dev_dbg(card->dev, "CPU DAI %s not registered\n", 829 dev_err(card->dev, "CPU DAI %s not registered\n",
830 dai_link->cpu_dai_name); 830 dai_link->cpu_dai_name);
831 return -EPROBE_DEFER; 831 return -EPROBE_DEFER;
832 } 832 }
@@ -857,14 +857,14 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
857 } 857 }
858 858
859 if (!rtd->codec_dai) { 859 if (!rtd->codec_dai) {
860 dev_dbg(card->dev, "CODEC DAI %s not registered\n", 860 dev_err(card->dev, "CODEC DAI %s not registered\n",
861 dai_link->codec_dai_name); 861 dai_link->codec_dai_name);
862 return -EPROBE_DEFER; 862 return -EPROBE_DEFER;
863 } 863 }
864 } 864 }
865 865
866 if (!rtd->codec) { 866 if (!rtd->codec) {
867 dev_dbg(card->dev, "CODEC %s not registered\n", 867 dev_err(card->dev, "CODEC %s not registered\n",
868 dai_link->codec_name); 868 dai_link->codec_name);
869 return -EPROBE_DEFER; 869 return -EPROBE_DEFER;
870 } 870 }
@@ -888,7 +888,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
888 rtd->platform = platform; 888 rtd->platform = platform;
889 } 889 }
890 if (!rtd->platform) { 890 if (!rtd->platform) {
891 dev_dbg(card->dev, "platform %s not registered\n", 891 dev_err(card->dev, "platform %s not registered\n",
892 dai_link->platform_name); 892 dai_link->platform_name);
893 return -EPROBE_DEFER; 893 return -EPROBE_DEFER;
894 } 894 }
@@ -1481,6 +1481,8 @@ static int soc_check_aux_dev(struct snd_soc_card *card, int num)
1481 return 0; 1481 return 0;
1482 } 1482 }
1483 1483
1484 dev_err(card->dev, "%s not registered\n", aux_dev->codec_name);
1485
1484 return -EPROBE_DEFER; 1486 return -EPROBE_DEFER;
1485} 1487}
1486 1488
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 4d181df95dc3..dd7c49fafd75 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1572,7 +1572,7 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
1572 struct snd_soc_dapm_context *d; 1572 struct snd_soc_dapm_context *d;
1573 LIST_HEAD(up_list); 1573 LIST_HEAD(up_list);
1574 LIST_HEAD(down_list); 1574 LIST_HEAD(down_list);
1575 LIST_HEAD(async_domain); 1575 ASYNC_DOMAIN_EXCLUSIVE(async_domain);
1576 enum snd_soc_bias_level bias; 1576 enum snd_soc_bias_level bias;
1577 1577
1578 trace_snd_soc_dapm_start(card); 1578 trace_snd_soc_dapm_start(card);
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 7f8b3b7428bb..0c172938b82a 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -103,7 +103,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
103 } 103 }
104 104
105 /* Report before the DAPM sync to help users updating micbias status */ 105 /* Report before the DAPM sync to help users updating micbias status */
106 blocking_notifier_call_chain(&jack->notifier, status, jack); 106 blocking_notifier_call_chain(&jack->notifier, jack->status, jack);
107 107
108 snd_soc_dapm_sync(dapm); 108 snd_soc_dapm_sync(dapm);
109 109
diff --git a/sound/soc/tegra/Kconfig b/sound/soc/tegra/Kconfig
index 7b6a1ebd197a..02bcd308c189 100644
--- a/sound/soc/tegra/Kconfig
+++ b/sound/soc/tegra/Kconfig
@@ -59,17 +59,9 @@ config SND_SOC_TEGRA_WM8753
59 Say Y or M here if you want to add support for SoC audio on Tegra 59 Say Y or M here if you want to add support for SoC audio on Tegra
60 boards using the WM8753 codec, such as Whistler. 60 boards using the WM8753 codec, such as Whistler.
61 61
62config MACH_HAS_SND_SOC_TEGRA_WM8903
63 bool
64 help
65 Machines that use the SND_SOC_TEGRA_WM8903 driver should select
66 this config option, in order to allow the user to enable
67 SND_SOC_TEGRA_WM8903.
68
69config SND_SOC_TEGRA_WM8903 62config SND_SOC_TEGRA_WM8903
70 tristate "SoC Audio support for Tegra boards using a WM8903 codec" 63 tristate "SoC Audio support for Tegra boards using a WM8903 codec"
71 depends on SND_SOC_TEGRA && I2C 64 depends on SND_SOC_TEGRA && I2C
72 depends on MACH_HAS_SND_SOC_TEGRA_WM8903
73 select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC 65 select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC
74 select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC 66 select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC
75 select SND_SOC_WM8903 67 select SND_SOC_WM8903
@@ -80,7 +72,7 @@ config SND_SOC_TEGRA_WM8903
80 72
81config SND_SOC_TEGRA_TRIMSLICE 73config SND_SOC_TEGRA_TRIMSLICE
82 tristate "SoC Audio support for TrimSlice board" 74 tristate "SoC Audio support for TrimSlice board"
83 depends on SND_SOC_TEGRA && MACH_TRIMSLICE && I2C 75 depends on SND_SOC_TEGRA && I2C
84 select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC 76 select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC
85 select SND_SOC_TLV320AIC23 77 select SND_SOC_TLV320AIC23
86 help 78 help
diff --git a/sound/soc/tegra/tegra20_i2s.c b/sound/soc/tegra/tegra20_i2s.c
index c5fc6b1404f6..0832e8afd73c 100644
--- a/sound/soc/tegra/tegra20_i2s.c
+++ b/sound/soc/tegra/tegra20_i2s.c
@@ -50,7 +50,7 @@ static int tegra20_i2s_runtime_suspend(struct device *dev)
50{ 50{
51 struct tegra20_i2s *i2s = dev_get_drvdata(dev); 51 struct tegra20_i2s *i2s = dev_get_drvdata(dev);
52 52
53 clk_disable(i2s->clk_i2s); 53 clk_disable_unprepare(i2s->clk_i2s);
54 54
55 return 0; 55 return 0;
56} 56}
@@ -60,7 +60,7 @@ static int tegra20_i2s_runtime_resume(struct device *dev)
60 struct tegra20_i2s *i2s = dev_get_drvdata(dev); 60 struct tegra20_i2s *i2s = dev_get_drvdata(dev);
61 int ret; 61 int ret;
62 62
63 ret = clk_enable(i2s->clk_i2s); 63 ret = clk_prepare_enable(i2s->clk_i2s);
64 if (ret) { 64 if (ret) {
65 dev_err(dev, "clk_enable failed: %d\n", ret); 65 dev_err(dev, "clk_enable failed: %d\n", ret);
66 return ret; 66 return ret;
diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c
index 5c33c618929d..3ebc8670ba00 100644
--- a/sound/soc/tegra/tegra20_spdif.c
+++ b/sound/soc/tegra/tegra20_spdif.c
@@ -41,7 +41,7 @@ static int tegra20_spdif_runtime_suspend(struct device *dev)
41{ 41{
42 struct tegra20_spdif *spdif = dev_get_drvdata(dev); 42 struct tegra20_spdif *spdif = dev_get_drvdata(dev);
43 43
44 clk_disable(spdif->clk_spdif_out); 44 clk_disable_unprepare(spdif->clk_spdif_out);
45 45
46 return 0; 46 return 0;
47} 47}
@@ -51,7 +51,7 @@ static int tegra20_spdif_runtime_resume(struct device *dev)
51 struct tegra20_spdif *spdif = dev_get_drvdata(dev); 51 struct tegra20_spdif *spdif = dev_get_drvdata(dev);
52 int ret; 52 int ret;
53 53
54 ret = clk_enable(spdif->clk_spdif_out); 54 ret = clk_prepare_enable(spdif->clk_spdif_out);
55 if (ret) { 55 if (ret) {
56 dev_err(dev, "clk_enable failed: %d\n", ret); 56 dev_err(dev, "clk_enable failed: %d\n", ret);
57 return ret; 57 return ret;
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c
index f43edb364a18..bf5610122c76 100644
--- a/sound/soc/tegra/tegra30_ahub.c
+++ b/sound/soc/tegra/tegra30_ahub.c
@@ -56,8 +56,8 @@ static int tegra30_ahub_runtime_suspend(struct device *dev)
56 regcache_cache_only(ahub->regmap_apbif, true); 56 regcache_cache_only(ahub->regmap_apbif, true);
57 regcache_cache_only(ahub->regmap_ahub, true); 57 regcache_cache_only(ahub->regmap_ahub, true);
58 58
59 clk_disable(ahub->clk_apbif); 59 clk_disable_unprepare(ahub->clk_apbif);
60 clk_disable(ahub->clk_d_audio); 60 clk_disable_unprepare(ahub->clk_d_audio);
61 61
62 return 0; 62 return 0;
63} 63}
@@ -77,12 +77,12 @@ static int tegra30_ahub_runtime_resume(struct device *dev)
77{ 77{
78 int ret; 78 int ret;
79 79
80 ret = clk_enable(ahub->clk_d_audio); 80 ret = clk_prepare_enable(ahub->clk_d_audio);
81 if (ret) { 81 if (ret) {
82 dev_err(dev, "clk_enable d_audio failed: %d\n", ret); 82 dev_err(dev, "clk_enable d_audio failed: %d\n", ret);
83 return ret; 83 return ret;
84 } 84 }
85 ret = clk_enable(ahub->clk_apbif); 85 ret = clk_prepare_enable(ahub->clk_apbif);
86 if (ret) { 86 if (ret) {
87 dev_err(dev, "clk_enable apbif failed: %d\n", ret); 87 dev_err(dev, "clk_enable apbif failed: %d\n", ret);
88 clk_disable(ahub->clk_d_audio); 88 clk_disable(ahub->clk_d_audio);
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c
index b68e27a14608..44184228d1f0 100644
--- a/sound/soc/tegra/tegra30_i2s.c
+++ b/sound/soc/tegra/tegra30_i2s.c
@@ -50,7 +50,7 @@ static int tegra30_i2s_runtime_suspend(struct device *dev)
50 50
51 regcache_cache_only(i2s->regmap, true); 51 regcache_cache_only(i2s->regmap, true);
52 52
53 clk_disable(i2s->clk_i2s); 53 clk_disable_unprepare(i2s->clk_i2s);
54 54
55 return 0; 55 return 0;
56} 56}
@@ -60,7 +60,7 @@ static int tegra30_i2s_runtime_resume(struct device *dev)
60 struct tegra30_i2s *i2s = dev_get_drvdata(dev); 60 struct tegra30_i2s *i2s = dev_get_drvdata(dev);
61 int ret; 61 int ret;
62 62
63 ret = clk_enable(i2s->clk_i2s); 63 ret = clk_prepare_enable(i2s->clk_i2s);
64 if (ret) { 64 if (ret) {
65 dev_err(dev, "clk_enable failed: %d\n", ret); 65 dev_err(dev, "clk_enable failed: %d\n", ret);
66 return ret; 66 return ret;
diff --git a/sound/soc/tegra/tegra_asoc_utils.c b/sound/soc/tegra/tegra_asoc_utils.c
index 9515ce58ea02..6872c77a1196 100644
--- a/sound/soc/tegra/tegra_asoc_utils.c
+++ b/sound/soc/tegra/tegra_asoc_utils.c
@@ -69,9 +69,9 @@ int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate,
69 data->set_baseclock = 0; 69 data->set_baseclock = 0;
70 data->set_mclk = 0; 70 data->set_mclk = 0;
71 71
72 clk_disable(data->clk_cdev1); 72 clk_disable_unprepare(data->clk_cdev1);
73 clk_disable(data->clk_pll_a_out0); 73 clk_disable_unprepare(data->clk_pll_a_out0);
74 clk_disable(data->clk_pll_a); 74 clk_disable_unprepare(data->clk_pll_a);
75 75
76 err = clk_set_rate(data->clk_pll_a, new_baseclock); 76 err = clk_set_rate(data->clk_pll_a, new_baseclock);
77 if (err) { 77 if (err) {
@@ -87,19 +87,19 @@ int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate,
87 87
88 /* Don't set cdev1/extern1 rate; it's locked to pll_a_out0 */ 88 /* Don't set cdev1/extern1 rate; it's locked to pll_a_out0 */
89 89
90 err = clk_enable(data->clk_pll_a); 90 err = clk_prepare_enable(data->clk_pll_a);
91 if (err) { 91 if (err) {
92 dev_err(data->dev, "Can't enable pll_a: %d\n", err); 92 dev_err(data->dev, "Can't enable pll_a: %d\n", err);
93 return err; 93 return err;
94 } 94 }
95 95
96 err = clk_enable(data->clk_pll_a_out0); 96 err = clk_prepare_enable(data->clk_pll_a_out0);
97 if (err) { 97 if (err) {
98 dev_err(data->dev, "Can't enable pll_a_out0: %d\n", err); 98 dev_err(data->dev, "Can't enable pll_a_out0: %d\n", err);
99 return err; 99 return err;
100 } 100 }
101 101
102 err = clk_enable(data->clk_cdev1); 102 err = clk_prepare_enable(data->clk_cdev1);
103 if (err) { 103 if (err) {
104 dev_err(data->dev, "Can't enable cdev1: %d\n", err); 104 dev_err(data->dev, "Can't enable cdev1: %d\n", err);
105 return err; 105 return err;
diff --git a/sound/sound_firmware.c b/sound/sound_firmware.c
index 7e96249536b4..37711a5d0d6b 100644
--- a/sound/sound_firmware.c
+++ b/sound/sound_firmware.c
@@ -23,14 +23,14 @@ static int do_mod_firmware_load(const char *fn, char **fp)
23 if (l <= 0 || l > 131072) 23 if (l <= 0 || l > 131072)
24 { 24 {
25 printk(KERN_INFO "Invalid firmware '%s'\n", fn); 25 printk(KERN_INFO "Invalid firmware '%s'\n", fn);
26 filp_close(filp, current->files); 26 filp_close(filp, NULL);
27 return 0; 27 return 0;
28 } 28 }
29 dp = vmalloc(l); 29 dp = vmalloc(l);
30 if (dp == NULL) 30 if (dp == NULL)
31 { 31 {
32 printk(KERN_INFO "Out of memory loading '%s'.\n", fn); 32 printk(KERN_INFO "Out of memory loading '%s'.\n", fn);
33 filp_close(filp, current->files); 33 filp_close(filp, NULL);
34 return 0; 34 return 0;
35 } 35 }
36 pos = 0; 36 pos = 0;
@@ -38,10 +38,10 @@ static int do_mod_firmware_load(const char *fn, char **fp)
38 { 38 {
39 printk(KERN_INFO "Failed to read '%s'.\n", fn); 39 printk(KERN_INFO "Failed to read '%s'.\n", fn);
40 vfree(dp); 40 vfree(dp);
41 filp_close(filp, current->files); 41 filp_close(filp, NULL);
42 return 0; 42 return 0;
43 } 43 }
44 filp_close(filp, current->files); 44 filp_close(filp, NULL);
45 *fp = dp; 45 *fp = dp;
46 return (int) l; 46 return (int) l;
47} 47}