diff options
Diffstat (limited to 'sound')
37 files changed, 194 insertions, 154 deletions
diff --git a/sound/core/info.c b/sound/core/info.c index 5bb97e7d325a..3c9bd6b10a96 100644 --- a/sound/core/info.c +++ b/sound/core/info.c | |||
@@ -153,13 +153,6 @@ EXPORT_SYMBOL(snd_seq_root); | |||
153 | struct snd_info_entry *snd_oss_root; | 153 | struct snd_info_entry *snd_oss_root; |
154 | #endif | 154 | #endif |
155 | 155 | ||
156 | static void snd_remove_proc_entry(struct proc_dir_entry *parent, | ||
157 | struct proc_dir_entry *de) | ||
158 | { | ||
159 | if (de) | ||
160 | remove_proc_entry(de->name, parent); | ||
161 | } | ||
162 | |||
163 | static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig) | 156 | static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig) |
164 | { | 157 | { |
165 | struct snd_info_private_data *data; | 158 | struct snd_info_private_data *data; |
@@ -310,12 +303,10 @@ static int snd_info_entry_open(struct inode *inode, struct file *file) | |||
310 | struct snd_info_entry *entry; | 303 | struct snd_info_entry *entry; |
311 | struct snd_info_private_data *data; | 304 | struct snd_info_private_data *data; |
312 | struct snd_info_buffer *buffer; | 305 | struct snd_info_buffer *buffer; |
313 | struct proc_dir_entry *p; | ||
314 | int mode, err; | 306 | int mode, err; |
315 | 307 | ||
316 | mutex_lock(&info_mutex); | 308 | mutex_lock(&info_mutex); |
317 | p = PDE(inode); | 309 | entry = PDE_DATA(inode); |
318 | entry = p == NULL ? NULL : (struct snd_info_entry *)p->data; | ||
319 | if (entry == NULL || ! entry->p) { | 310 | if (entry == NULL || ! entry->p) { |
320 | mutex_unlock(&info_mutex); | 311 | mutex_unlock(&info_mutex); |
321 | return -ENODEV; | 312 | return -ENODEV; |
@@ -582,7 +573,7 @@ int __exit snd_info_done(void) | |||
582 | #ifdef CONFIG_SND_OSSEMUL | 573 | #ifdef CONFIG_SND_OSSEMUL |
583 | snd_info_free_entry(snd_oss_root); | 574 | snd_info_free_entry(snd_oss_root); |
584 | #endif | 575 | #endif |
585 | snd_remove_proc_entry(NULL, snd_proc_root); | 576 | proc_remove(snd_proc_root); |
586 | } | 577 | } |
587 | return 0; | 578 | return 0; |
588 | } | 579 | } |
@@ -644,7 +635,7 @@ void snd_info_card_id_change(struct snd_card *card) | |||
644 | { | 635 | { |
645 | mutex_lock(&info_mutex); | 636 | mutex_lock(&info_mutex); |
646 | if (card->proc_root_link) { | 637 | if (card->proc_root_link) { |
647 | snd_remove_proc_entry(snd_proc_root, card->proc_root_link); | 638 | proc_remove(card->proc_root_link); |
648 | card->proc_root_link = NULL; | 639 | card->proc_root_link = NULL; |
649 | } | 640 | } |
650 | if (strcmp(card->id, card->proc_root->name)) | 641 | if (strcmp(card->id, card->proc_root->name)) |
@@ -663,10 +654,8 @@ void snd_info_card_disconnect(struct snd_card *card) | |||
663 | if (!card) | 654 | if (!card) |
664 | return; | 655 | return; |
665 | mutex_lock(&info_mutex); | 656 | mutex_lock(&info_mutex); |
666 | if (card->proc_root_link) { | 657 | proc_remove(card->proc_root_link); |
667 | snd_remove_proc_entry(snd_proc_root, card->proc_root_link); | 658 | card->proc_root_link = NULL; |
668 | card->proc_root_link = NULL; | ||
669 | } | ||
670 | if (card->proc_root) | 659 | if (card->proc_root) |
671 | snd_info_disconnect(card->proc_root); | 660 | snd_info_disconnect(card->proc_root); |
672 | mutex_unlock(&info_mutex); | 661 | mutex_unlock(&info_mutex); |
@@ -858,7 +847,7 @@ static void snd_info_disconnect(struct snd_info_entry *entry) | |||
858 | list_del_init(&entry->list); | 847 | list_del_init(&entry->list); |
859 | root = entry->parent == NULL ? snd_proc_root : entry->parent->p; | 848 | root = entry->parent == NULL ? snd_proc_root : entry->parent->p; |
860 | snd_BUG_ON(!root); | 849 | snd_BUG_ON(!root); |
861 | snd_remove_proc_entry(root, entry->p); | 850 | proc_remove(entry->p); |
862 | entry->p = NULL; | 851 | entry->p = NULL; |
863 | } | 852 | } |
864 | 853 | ||
@@ -959,15 +948,21 @@ int snd_info_register(struct snd_info_entry * entry) | |||
959 | return -ENXIO; | 948 | return -ENXIO; |
960 | root = entry->parent == NULL ? snd_proc_root : entry->parent->p; | 949 | root = entry->parent == NULL ? snd_proc_root : entry->parent->p; |
961 | mutex_lock(&info_mutex); | 950 | mutex_lock(&info_mutex); |
962 | p = create_proc_entry(entry->name, entry->mode, root); | 951 | if (S_ISDIR(entry->mode)) { |
963 | if (!p) { | 952 | p = proc_mkdir_mode(entry->name, entry->mode, root); |
964 | mutex_unlock(&info_mutex); | 953 | if (!p) { |
965 | return -ENOMEM; | 954 | mutex_unlock(&info_mutex); |
955 | return -ENOMEM; | ||
956 | } | ||
957 | } else { | ||
958 | p = proc_create_data(entry->name, entry->mode, root, | ||
959 | &snd_info_entry_operations, entry); | ||
960 | if (!p) { | ||
961 | mutex_unlock(&info_mutex); | ||
962 | return -ENOMEM; | ||
963 | } | ||
964 | proc_set_size(p, entry->size); | ||
966 | } | 965 | } |
967 | if (!S_ISDIR(entry->mode)) | ||
968 | p->proc_fops = &snd_info_entry_operations; | ||
969 | p->size = entry->size; | ||
970 | p->data = entry; | ||
971 | entry->p = p; | 966 | entry->p = p; |
972 | if (entry->parent) | 967 | if (entry->parent) |
973 | list_add_tail(&entry->list, &entry->parent->children); | 968 | list_add_tail(&entry->list, &entry->parent->children); |
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 71ae86ca64ac..eb560fa32321 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -3222,18 +3222,10 @@ EXPORT_SYMBOL_GPL(snd_pcm_lib_default_mmap); | |||
3222 | int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, | 3222 | int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, |
3223 | struct vm_area_struct *area) | 3223 | struct vm_area_struct *area) |
3224 | { | 3224 | { |
3225 | long size; | 3225 | struct snd_pcm_runtime *runtime = substream->runtime;; |
3226 | unsigned long offset; | ||
3227 | 3226 | ||
3228 | area->vm_page_prot = pgprot_noncached(area->vm_page_prot); | 3227 | area->vm_page_prot = pgprot_noncached(area->vm_page_prot); |
3229 | area->vm_flags |= VM_IO; | 3228 | return vm_iomap_memory(area, runtime->dma_addr, runtime->dma_bytes); |
3230 | size = area->vm_end - area->vm_start; | ||
3231 | offset = area->vm_pgoff << PAGE_SHIFT; | ||
3232 | if (io_remap_pfn_range(area, area->vm_start, | ||
3233 | (substream->runtime->dma_addr + offset) >> PAGE_SHIFT, | ||
3234 | size, area->vm_page_prot)) | ||
3235 | return -EAGAIN; | ||
3236 | return 0; | ||
3237 | } | 3229 | } |
3238 | 3230 | ||
3239 | EXPORT_SYMBOL(snd_pcm_lib_mmap_iomem); | 3231 | EXPORT_SYMBOL(snd_pcm_lib_mmap_iomem); |
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c index 3c6c1e3226f3..8a36a1d9803f 100644 --- a/sound/i2c/other/tea575x-tuner.c +++ b/sound/i2c/other/tea575x-tuner.c | |||
@@ -306,7 +306,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
306 | } | 306 | } |
307 | 307 | ||
308 | static int vidioc_s_tuner(struct file *file, void *priv, | 308 | static int vidioc_s_tuner(struct file *file, void *priv, |
309 | struct v4l2_tuner *v) | 309 | const struct v4l2_tuner *v) |
310 | { | 310 | { |
311 | struct snd_tea575x *tea = video_drvdata(file); | 311 | struct snd_tea575x *tea = video_drvdata(file); |
312 | u32 orig_val = tea->val; | 312 | u32 orig_val = tea->val; |
@@ -336,7 +336,7 @@ static int vidioc_g_frequency(struct file *file, void *priv, | |||
336 | } | 336 | } |
337 | 337 | ||
338 | static int vidioc_s_frequency(struct file *file, void *priv, | 338 | static int vidioc_s_frequency(struct file *file, void *priv, |
339 | struct v4l2_frequency *f) | 339 | const struct v4l2_frequency *f) |
340 | { | 340 | { |
341 | struct snd_tea575x *tea = video_drvdata(file); | 341 | struct snd_tea575x *tea = video_drvdata(file); |
342 | 342 | ||
@@ -350,7 +350,7 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
350 | else | 350 | else |
351 | tea->band = BAND_FM; | 351 | tea->band = BAND_FM; |
352 | 352 | ||
353 | tea->freq = clamp(f->frequency, bands[tea->band].rangelow, | 353 | tea->freq = clamp_t(u32, f->frequency, bands[tea->band].rangelow, |
354 | bands[tea->band].rangehigh); | 354 | bands[tea->band].rangehigh); |
355 | snd_tea575x_set_freq(tea); | 355 | snd_tea575x_set_freq(tea); |
356 | return 0; | 356 | return 0; |
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index c918313c2206..bac43b5b6e95 100644 --- a/sound/oss/dmasound/dmasound_core.c +++ b/sound/oss/dmasound/dmasound_core.c | |||
@@ -835,7 +835,7 @@ static void sq_reset(void) | |||
835 | shared_resources_initialised = 0 ; | 835 | shared_resources_initialised = 0 ; |
836 | } | 836 | } |
837 | 837 | ||
838 | static int sq_fsync(struct file *filp, struct dentry *dentry) | 838 | static int sq_fsync(void) |
839 | { | 839 | { |
840 | int rc = 0; | 840 | int rc = 0; |
841 | int timeout = 5; | 841 | int timeout = 5; |
@@ -874,7 +874,7 @@ static int sq_release(struct inode *inode, struct file *file) | |||
874 | 874 | ||
875 | if (file->f_mode & FMODE_WRITE) { | 875 | if (file->f_mode & FMODE_WRITE) { |
876 | if (write_sq.busy) | 876 | if (write_sq.busy) |
877 | rc = sq_fsync(file, file->f_path.dentry); | 877 | rc = sq_fsync(); |
878 | 878 | ||
879 | sq_reset_output() ; /* make sure dma is stopped and all is quiet */ | 879 | sq_reset_output() ; /* make sure dma is stopped and all is quiet */ |
880 | write_sq_release_buffers(); | 880 | write_sq_release_buffers(); |
@@ -1025,7 +1025,7 @@ static int sq_ioctl(struct file *file, u_int cmd, u_long arg) | |||
1025 | */ | 1025 | */ |
1026 | result = 0 ; | 1026 | result = 0 ; |
1027 | if (file->f_mode & FMODE_WRITE) { | 1027 | if (file->f_mode & FMODE_WRITE) { |
1028 | result = sq_fsync(file, file->f_path.dentry); | 1028 | result = sq_fsync(); |
1029 | sq_reset_output() ; | 1029 | sq_reset_output() ; |
1030 | } | 1030 | } |
1031 | /* if we are the shared resource owner then release them */ | 1031 | /* if we are the shared resource owner then release them */ |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index ecdf30eb5879..4aba7646dd9c 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -173,7 +173,7 @@ const char *snd_hda_get_jack_type(u32 cfg) | |||
173 | "Line Out", "Speaker", "HP Out", "CD", | 173 | "Line Out", "Speaker", "HP Out", "CD", |
174 | "SPDIF Out", "Digital Out", "Modem Line", "Modem Hand", | 174 | "SPDIF Out", "Digital Out", "Modem Line", "Modem Hand", |
175 | "Line In", "Aux", "Mic", "Telephony", | 175 | "Line In", "Aux", "Mic", "Telephony", |
176 | "SPDIF In", "Digitial In", "Reserved", "Other" | 176 | "SPDIF In", "Digital In", "Reserved", "Other" |
177 | }; | 177 | }; |
178 | 178 | ||
179 | return jack_types[(cfg & AC_DEFCFG_DEVICE) | 179 | return jack_types[(cfg & AC_DEFCFG_DEVICE) |
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index 7dd846380a50..d0d7ac1e99d2 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c | |||
@@ -320,7 +320,7 @@ int snd_hdmi_get_eld(struct hda_codec *codec, hda_nid_t nid, | |||
320 | unsigned char *buf, int *eld_size) | 320 | unsigned char *buf, int *eld_size) |
321 | { | 321 | { |
322 | int i; | 322 | int i; |
323 | int ret; | 323 | int ret = 0; |
324 | int size; | 324 | int size; |
325 | 325 | ||
326 | /* | 326 | /* |
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 43c2ea539561..2dbe767be16b 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c | |||
@@ -740,7 +740,7 @@ EXPORT_SYMBOL_HDA(snd_hda_activate_path); | |||
740 | static void path_power_down_sync(struct hda_codec *codec, struct nid_path *path) | 740 | static void path_power_down_sync(struct hda_codec *codec, struct nid_path *path) |
741 | { | 741 | { |
742 | struct hda_gen_spec *spec = codec->spec; | 742 | struct hda_gen_spec *spec = codec->spec; |
743 | bool changed; | 743 | bool changed = false; |
744 | int i; | 744 | int i; |
745 | 745 | ||
746 | if (!spec->power_down_unused || path->active) | 746 | if (!spec->power_down_unused || path->active) |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 418bfc0eb0a3..bcd40ee488e3 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -134,8 +134,8 @@ MODULE_PARM_DESC(power_save, "Automatic power-saving timeout " | |||
134 | * this may give more power-saving, but will take longer time to | 134 | * this may give more power-saving, but will take longer time to |
135 | * wake up. | 135 | * wake up. |
136 | */ | 136 | */ |
137 | static int power_save_controller = -1; | 137 | static bool power_save_controller = 1; |
138 | module_param(power_save_controller, bint, 0644); | 138 | module_param(power_save_controller, bool, 0644); |
139 | MODULE_PARM_DESC(power_save_controller, "Reset controller in power save mode."); | 139 | MODULE_PARM_DESC(power_save_controller, "Reset controller in power save mode."); |
140 | #endif /* CONFIG_PM */ | 140 | #endif /* CONFIG_PM */ |
141 | 141 | ||
@@ -2931,8 +2931,6 @@ static int azx_runtime_idle(struct device *dev) | |||
2931 | struct snd_card *card = dev_get_drvdata(dev); | 2931 | struct snd_card *card = dev_get_drvdata(dev); |
2932 | struct azx *chip = card->private_data; | 2932 | struct azx *chip = card->private_data; |
2933 | 2933 | ||
2934 | if (power_save_controller > 0) | ||
2935 | return 0; | ||
2936 | if (!power_save_controller || | 2934 | if (!power_save_controller || |
2937 | !(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) | 2935 | !(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) |
2938 | return -EBUSY; | 2936 | return -EBUSY; |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 78e1827d0a95..de8ac5c07fd0 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -1196,7 +1196,7 @@ static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll) | |||
1196 | 1196 | ||
1197 | _snd_printd(SND_PR_VERBOSE, | 1197 | _snd_printd(SND_PR_VERBOSE, |
1198 | "HDMI status: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n", | 1198 | "HDMI status: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n", |
1199 | codec->addr, pin_nid, eld->monitor_present, eld->eld_valid); | 1199 | codec->addr, pin_nid, pin_eld->monitor_present, eld->eld_valid); |
1200 | 1200 | ||
1201 | if (eld->eld_valid) { | 1201 | if (eld->eld_valid) { |
1202 | if (snd_hdmi_get_eld(codec, pin_nid, eld->eld_buffer, | 1202 | if (snd_hdmi_get_eld(codec, pin_nid, eld->eld_buffer, |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 563c24df4d6f..f15c36bde540 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -3440,7 +3440,8 @@ static int alc662_parse_auto_config(struct hda_codec *codec) | |||
3440 | const hda_nid_t *ssids; | 3440 | const hda_nid_t *ssids; |
3441 | 3441 | ||
3442 | if (codec->vendor_id == 0x10ec0272 || codec->vendor_id == 0x10ec0663 || | 3442 | if (codec->vendor_id == 0x10ec0272 || codec->vendor_id == 0x10ec0663 || |
3443 | codec->vendor_id == 0x10ec0665 || codec->vendor_id == 0x10ec0670) | 3443 | codec->vendor_id == 0x10ec0665 || codec->vendor_id == 0x10ec0670 || |
3444 | codec->vendor_id == 0x10ec0671) | ||
3444 | ssids = alc663_ssids; | 3445 | ssids = alc663_ssids; |
3445 | else | 3446 | else |
3446 | ssids = alc662_ssids; | 3447 | ssids = alc662_ssids; |
@@ -3894,6 +3895,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
3894 | { .id = 0x10ec0665, .name = "ALC665", .patch = patch_alc662 }, | 3895 | { .id = 0x10ec0665, .name = "ALC665", .patch = patch_alc662 }, |
3895 | { .id = 0x10ec0668, .name = "ALC668", .patch = patch_alc662 }, | 3896 | { .id = 0x10ec0668, .name = "ALC668", .patch = patch_alc662 }, |
3896 | { .id = 0x10ec0670, .name = "ALC670", .patch = patch_alc662 }, | 3897 | { .id = 0x10ec0670, .name = "ALC670", .patch = patch_alc662 }, |
3898 | { .id = 0x10ec0671, .name = "ALC671", .patch = patch_alc662 }, | ||
3897 | { .id = 0x10ec0680, .name = "ALC680", .patch = patch_alc680 }, | 3899 | { .id = 0x10ec0680, .name = "ALC680", .patch = patch_alc680 }, |
3898 | { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 }, | 3900 | { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 }, |
3899 | { .id = 0x10ec0882, .name = "ALC882", .patch = patch_alc882 }, | 3901 | { .id = 0x10ec0882, .name = "ALC882", .patch = patch_alc882 }, |
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index 01f7f37a8410..934dec98e2ce 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c | |||
@@ -1175,7 +1175,7 @@ static void snd_mixart_proc_read(struct snd_info_entry *entry, | |||
1175 | 1175 | ||
1176 | snd_iprintf(buffer, "\tstreaming : %d\n", streaming); | 1176 | snd_iprintf(buffer, "\tstreaming : %d\n", streaming); |
1177 | snd_iprintf(buffer, "\tmailbox : %d\n", mailbox); | 1177 | snd_iprintf(buffer, "\tmailbox : %d\n", mailbox); |
1178 | snd_iprintf(buffer, "\tinterrups handling : %d\n\n", interr); | 1178 | snd_iprintf(buffer, "\tinterrupts handling : %d\n\n", interr); |
1179 | } | 1179 | } |
1180 | } /* endif elf loaded */ | 1180 | } /* endif elf loaded */ |
1181 | } | 1181 | } |
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index f9b5229b2723..8f489de5c4c6 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c | |||
@@ -295,18 +295,5 @@ static struct pcmcia_driver pdacf_cs_driver = { | |||
295 | .suspend = pdacf_suspend, | 295 | .suspend = pdacf_suspend, |
296 | .resume = pdacf_resume, | 296 | .resume = pdacf_resume, |
297 | #endif | 297 | #endif |
298 | |||
299 | }; | 298 | }; |
300 | 299 | module_pcmcia_driver(pdacf_cs_driver); | |
301 | static int __init init_pdacf(void) | ||
302 | { | ||
303 | return pcmcia_register_driver(&pdacf_cs_driver); | ||
304 | } | ||
305 | |||
306 | static void __exit exit_pdacf(void) | ||
307 | { | ||
308 | pcmcia_unregister_driver(&pdacf_cs_driver); | ||
309 | } | ||
310 | |||
311 | module_init(init_pdacf); | ||
312 | module_exit(exit_pdacf); | ||
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c index 8f9350475c7b..d4db7ecaa6bf 100644 --- a/sound/pcmcia/vx/vxpocket.c +++ b/sound/pcmcia/vx/vxpocket.c | |||
@@ -367,16 +367,4 @@ static struct pcmcia_driver vxp_cs_driver = { | |||
367 | .resume = vxp_resume, | 367 | .resume = vxp_resume, |
368 | #endif | 368 | #endif |
369 | }; | 369 | }; |
370 | 370 | module_pcmcia_driver(vxp_cs_driver); | |
371 | static int __init init_vxpocket(void) | ||
372 | { | ||
373 | return pcmcia_register_driver(&vxp_cs_driver); | ||
374 | } | ||
375 | |||
376 | static void __exit exit_vxpocket(void) | ||
377 | { | ||
378 | pcmcia_unregister_driver(&vxp_cs_driver); | ||
379 | } | ||
380 | |||
381 | module_init(init_vxpocket); | ||
382 | module_exit(exit_vxpocket); | ||
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index ac948a671ea6..e7d34711412c 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c | |||
@@ -364,6 +364,39 @@ int arizona_out_ev(struct snd_soc_dapm_widget *w, | |||
364 | } | 364 | } |
365 | EXPORT_SYMBOL_GPL(arizona_out_ev); | 365 | EXPORT_SYMBOL_GPL(arizona_out_ev); |
366 | 366 | ||
367 | int arizona_hp_ev(struct snd_soc_dapm_widget *w, | ||
368 | struct snd_kcontrol *kcontrol, | ||
369 | int event) | ||
370 | { | ||
371 | struct arizona_priv *priv = snd_soc_codec_get_drvdata(w->codec); | ||
372 | unsigned int mask = 1 << w->shift; | ||
373 | unsigned int val; | ||
374 | |||
375 | switch (event) { | ||
376 | case SND_SOC_DAPM_POST_PMU: | ||
377 | val = mask; | ||
378 | break; | ||
379 | case SND_SOC_DAPM_PRE_PMD: | ||
380 | val = 0; | ||
381 | break; | ||
382 | default: | ||
383 | return -EINVAL; | ||
384 | } | ||
385 | |||
386 | /* Store the desired state for the HP outputs */ | ||
387 | priv->arizona->hp_ena &= ~mask; | ||
388 | priv->arizona->hp_ena |= val; | ||
389 | |||
390 | /* Force off if HPDET magic is active */ | ||
391 | if (priv->arizona->hpdet_magic) | ||
392 | val = 0; | ||
393 | |||
394 | snd_soc_update_bits(w->codec, ARIZONA_OUTPUT_ENABLES_1, mask, val); | ||
395 | |||
396 | return arizona_out_ev(w, kcontrol, event); | ||
397 | } | ||
398 | EXPORT_SYMBOL_GPL(arizona_hp_ev); | ||
399 | |||
367 | static unsigned int arizona_sysclk_48k_rates[] = { | 400 | static unsigned int arizona_sysclk_48k_rates[] = { |
368 | 6144000, | 401 | 6144000, |
369 | 12288000, | 402 | 12288000, |
diff --git a/sound/soc/codecs/arizona.h b/sound/soc/codecs/arizona.h index 116372c91f5d..13dd2916b721 100644 --- a/sound/soc/codecs/arizona.h +++ b/sound/soc/codecs/arizona.h | |||
@@ -184,6 +184,9 @@ extern int arizona_in_ev(struct snd_soc_dapm_widget *w, | |||
184 | extern int arizona_out_ev(struct snd_soc_dapm_widget *w, | 184 | extern int arizona_out_ev(struct snd_soc_dapm_widget *w, |
185 | struct snd_kcontrol *kcontrol, | 185 | struct snd_kcontrol *kcontrol, |
186 | int event); | 186 | int event); |
187 | extern int arizona_hp_ev(struct snd_soc_dapm_widget *w, | ||
188 | struct snd_kcontrol *kcontrol, | ||
189 | int event); | ||
187 | 190 | ||
188 | extern int arizona_set_sysclk(struct snd_soc_codec *codec, int clk_id, | 191 | extern int arizona_set_sysclk(struct snd_soc_codec *codec, int clk_id, |
189 | int source, unsigned int freq, int dir); | 192 | int source, unsigned int freq, int dir); |
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c index fc176044994d..fc176044994d 100755..100644 --- a/sound/soc/codecs/max98090.c +++ b/sound/soc/codecs/max98090.c | |||
diff --git a/sound/soc/codecs/max98090.h b/sound/soc/codecs/max98090.h index 7e103f249053..7e103f249053 100755..100644 --- a/sound/soc/codecs/max98090.h +++ b/sound/soc/codecs/max98090.h | |||
diff --git a/sound/soc/codecs/si476x.c b/sound/soc/codecs/si476x.c index f2d61a187830..566ea3256e2d 100644 --- a/sound/soc/codecs/si476x.c +++ b/sound/soc/codecs/si476x.c | |||
@@ -159,6 +159,7 @@ static int si476x_codec_hw_params(struct snd_pcm_substream *substream, | |||
159 | switch (params_format(params)) { | 159 | switch (params_format(params)) { |
160 | case SNDRV_PCM_FORMAT_S8: | 160 | case SNDRV_PCM_FORMAT_S8: |
161 | width = SI476X_PCM_FORMAT_S8; | 161 | width = SI476X_PCM_FORMAT_S8; |
162 | break; | ||
162 | case SNDRV_PCM_FORMAT_S16_LE: | 163 | case SNDRV_PCM_FORMAT_S16_LE: |
163 | width = SI476X_PCM_FORMAT_S16_LE; | 164 | width = SI476X_PCM_FORMAT_S16_LE; |
164 | break; | 165 | break; |
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index b82bbf584146..15bc31f1abb1 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c | |||
@@ -584,7 +584,7 @@ static int wm5102_sysclk_ev(struct snd_soc_dapm_widget *w, | |||
584 | struct snd_kcontrol *kcontrol, int event) | 584 | struct snd_kcontrol *kcontrol, int event) |
585 | { | 585 | { |
586 | struct snd_soc_codec *codec = w->codec; | 586 | struct snd_soc_codec *codec = w->codec; |
587 | struct arizona *arizona = dev_get_drvdata(codec->dev); | 587 | struct arizona *arizona = dev_get_drvdata(codec->dev->parent); |
588 | struct regmap *regmap = codec->control_data; | 588 | struct regmap *regmap = codec->control_data; |
589 | const struct reg_default *patch = NULL; | 589 | const struct reg_default *patch = NULL; |
590 | int i, patch_size; | 590 | int i, patch_size; |
@@ -1131,11 +1131,11 @@ ARIZONA_DSP_WIDGETS(DSP1, "DSP1"), | |||
1131 | SND_SOC_DAPM_VALUE_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, | 1131 | SND_SOC_DAPM_VALUE_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, |
1132 | ARIZONA_AEC_LOOPBACK_ENA, 0, &wm5102_aec_loopback_mux), | 1132 | ARIZONA_AEC_LOOPBACK_ENA, 0, &wm5102_aec_loopback_mux), |
1133 | 1133 | ||
1134 | SND_SOC_DAPM_PGA_E("OUT1L", ARIZONA_OUTPUT_ENABLES_1, | 1134 | SND_SOC_DAPM_PGA_E("OUT1L", SND_SOC_NOPM, |
1135 | ARIZONA_OUT1L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, | 1135 | ARIZONA_OUT1L_ENA_SHIFT, 0, NULL, 0, arizona_hp_ev, |
1136 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), | 1136 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
1137 | SND_SOC_DAPM_PGA_E("OUT1R", ARIZONA_OUTPUT_ENABLES_1, | 1137 | SND_SOC_DAPM_PGA_E("OUT1R", SND_SOC_NOPM, |
1138 | ARIZONA_OUT1R_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, | 1138 | ARIZONA_OUT1R_ENA_SHIFT, 0, NULL, 0, arizona_hp_ev, |
1139 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), | 1139 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
1140 | SND_SOC_DAPM_PGA_E("OUT2L", ARIZONA_OUTPUT_ENABLES_1, | 1140 | SND_SOC_DAPM_PGA_E("OUT2L", ARIZONA_OUTPUT_ENABLES_1, |
1141 | ARIZONA_OUT2L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, | 1141 | ARIZONA_OUT2L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, |
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index cdeb301da1f6..7841b42a819c 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c | |||
@@ -551,11 +551,11 @@ SND_SOC_DAPM_AIF_IN("AIF3RX1", NULL, 0, | |||
551 | SND_SOC_DAPM_AIF_IN("AIF3RX2", NULL, 0, | 551 | SND_SOC_DAPM_AIF_IN("AIF3RX2", NULL, 0, |
552 | ARIZONA_AIF3_RX_ENABLES, ARIZONA_AIF3RX2_ENA_SHIFT, 0), | 552 | ARIZONA_AIF3_RX_ENABLES, ARIZONA_AIF3RX2_ENA_SHIFT, 0), |
553 | 553 | ||
554 | SND_SOC_DAPM_PGA_E("OUT1L", ARIZONA_OUTPUT_ENABLES_1, | 554 | SND_SOC_DAPM_PGA_E("OUT1L", SND_SOC_NOPM, |
555 | ARIZONA_OUT1L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, | 555 | ARIZONA_OUT1L_ENA_SHIFT, 0, NULL, 0, arizona_hp_ev, |
556 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), | 556 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
557 | SND_SOC_DAPM_PGA_E("OUT1R", ARIZONA_OUTPUT_ENABLES_1, | 557 | SND_SOC_DAPM_PGA_E("OUT1R", SND_SOC_NOPM, |
558 | ARIZONA_OUT1R_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, | 558 | ARIZONA_OUT1R_ENA_SHIFT, 0, NULL, 0, arizona_hp_ev, |
559 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), | 559 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
560 | SND_SOC_DAPM_PGA_E("OUT2L", ARIZONA_OUTPUT_ENABLES_1, | 560 | SND_SOC_DAPM_PGA_E("OUT2L", ARIZONA_OUTPUT_ENABLES_1, |
561 | ARIZONA_OUT2L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, | 561 | ARIZONA_OUT2L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, |
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 134e41c870b9..f8a31ad0b203 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c | |||
@@ -1083,6 +1083,8 @@ static const struct snd_soc_dapm_route wm8903_intercon[] = { | |||
1083 | { "ROP", NULL, "Right Speaker PGA" }, | 1083 | { "ROP", NULL, "Right Speaker PGA" }, |
1084 | { "RON", NULL, "Right Speaker PGA" }, | 1084 | { "RON", NULL, "Right Speaker PGA" }, |
1085 | 1085 | ||
1086 | { "Charge Pump", NULL, "CLK_DSP" }, | ||
1087 | |||
1086 | { "Left Headphone Output PGA", NULL, "Charge Pump" }, | 1088 | { "Left Headphone Output PGA", NULL, "Charge Pump" }, |
1087 | { "Right Headphone Output PGA", NULL, "Charge Pump" }, | 1089 | { "Right Headphone Output PGA", NULL, "Charge Pump" }, |
1088 | { "Left Line Output PGA", NULL, "Charge Pump" }, | 1090 | { "Left Line Output PGA", NULL, "Charge Pump" }, |
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index b47c252ef901..a2d01d10a5dd 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c | |||
@@ -125,7 +125,7 @@ SOC_ENUM("Equaliser EQ4 Bandwidth", wm8974_enum[9]), | |||
125 | SOC_ENUM("EQ4 Cut Off", wm8974_enum[10]), | 125 | SOC_ENUM("EQ4 Cut Off", wm8974_enum[10]), |
126 | SOC_SINGLE_TLV("EQ4 Volume", WM8974_EQ4, 0, 24, 1, eq_tlv), | 126 | SOC_SINGLE_TLV("EQ4 Volume", WM8974_EQ4, 0, 24, 1, eq_tlv), |
127 | 127 | ||
128 | SOC_ENUM("Equaliser EQ5 Bandwith", wm8974_enum[11]), | 128 | SOC_ENUM("Equaliser EQ5 Bandwidth", wm8974_enum[11]), |
129 | SOC_ENUM("EQ5 Cut Off", wm8974_enum[12]), | 129 | SOC_ENUM("EQ5 Cut Off", wm8974_enum[12]), |
130 | SOC_SINGLE_TLV("EQ5 Volume", WM8974_EQ5, 0, 24, 1, eq_tlv), | 130 | SOC_SINGLE_TLV("EQ5 Volume", WM8974_EQ5, 0, 24, 1, eq_tlv), |
131 | 131 | ||
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index f3f7e75f8628..9af1bddc4c62 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c | |||
@@ -828,7 +828,8 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp) | |||
828 | &buf_list); | 828 | &buf_list); |
829 | if (!buf) { | 829 | if (!buf) { |
830 | adsp_err(dsp, "Out of memory\n"); | 830 | adsp_err(dsp, "Out of memory\n"); |
831 | return -ENOMEM; | 831 | ret = -ENOMEM; |
832 | goto out_fw; | ||
832 | } | 833 | } |
833 | 834 | ||
834 | adsp_dbg(dsp, "%s.%d: Writing %d bytes at %x\n", | 835 | adsp_dbg(dsp, "%s.%d: Writing %d bytes at %x\n", |
@@ -865,7 +866,7 @@ out_fw: | |||
865 | wm_adsp_buf_free(&buf_list); | 866 | wm_adsp_buf_free(&buf_list); |
866 | out: | 867 | out: |
867 | kfree(file); | 868 | kfree(file); |
868 | return 0; | 869 | return ret; |
869 | } | 870 | } |
870 | 871 | ||
871 | int wm_adsp1_init(struct wm_adsp *adsp) | 872 | int wm_adsp1_init(struct wm_adsp *adsp) |
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c index 55464a5b0706..810c7eeb7b03 100644 --- a/sound/soc/fsl/imx-ssi.c +++ b/sound/soc/fsl/imx-ssi.c | |||
@@ -496,6 +496,8 @@ static void imx_ssi_ac97_reset(struct snd_ac97 *ac97) | |||
496 | 496 | ||
497 | if (imx_ssi->ac97_reset) | 497 | if (imx_ssi->ac97_reset) |
498 | imx_ssi->ac97_reset(ac97); | 498 | imx_ssi->ac97_reset(ac97); |
499 | /* First read sometimes fails, do a dummy read */ | ||
500 | imx_ssi_ac97_read(ac97, 0); | ||
499 | } | 501 | } |
500 | 502 | ||
501 | static void imx_ssi_ac97_warm_reset(struct snd_ac97 *ac97) | 503 | static void imx_ssi_ac97_warm_reset(struct snd_ac97 *ac97) |
@@ -504,6 +506,9 @@ static void imx_ssi_ac97_warm_reset(struct snd_ac97 *ac97) | |||
504 | 506 | ||
505 | if (imx_ssi->ac97_warm_reset) | 507 | if (imx_ssi->ac97_warm_reset) |
506 | imx_ssi->ac97_warm_reset(ac97); | 508 | imx_ssi->ac97_warm_reset(ac97); |
509 | |||
510 | /* First read sometimes fails, do a dummy read */ | ||
511 | imx_ssi_ac97_read(ac97, 0); | ||
507 | } | 512 | } |
508 | 513 | ||
509 | struct snd_ac97_bus_ops soc_ac97_ops = { | 514 | struct snd_ac97_bus_ops soc_ac97_ops = { |
diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c index 8e52c1485df3..eb4373840bb6 100644 --- a/sound/soc/fsl/pcm030-audio-fabric.c +++ b/sound/soc/fsl/pcm030-audio-fabric.c | |||
@@ -51,7 +51,7 @@ static struct snd_soc_card pcm030_card = { | |||
51 | .num_links = ARRAY_SIZE(pcm030_fabric_dai), | 51 | .num_links = ARRAY_SIZE(pcm030_fabric_dai), |
52 | }; | 52 | }; |
53 | 53 | ||
54 | static int __init pcm030_fabric_probe(struct platform_device *op) | 54 | static int pcm030_fabric_probe(struct platform_device *op) |
55 | { | 55 | { |
56 | struct device_node *np = op->dev.of_node; | 56 | struct device_node *np = op->dev.of_node; |
57 | struct device_node *platform_np; | 57 | struct device_node *platform_np; |
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index d7231e336a7c..6bbeb0bf1a73 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c | |||
@@ -972,6 +972,7 @@ static const struct snd_soc_dai_ops samsung_i2s_dai_ops = { | |||
972 | static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec) | 972 | static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec) |
973 | { | 973 | { |
974 | struct i2s_dai *i2s; | 974 | struct i2s_dai *i2s; |
975 | int ret; | ||
975 | 976 | ||
976 | i2s = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dai), GFP_KERNEL); | 977 | i2s = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dai), GFP_KERNEL); |
977 | if (i2s == NULL) | 978 | if (i2s == NULL) |
@@ -996,15 +997,17 @@ static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec) | |||
996 | i2s->i2s_dai_drv.capture.channels_max = 2; | 997 | i2s->i2s_dai_drv.capture.channels_max = 2; |
997 | i2s->i2s_dai_drv.capture.rates = SAMSUNG_I2S_RATES; | 998 | i2s->i2s_dai_drv.capture.rates = SAMSUNG_I2S_RATES; |
998 | i2s->i2s_dai_drv.capture.formats = SAMSUNG_I2S_FMTS; | 999 | i2s->i2s_dai_drv.capture.formats = SAMSUNG_I2S_FMTS; |
1000 | dev_set_drvdata(&i2s->pdev->dev, i2s); | ||
999 | } else { /* Create a new platform_device for Secondary */ | 1001 | } else { /* Create a new platform_device for Secondary */ |
1000 | i2s->pdev = platform_device_register_resndata(NULL, | 1002 | i2s->pdev = platform_device_alloc("samsung-i2s-sec", -1); |
1001 | "samsung-i2s-sec", -1, NULL, 0, NULL, 0); | ||
1002 | if (IS_ERR(i2s->pdev)) | 1003 | if (IS_ERR(i2s->pdev)) |
1003 | return NULL; | 1004 | return NULL; |
1004 | } | ||
1005 | 1005 | ||
1006 | /* Pre-assign snd_soc_dai_set_drvdata */ | 1006 | platform_set_drvdata(i2s->pdev, i2s); |
1007 | dev_set_drvdata(&i2s->pdev->dev, i2s); | 1007 | ret = platform_device_add(i2s->pdev); |
1008 | if (ret < 0) | ||
1009 | return NULL; | ||
1010 | } | ||
1008 | 1011 | ||
1009 | return i2s; | 1012 | return i2s; |
1010 | } | 1013 | } |
@@ -1107,6 +1110,10 @@ static int samsung_i2s_probe(struct platform_device *pdev) | |||
1107 | 1110 | ||
1108 | if (samsung_dai_type == TYPE_SEC) { | 1111 | if (samsung_dai_type == TYPE_SEC) { |
1109 | sec_dai = dev_get_drvdata(&pdev->dev); | 1112 | sec_dai = dev_get_drvdata(&pdev->dev); |
1113 | if (!sec_dai) { | ||
1114 | dev_err(&pdev->dev, "Unable to get drvdata\n"); | ||
1115 | return -EFAULT; | ||
1116 | } | ||
1110 | snd_soc_register_dai(&sec_dai->pdev->dev, | 1117 | snd_soc_register_dai(&sec_dai->pdev->dev, |
1111 | &sec_dai->i2s_dai_drv); | 1118 | &sec_dai->i2s_dai_drv); |
1112 | asoc_dma_platform_register(&pdev->dev); | 1119 | asoc_dma_platform_register(&pdev->dev); |
diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c index 19eff8fc4fdd..1a8b03e4b41b 100644 --- a/sound/soc/sh/dma-sh7760.c +++ b/sound/soc/sh/dma-sh7760.c | |||
@@ -342,8 +342,8 @@ static int camelot_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
342 | return 0; | 342 | return 0; |
343 | } | 343 | } |
344 | 344 | ||
345 | static struct snd_soc_platform sh7760_soc_platform = { | 345 | static struct snd_soc_platform_driver sh7760_soc_platform = { |
346 | .pcm_ops = &camelot_pcm_ops, | 346 | .ops = &camelot_pcm_ops, |
347 | .pcm_new = camelot_pcm_new, | 347 | .pcm_new = camelot_pcm_new, |
348 | .pcm_free = camelot_pcm_free, | 348 | .pcm_free = camelot_pcm_free, |
349 | }; | 349 | }; |
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index b5b3db71e253..ed0bfb0ddb96 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c | |||
@@ -211,19 +211,27 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream, | |||
211 | if (platform->driver->compr_ops && platform->driver->compr_ops->set_params) { | 211 | if (platform->driver->compr_ops && platform->driver->compr_ops->set_params) { |
212 | ret = platform->driver->compr_ops->set_params(cstream, params); | 212 | ret = platform->driver->compr_ops->set_params(cstream, params); |
213 | if (ret < 0) | 213 | if (ret < 0) |
214 | goto out; | 214 | goto err; |
215 | } | 215 | } |
216 | 216 | ||
217 | if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->set_params) { | 217 | if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->set_params) { |
218 | ret = rtd->dai_link->compr_ops->set_params(cstream); | 218 | ret = rtd->dai_link->compr_ops->set_params(cstream); |
219 | if (ret < 0) | 219 | if (ret < 0) |
220 | goto out; | 220 | goto err; |
221 | } | 221 | } |
222 | 222 | ||
223 | snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK, | 223 | snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK, |
224 | SND_SOC_DAPM_STREAM_START); | 224 | SND_SOC_DAPM_STREAM_START); |
225 | 225 | ||
226 | out: | 226 | /* cancel any delayed stream shutdown that is pending */ |
227 | rtd->pop_wait = 0; | ||
228 | mutex_unlock(&rtd->pcm_mutex); | ||
229 | |||
230 | cancel_delayed_work_sync(&rtd->delayed_work); | ||
231 | |||
232 | return ret; | ||
233 | |||
234 | err: | ||
227 | mutex_unlock(&rtd->pcm_mutex); | 235 | mutex_unlock(&rtd->pcm_mutex); |
228 | return ret; | 236 | return ret; |
229 | } | 237 | } |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index b7e84a7cd9ee..ff4b45a5d796 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -2963,7 +2963,7 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, | |||
2963 | val = val << shift; | 2963 | val = val << shift; |
2964 | 2964 | ||
2965 | ret = snd_soc_update_bits_locked(codec, reg, val_mask, val); | 2965 | ret = snd_soc_update_bits_locked(codec, reg, val_mask, val); |
2966 | if (ret != 0) | 2966 | if (ret < 0) |
2967 | return ret; | 2967 | return ret; |
2968 | 2968 | ||
2969 | if (snd_soc_volsw_is_stereo(mc)) { | 2969 | if (snd_soc_volsw_is_stereo(mc)) { |
@@ -3140,7 +3140,7 @@ int snd_soc_bytes_put(struct snd_kcontrol *kcontrol, | |||
3140 | if (params->mask) { | 3140 | if (params->mask) { |
3141 | ret = regmap_read(codec->control_data, params->base, &val); | 3141 | ret = regmap_read(codec->control_data, params->base, &val); |
3142 | if (ret != 0) | 3142 | if (ret != 0) |
3143 | return ret; | 3143 | goto out; |
3144 | 3144 | ||
3145 | val &= params->mask; | 3145 | val &= params->mask; |
3146 | 3146 | ||
@@ -3158,13 +3158,15 @@ int snd_soc_bytes_put(struct snd_kcontrol *kcontrol, | |||
3158 | ((u32 *)data)[0] |= cpu_to_be32(val); | 3158 | ((u32 *)data)[0] |= cpu_to_be32(val); |
3159 | break; | 3159 | break; |
3160 | default: | 3160 | default: |
3161 | return -EINVAL; | 3161 | ret = -EINVAL; |
3162 | goto out; | ||
3162 | } | 3163 | } |
3163 | } | 3164 | } |
3164 | 3165 | ||
3165 | ret = regmap_raw_write(codec->control_data, params->base, | 3166 | ret = regmap_raw_write(codec->control_data, params->base, |
3166 | data, len); | 3167 | data, len); |
3167 | 3168 | ||
3169 | out: | ||
3168 | kfree(data); | 3170 | kfree(data); |
3169 | 3171 | ||
3170 | return ret; | 3172 | return ret; |
@@ -4197,7 +4199,6 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, | |||
4197 | dev_err(card->dev, | 4199 | dev_err(card->dev, |
4198 | "ASoC: Property '%s' index %d could not be read: %d\n", | 4200 | "ASoC: Property '%s' index %d could not be read: %d\n", |
4199 | propname, 2 * i, ret); | 4201 | propname, 2 * i, ret); |
4200 | kfree(routes); | ||
4201 | return -EINVAL; | 4202 | return -EINVAL; |
4202 | } | 4203 | } |
4203 | ret = of_property_read_string_index(np, propname, | 4204 | ret = of_property_read_string_index(np, propname, |
@@ -4206,7 +4207,6 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, | |||
4206 | dev_err(card->dev, | 4207 | dev_err(card->dev, |
4207 | "ASoC: Property '%s' index %d could not be read: %d\n", | 4208 | "ASoC: Property '%s' index %d could not be read: %d\n", |
4208 | propname, (2 * i) + 1, ret); | 4209 | propname, (2 * i) + 1, ret); |
4209 | kfree(routes); | ||
4210 | return -EINVAL; | 4210 | return -EINVAL; |
4211 | } | 4211 | } |
4212 | } | 4212 | } |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 1d6a9b3ceb27..d6d9ba2e6916 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -831,6 +831,9 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget, | |||
831 | if (path->weak) | 831 | if (path->weak) |
832 | continue; | 832 | continue; |
833 | 833 | ||
834 | if (path->walking) | ||
835 | return 1; | ||
836 | |||
834 | if (path->walked) | 837 | if (path->walked) |
835 | continue; | 838 | continue; |
836 | 839 | ||
@@ -838,6 +841,7 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget, | |||
838 | 841 | ||
839 | if (path->sink && path->connect) { | 842 | if (path->sink && path->connect) { |
840 | path->walked = 1; | 843 | path->walked = 1; |
844 | path->walking = 1; | ||
841 | 845 | ||
842 | /* do we need to add this widget to the list ? */ | 846 | /* do we need to add this widget to the list ? */ |
843 | if (list) { | 847 | if (list) { |
@@ -847,11 +851,14 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget, | |||
847 | dev_err(widget->dapm->dev, | 851 | dev_err(widget->dapm->dev, |
848 | "ASoC: could not add widget %s\n", | 852 | "ASoC: could not add widget %s\n", |
849 | widget->name); | 853 | widget->name); |
854 | path->walking = 0; | ||
850 | return con; | 855 | return con; |
851 | } | 856 | } |
852 | } | 857 | } |
853 | 858 | ||
854 | con += is_connected_output_ep(path->sink, list); | 859 | con += is_connected_output_ep(path->sink, list); |
860 | |||
861 | path->walking = 0; | ||
855 | } | 862 | } |
856 | } | 863 | } |
857 | 864 | ||
@@ -931,6 +938,9 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget, | |||
931 | if (path->weak) | 938 | if (path->weak) |
932 | continue; | 939 | continue; |
933 | 940 | ||
941 | if (path->walking) | ||
942 | return 1; | ||
943 | |||
934 | if (path->walked) | 944 | if (path->walked) |
935 | continue; | 945 | continue; |
936 | 946 | ||
@@ -938,6 +948,7 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget, | |||
938 | 948 | ||
939 | if (path->source && path->connect) { | 949 | if (path->source && path->connect) { |
940 | path->walked = 1; | 950 | path->walked = 1; |
951 | path->walking = 1; | ||
941 | 952 | ||
942 | /* do we need to add this widget to the list ? */ | 953 | /* do we need to add this widget to the list ? */ |
943 | if (list) { | 954 | if (list) { |
@@ -947,11 +958,14 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget, | |||
947 | dev_err(widget->dapm->dev, | 958 | dev_err(widget->dapm->dev, |
948 | "ASoC: could not add widget %s\n", | 959 | "ASoC: could not add widget %s\n", |
949 | widget->name); | 960 | widget->name); |
961 | path->walking = 0; | ||
950 | return con; | 962 | return con; |
951 | } | 963 | } |
952 | } | 964 | } |
953 | 965 | ||
954 | con += is_connected_input_ep(path->source, list); | 966 | con += is_connected_input_ep(path->source, list); |
967 | |||
968 | path->walking = 0; | ||
955 | } | 969 | } |
956 | } | 970 | } |
957 | 971 | ||
diff --git a/sound/soc/spear/spear_pcm.c b/sound/soc/spear/spear_pcm.c index 9b76cc5a1148..5e7aebe1e664 100644 --- a/sound/soc/spear/spear_pcm.c +++ b/sound/soc/spear/spear_pcm.c | |||
@@ -149,9 +149,9 @@ static void spear_pcm_free(struct snd_pcm *pcm) | |||
149 | 149 | ||
150 | static u64 spear_pcm_dmamask = DMA_BIT_MASK(32); | 150 | static u64 spear_pcm_dmamask = DMA_BIT_MASK(32); |
151 | 151 | ||
152 | static int spear_pcm_new(struct snd_card *card, | 152 | static int spear_pcm_new(struct snd_soc_pcm_runtime *rtd) |
153 | struct snd_soc_dai *dai, struct snd_pcm *pcm) | ||
154 | { | 153 | { |
154 | struct snd_card *card = rtd->card->snd_card; | ||
155 | int ret; | 155 | int ret; |
156 | 156 | ||
157 | if (!card->dev->dma_mask) | 157 | if (!card->dev->dma_mask) |
@@ -159,16 +159,16 @@ static int spear_pcm_new(struct snd_card *card, | |||
159 | if (!card->dev->coherent_dma_mask) | 159 | if (!card->dev->coherent_dma_mask) |
160 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); | 160 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); |
161 | 161 | ||
162 | if (dai->driver->playback.channels_min) { | 162 | if (rtd->cpu_dai->driver->playback.channels_min) { |
163 | ret = spear_pcm_preallocate_dma_buffer(pcm, | 163 | ret = spear_pcm_preallocate_dma_buffer(rtd->pcm, |
164 | SNDRV_PCM_STREAM_PLAYBACK, | 164 | SNDRV_PCM_STREAM_PLAYBACK, |
165 | spear_pcm_hardware.buffer_bytes_max); | 165 | spear_pcm_hardware.buffer_bytes_max); |
166 | if (ret) | 166 | if (ret) |
167 | return ret; | 167 | return ret; |
168 | } | 168 | } |
169 | 169 | ||
170 | if (dai->driver->capture.channels_min) { | 170 | if (rtd->cpu_dai->driver->capture.channels_min) { |
171 | ret = spear_pcm_preallocate_dma_buffer(pcm, | 171 | ret = spear_pcm_preallocate_dma_buffer(rtd->pcm, |
172 | SNDRV_PCM_STREAM_CAPTURE, | 172 | SNDRV_PCM_STREAM_CAPTURE, |
173 | spear_pcm_hardware.buffer_bytes_max); | 173 | spear_pcm_hardware.buffer_bytes_max); |
174 | if (ret) | 174 | if (ret) |
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index c925ab0adeb6..5e2c55c5b255 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c | |||
@@ -43,8 +43,6 @@ | |||
43 | static const struct snd_pcm_hardware tegra_pcm_hardware = { | 43 | static const struct snd_pcm_hardware tegra_pcm_hardware = { |
44 | .info = SNDRV_PCM_INFO_MMAP | | 44 | .info = SNDRV_PCM_INFO_MMAP | |
45 | SNDRV_PCM_INFO_MMAP_VALID | | 45 | SNDRV_PCM_INFO_MMAP_VALID | |
46 | SNDRV_PCM_INFO_PAUSE | | ||
47 | SNDRV_PCM_INFO_RESUME | | ||
48 | SNDRV_PCM_INFO_INTERLEAVED, | 46 | SNDRV_PCM_INFO_INTERLEAVED, |
49 | .formats = SNDRV_PCM_FMTBIT_S16_LE, | 47 | .formats = SNDRV_PCM_FMTBIT_S16_LE, |
50 | .channels_min = 2, | 48 | .channels_min = 2, |
@@ -127,26 +125,6 @@ static int tegra_pcm_hw_free(struct snd_pcm_substream *substream) | |||
127 | return 0; | 125 | return 0; |
128 | } | 126 | } |
129 | 127 | ||
130 | static int tegra_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | ||
131 | { | ||
132 | switch (cmd) { | ||
133 | case SNDRV_PCM_TRIGGER_START: | ||
134 | case SNDRV_PCM_TRIGGER_RESUME: | ||
135 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: | ||
136 | return snd_dmaengine_pcm_trigger(substream, | ||
137 | SNDRV_PCM_TRIGGER_START); | ||
138 | |||
139 | case SNDRV_PCM_TRIGGER_STOP: | ||
140 | case SNDRV_PCM_TRIGGER_SUSPEND: | ||
141 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: | ||
142 | return snd_dmaengine_pcm_trigger(substream, | ||
143 | SNDRV_PCM_TRIGGER_STOP); | ||
144 | default: | ||
145 | return -EINVAL; | ||
146 | } | ||
147 | return 0; | ||
148 | } | ||
149 | |||
150 | static int tegra_pcm_mmap(struct snd_pcm_substream *substream, | 128 | static int tegra_pcm_mmap(struct snd_pcm_substream *substream, |
151 | struct vm_area_struct *vma) | 129 | struct vm_area_struct *vma) |
152 | { | 130 | { |
@@ -164,7 +142,7 @@ static struct snd_pcm_ops tegra_pcm_ops = { | |||
164 | .ioctl = snd_pcm_lib_ioctl, | 142 | .ioctl = snd_pcm_lib_ioctl, |
165 | .hw_params = tegra_pcm_hw_params, | 143 | .hw_params = tegra_pcm_hw_params, |
166 | .hw_free = tegra_pcm_hw_free, | 144 | .hw_free = tegra_pcm_hw_free, |
167 | .trigger = tegra_pcm_trigger, | 145 | .trigger = snd_dmaengine_pcm_trigger, |
168 | .pointer = snd_dmaengine_pcm_pointer, | 146 | .pointer = snd_dmaengine_pcm_pointer, |
169 | .mmap = tegra_pcm_mmap, | 147 | .mmap = tegra_pcm_mmap, |
170 | }; | 148 | }; |
diff --git a/sound/soc/ux500/Kconfig b/sound/soc/ux500/Kconfig index 069330d82be5..6b799c0e88df 100644 --- a/sound/soc/ux500/Kconfig +++ b/sound/soc/ux500/Kconfig | |||
@@ -20,8 +20,8 @@ config SND_SOC_UX500_PLAT_DMA | |||
20 | help | 20 | help |
21 | Say Y if you want to enable the Ux500 platform-driver. | 21 | Say Y if you want to enable the Ux500 platform-driver. |
22 | 22 | ||
23 | +config SND_SOC_UX500_MACH_MOP500 | 23 | config SND_SOC_UX500_MACH_MOP500 |
24 | + tristate "Machine - MOP500 (Ux500 + AB8500)" | 24 | tristate "Machine - MOP500 (Ux500 + AB8500)" |
25 | depends on AB8500_CORE && AB8500_GPADC && SND_SOC_UX500 | 25 | depends on AB8500_CORE && AB8500_GPADC && SND_SOC_UX500 |
26 | select SND_SOC_AB8500_CODEC | 26 | select SND_SOC_AB8500_CODEC |
27 | select SND_SOC_UX500_PLAT_MSP_I2S | 27 | select SND_SOC_UX500_PLAT_MSP_I2S |
diff --git a/sound/sound_firmware.c b/sound/sound_firmware.c index e14903468051..b155137ee312 100644 --- a/sound/sound_firmware.c +++ b/sound/sound_firmware.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <linux/vmalloc.h> | 1 | #include <linux/vmalloc.h> |
2 | #include <linux/module.h> | 2 | #include <linux/module.h> |
3 | #include <linux/fs.h> | 3 | #include <linux/fs.h> |
4 | #include <linux/file.h> | ||
4 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
5 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
6 | #include <asm/uaccess.h> | 7 | #include <asm/uaccess.h> |
@@ -23,14 +24,14 @@ static int do_mod_firmware_load(const char *fn, char **fp) | |||
23 | if (l <= 0 || l > 131072) | 24 | if (l <= 0 || l > 131072) |
24 | { | 25 | { |
25 | printk(KERN_INFO "Invalid firmware '%s'\n", fn); | 26 | printk(KERN_INFO "Invalid firmware '%s'\n", fn); |
26 | filp_close(filp, NULL); | 27 | fput(filp); |
27 | return 0; | 28 | return 0; |
28 | } | 29 | } |
29 | dp = vmalloc(l); | 30 | dp = vmalloc(l); |
30 | if (dp == NULL) | 31 | if (dp == NULL) |
31 | { | 32 | { |
32 | printk(KERN_INFO "Out of memory loading '%s'.\n", fn); | 33 | printk(KERN_INFO "Out of memory loading '%s'.\n", fn); |
33 | filp_close(filp, NULL); | 34 | fput(filp); |
34 | return 0; | 35 | return 0; |
35 | } | 36 | } |
36 | pos = 0; | 37 | pos = 0; |
@@ -38,10 +39,10 @@ static int do_mod_firmware_load(const char *fn, char **fp) | |||
38 | { | 39 | { |
39 | printk(KERN_INFO "Failed to read '%s'.\n", fn); | 40 | printk(KERN_INFO "Failed to read '%s'.\n", fn); |
40 | vfree(dp); | 41 | vfree(dp); |
41 | filp_close(filp, NULL); | 42 | fput(filp); |
42 | return 0; | 43 | return 0; |
43 | } | 44 | } |
44 | filp_close(filp, NULL); | 45 | fput(filp); |
45 | *fp = dp; | 46 | *fp = dp; |
46 | return (int) l; | 47 | return (int) l; |
47 | } | 48 | } |
diff --git a/sound/usb/clock.c b/sound/usb/clock.c index 5e634a2eb282..9e2703a25156 100644 --- a/sound/usb/clock.c +++ b/sound/usb/clock.c | |||
@@ -253,7 +253,7 @@ static int set_sample_rate_v2(struct snd_usb_audio *chip, int iface, | |||
253 | { | 253 | { |
254 | struct usb_device *dev = chip->dev; | 254 | struct usb_device *dev = chip->dev; |
255 | unsigned char data[4]; | 255 | unsigned char data[4]; |
256 | int err, crate; | 256 | int err, cur_rate, prev_rate; |
257 | int clock = snd_usb_clock_find_source(chip, fmt->clock); | 257 | int clock = snd_usb_clock_find_source(chip, fmt->clock); |
258 | 258 | ||
259 | if (clock < 0) | 259 | if (clock < 0) |
@@ -266,6 +266,19 @@ static int set_sample_rate_v2(struct snd_usb_audio *chip, int iface, | |||
266 | return -ENXIO; | 266 | return -ENXIO; |
267 | } | 267 | } |
268 | 268 | ||
269 | err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR, | ||
270 | USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN, | ||
271 | UAC2_CS_CONTROL_SAM_FREQ << 8, | ||
272 | snd_usb_ctrl_intf(chip) | (clock << 8), | ||
273 | data, sizeof(data)); | ||
274 | if (err < 0) { | ||
275 | snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq (v2)\n", | ||
276 | dev->devnum, iface, fmt->altsetting); | ||
277 | prev_rate = 0; | ||
278 | } else { | ||
279 | prev_rate = data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24); | ||
280 | } | ||
281 | |||
269 | data[0] = rate; | 282 | data[0] = rate; |
270 | data[1] = rate >> 8; | 283 | data[1] = rate >> 8; |
271 | data[2] = rate >> 16; | 284 | data[2] = rate >> 16; |
@@ -280,19 +293,31 @@ static int set_sample_rate_v2(struct snd_usb_audio *chip, int iface, | |||
280 | return err; | 293 | return err; |
281 | } | 294 | } |
282 | 295 | ||
283 | if ((err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR, | 296 | err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR, |
284 | USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN, | 297 | USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN, |
285 | UAC2_CS_CONTROL_SAM_FREQ << 8, | 298 | UAC2_CS_CONTROL_SAM_FREQ << 8, |
286 | snd_usb_ctrl_intf(chip) | (clock << 8), | 299 | snd_usb_ctrl_intf(chip) | (clock << 8), |
287 | data, sizeof(data))) < 0) { | 300 | data, sizeof(data)); |
301 | if (err < 0) { | ||
288 | snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq (v2)\n", | 302 | snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq (v2)\n", |
289 | dev->devnum, iface, fmt->altsetting); | 303 | dev->devnum, iface, fmt->altsetting); |
290 | return err; | 304 | cur_rate = 0; |
305 | } else { | ||
306 | cur_rate = data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24); | ||
291 | } | 307 | } |
292 | 308 | ||
293 | crate = data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24); | 309 | if (cur_rate != rate) { |
294 | if (crate != rate) | 310 | snd_printd(KERN_WARNING |
295 | snd_printd(KERN_WARNING "current rate %d is different from the runtime rate %d\n", crate, rate); | 311 | "current rate %d is different from the runtime rate %d\n", |
312 | cur_rate, rate); | ||
313 | } | ||
314 | |||
315 | /* Some devices doesn't respond to sample rate changes while the | ||
316 | * interface is active. */ | ||
317 | if (rate != prev_rate) { | ||
318 | usb_set_interface(dev, iface, 0); | ||
319 | usb_set_interface(dev, iface, fmt->altsetting); | ||
320 | } | ||
296 | 321 | ||
297 | return 0; | 322 | return 0; |
298 | } | 323 | } |
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index 497d2741d119..ebe91440a068 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c | |||
@@ -509,7 +509,7 @@ static int snd_nativeinstruments_control_get(struct snd_kcontrol *kcontrol, | |||
509 | else | 509 | else |
510 | ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), bRequest, | 510 | ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), bRequest, |
511 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, | 511 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, |
512 | 0, cpu_to_le16(wIndex), | 512 | 0, wIndex, |
513 | &tmp, sizeof(tmp), 1000); | 513 | &tmp, sizeof(tmp), 1000); |
514 | up_read(&mixer->chip->shutdown_rwsem); | 514 | up_read(&mixer->chip->shutdown_rwsem); |
515 | 515 | ||
@@ -540,7 +540,7 @@ static int snd_nativeinstruments_control_put(struct snd_kcontrol *kcontrol, | |||
540 | else | 540 | else |
541 | ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), bRequest, | 541 | ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), bRequest, |
542 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT, | 542 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT, |
543 | cpu_to_le16(wValue), cpu_to_le16(wIndex), | 543 | wValue, wIndex, |
544 | NULL, 0, 1000); | 544 | NULL, 0, 1000); |
545 | up_read(&mixer->chip->shutdown_rwsem); | 545 | up_read(&mixer->chip->shutdown_rwsem); |
546 | 546 | ||
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 5325a3869bb7..9c5ab22358b1 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c | |||
@@ -486,7 +486,7 @@ static int snd_usb_nativeinstruments_boot_quirk(struct usb_device *dev) | |||
486 | { | 486 | { |
487 | int ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), | 487 | int ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), |
488 | 0xaf, USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 488 | 0xaf, USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
489 | cpu_to_le16(1), 0, NULL, 0, 1000); | 489 | 1, 0, NULL, 0, 1000); |
490 | 490 | ||
491 | if (ret < 0) | 491 | if (ret < 0) |
492 | return ret; | 492 | return ret; |