aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-10-11 07:45:22 -0400
committerTakashi Iwai <tiwai@suse.de>2010-10-11 07:45:22 -0400
commit4e83998f5af010a928495988c586ea2926624db9 (patch)
treee72d346172a30bbee165d7f585784724906da416 /sound
parentdd1d3a49db4ae5c6afffadaff526b96c7993c7dd (diff)
parentd4cfa4d12f46e2520f4c1d1a92e891ce068b7464 (diff)
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'sound')
-rw-r--r--sound/core/control.c5
-rw-r--r--sound/core/pcm.c33
-rw-r--r--sound/core/pcm_native.c2
-rw-r--r--sound/i2c/other/ak4xxx-adda.c2
-rw-r--r--sound/oss/soundcard.c4
-rw-r--r--sound/pci/hda/hda_intel.c3
-rw-r--r--sound/pci/hda/patch_analog.c1
-rw-r--r--sound/pci/hda/patch_conexant.c1
-rw-r--r--sound/pci/hda/patch_nvhdmi.c2
-rw-r--r--sound/pci/hda/patch_realtek.c32
-rw-r--r--sound/pci/oxygen/oxygen.c4
-rw-r--r--sound/pci/rme9652/hdsp.c1
-rw-r--r--sound/pci/rme9652/hdspm.c1
-rw-r--r--sound/soc/sh/migor.c15
-rw-r--r--sound/soc/soc-cache.c5
15 files changed, 88 insertions, 23 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index 070aab490191..45a818002d99 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -31,6 +31,7 @@
31 31
32/* max number of user-defined controls */ 32/* max number of user-defined controls */
33#define MAX_USER_CONTROLS 32 33#define MAX_USER_CONTROLS 32
34#define MAX_CONTROL_COUNT 1028
34 35
35struct snd_kctl_ioctl { 36struct snd_kctl_ioctl {
36 struct list_head list; /* list of all ioctls */ 37 struct list_head list; /* list of all ioctls */
@@ -195,6 +196,10 @@ static struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control,
195 196
196 if (snd_BUG_ON(!control || !control->count)) 197 if (snd_BUG_ON(!control || !control->count))
197 return NULL; 198 return NULL;
199
200 if (control->count > MAX_CONTROL_COUNT)
201 return NULL;
202
198 kctl = kzalloc(sizeof(*kctl) + sizeof(struct snd_kcontrol_volatile) * control->count, GFP_KERNEL); 203 kctl = kzalloc(sizeof(*kctl) + sizeof(struct snd_kcontrol_volatile) * control->count, GFP_KERNEL);
199 if (kctl == NULL) { 204 if (kctl == NULL) {
200 snd_printk(KERN_ERR "Cannot allocate control instance\n"); 205 snd_printk(KERN_ERR "Cannot allocate control instance\n");
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 88525a958291..6b4b1287b314 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -371,14 +371,17 @@ static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry,
371 struct snd_info_buffer *buffer) 371 struct snd_info_buffer *buffer)
372{ 372{
373 struct snd_pcm_substream *substream = entry->private_data; 373 struct snd_pcm_substream *substream = entry->private_data;
374 struct snd_pcm_runtime *runtime = substream->runtime; 374 struct snd_pcm_runtime *runtime;
375
376 mutex_lock(&substream->pcm->open_mutex);
377 runtime = substream->runtime;
375 if (!runtime) { 378 if (!runtime) {
376 snd_iprintf(buffer, "closed\n"); 379 snd_iprintf(buffer, "closed\n");
377 return; 380 goto unlock;
378 } 381 }
379 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) { 382 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) {
380 snd_iprintf(buffer, "no setup\n"); 383 snd_iprintf(buffer, "no setup\n");
381 return; 384 goto unlock;
382 } 385 }
383 snd_iprintf(buffer, "access: %s\n", snd_pcm_access_name(runtime->access)); 386 snd_iprintf(buffer, "access: %s\n", snd_pcm_access_name(runtime->access));
384 snd_iprintf(buffer, "format: %s\n", snd_pcm_format_name(runtime->format)); 387 snd_iprintf(buffer, "format: %s\n", snd_pcm_format_name(runtime->format));
@@ -397,20 +400,25 @@ static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry,
397 snd_iprintf(buffer, "OSS period frames: %lu\n", (unsigned long)runtime->oss.period_frames); 400 snd_iprintf(buffer, "OSS period frames: %lu\n", (unsigned long)runtime->oss.period_frames);
398 } 401 }
399#endif 402#endif
403 unlock:
404 mutex_unlock(&substream->pcm->open_mutex);
400} 405}
401 406
402static void snd_pcm_substream_proc_sw_params_read(struct snd_info_entry *entry, 407static void snd_pcm_substream_proc_sw_params_read(struct snd_info_entry *entry,
403 struct snd_info_buffer *buffer) 408 struct snd_info_buffer *buffer)
404{ 409{
405 struct snd_pcm_substream *substream = entry->private_data; 410 struct snd_pcm_substream *substream = entry->private_data;
406 struct snd_pcm_runtime *runtime = substream->runtime; 411 struct snd_pcm_runtime *runtime;
412
413 mutex_lock(&substream->pcm->open_mutex);
414 runtime = substream->runtime;
407 if (!runtime) { 415 if (!runtime) {
408 snd_iprintf(buffer, "closed\n"); 416 snd_iprintf(buffer, "closed\n");
409 return; 417 goto unlock;
410 } 418 }
411 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) { 419 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) {
412 snd_iprintf(buffer, "no setup\n"); 420 snd_iprintf(buffer, "no setup\n");
413 return; 421 goto unlock;
414 } 422 }
415 snd_iprintf(buffer, "tstamp_mode: %s\n", snd_pcm_tstamp_mode_name(runtime->tstamp_mode)); 423 snd_iprintf(buffer, "tstamp_mode: %s\n", snd_pcm_tstamp_mode_name(runtime->tstamp_mode));
416 snd_iprintf(buffer, "period_step: %u\n", runtime->period_step); 424 snd_iprintf(buffer, "period_step: %u\n", runtime->period_step);
@@ -420,24 +428,29 @@ static void snd_pcm_substream_proc_sw_params_read(struct snd_info_entry *entry,
420 snd_iprintf(buffer, "silence_threshold: %lu\n", runtime->silence_threshold); 428 snd_iprintf(buffer, "silence_threshold: %lu\n", runtime->silence_threshold);
421 snd_iprintf(buffer, "silence_size: %lu\n", runtime->silence_size); 429 snd_iprintf(buffer, "silence_size: %lu\n", runtime->silence_size);
422 snd_iprintf(buffer, "boundary: %lu\n", runtime->boundary); 430 snd_iprintf(buffer, "boundary: %lu\n", runtime->boundary);
431 unlock:
432 mutex_unlock(&substream->pcm->open_mutex);
423} 433}
424 434
425static void snd_pcm_substream_proc_status_read(struct snd_info_entry *entry, 435static void snd_pcm_substream_proc_status_read(struct snd_info_entry *entry,
426 struct snd_info_buffer *buffer) 436 struct snd_info_buffer *buffer)
427{ 437{
428 struct snd_pcm_substream *substream = entry->private_data; 438 struct snd_pcm_substream *substream = entry->private_data;
429 struct snd_pcm_runtime *runtime = substream->runtime; 439 struct snd_pcm_runtime *runtime;
430 struct snd_pcm_status status; 440 struct snd_pcm_status status;
431 int err; 441 int err;
442
443 mutex_lock(&substream->pcm->open_mutex);
444 runtime = substream->runtime;
432 if (!runtime) { 445 if (!runtime) {
433 snd_iprintf(buffer, "closed\n"); 446 snd_iprintf(buffer, "closed\n");
434 return; 447 goto unlock;
435 } 448 }
436 memset(&status, 0, sizeof(status)); 449 memset(&status, 0, sizeof(status));
437 err = snd_pcm_status(substream, &status); 450 err = snd_pcm_status(substream, &status);
438 if (err < 0) { 451 if (err < 0) {
439 snd_iprintf(buffer, "error %d\n", err); 452 snd_iprintf(buffer, "error %d\n", err);
440 return; 453 goto unlock;
441 } 454 }
442 snd_iprintf(buffer, "state: %s\n", snd_pcm_state_name(status.state)); 455 snd_iprintf(buffer, "state: %s\n", snd_pcm_state_name(status.state));
443 snd_iprintf(buffer, "owner_pid : %d\n", pid_vnr(substream->pid)); 456 snd_iprintf(buffer, "owner_pid : %d\n", pid_vnr(substream->pid));
@@ -451,6 +464,8 @@ static void snd_pcm_substream_proc_status_read(struct snd_info_entry *entry,
451 snd_iprintf(buffer, "-----\n"); 464 snd_iprintf(buffer, "-----\n");
452 snd_iprintf(buffer, "hw_ptr : %ld\n", runtime->status->hw_ptr); 465 snd_iprintf(buffer, "hw_ptr : %ld\n", runtime->status->hw_ptr);
453 snd_iprintf(buffer, "appl_ptr : %ld\n", runtime->control->appl_ptr); 466 snd_iprintf(buffer, "appl_ptr : %ld\n", runtime->control->appl_ptr);
467 unlock:
468 mutex_unlock(&substream->pcm->open_mutex);
454} 469}
455 470
456#ifdef CONFIG_SND_PCM_XRUN_DEBUG 471#ifdef CONFIG_SND_PCM_XRUN_DEBUG
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index eb4094270a4f..8bc7cb3db330 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1994,6 +1994,8 @@ void snd_pcm_release_substream(struct snd_pcm_substream *substream)
1994 substream->ops->close(substream); 1994 substream->ops->close(substream);
1995 substream->hw_opened = 0; 1995 substream->hw_opened = 0;
1996 } 1996 }
1997 if (pm_qos_request_active(&substream->latency_pm_qos_req))
1998 pm_qos_remove_request(&substream->latency_pm_qos_req);
1997 if (substream->pcm_release) { 1999 if (substream->pcm_release) {
1998 substream->pcm_release(substream); 2000 substream->pcm_release(substream);
1999 substream->pcm_release = NULL; 2001 substream->pcm_release = NULL;
diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c
index ebab6c7aaa81..57ccba88700d 100644
--- a/sound/i2c/other/ak4xxx-adda.c
+++ b/sound/i2c/other/ak4xxx-adda.c
@@ -900,7 +900,7 @@ static int proc_init(struct snd_akm4xxx *ak)
900 return 0; 900 return 0;
901} 901}
902#else /* !CONFIG_PROC_FS */ 902#else /* !CONFIG_PROC_FS */
903static int proc_init(struct snd_akm4xxx *ak) {} 903static int proc_init(struct snd_akm4xxx *ak) { return 0; }
904#endif 904#endif
905 905
906int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak) 906int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak)
diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c
index 938ed94f904f..a5ab61ed0a97 100644
--- a/sound/oss/soundcard.c
+++ b/sound/oss/soundcard.c
@@ -392,11 +392,11 @@ static long sound_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
392 case SND_DEV_DSP: 392 case SND_DEV_DSP:
393 case SND_DEV_DSP16: 393 case SND_DEV_DSP16:
394 case SND_DEV_AUDIO: 394 case SND_DEV_AUDIO:
395 return audio_ioctl(dev, file, cmd, p); 395 ret = audio_ioctl(dev, file, cmd, p);
396 break; 396 break;
397 397
398 case SND_DEV_MIDIN: 398 case SND_DEV_MIDIN:
399 return MIDIbuf_ioctl(dev, file, cmd, p); 399 ret = MIDIbuf_ioctl(dev, file, cmd, p);
400 break; 400 break;
401 401
402 } 402 }
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 1053fff4bd0a..34940a079051 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -126,6 +126,7 @@ MODULE_SUPPORTED_DEVICE("{{Intel, ICH6},"
126 "{Intel, ICH10}," 126 "{Intel, ICH10},"
127 "{Intel, PCH}," 127 "{Intel, PCH},"
128 "{Intel, CPT}," 128 "{Intel, CPT},"
129 "{Intel, PBG},"
129 "{Intel, SCH}," 130 "{Intel, SCH},"
130 "{ATI, SB450}," 131 "{ATI, SB450},"
131 "{ATI, SB600}," 132 "{ATI, SB600},"
@@ -2749,6 +2750,8 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
2749 { PCI_DEVICE(0x8086, 0x3b57), .driver_data = AZX_DRIVER_ICH }, 2750 { PCI_DEVICE(0x8086, 0x3b57), .driver_data = AZX_DRIVER_ICH },
2750 /* CPT */ 2751 /* CPT */
2751 { PCI_DEVICE(0x8086, 0x1c20), .driver_data = AZX_DRIVER_PCH }, 2752 { PCI_DEVICE(0x8086, 0x1c20), .driver_data = AZX_DRIVER_PCH },
2753 /* PBG */
2754 { PCI_DEVICE(0x8086, 0x1d20), .driver_data = AZX_DRIVER_PCH },
2752 /* SCH */ 2755 /* SCH */
2753 { PCI_DEVICE(0x8086, 0x811b), .driver_data = AZX_DRIVER_SCH }, 2756 { PCI_DEVICE(0x8086, 0x811b), .driver_data = AZX_DRIVER_SCH },
2754 /* ATI SB 450/600 */ 2757 /* ATI SB 450/600 */
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index b697fd2a6f8b..10bbbaf6ebc3 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -3641,6 +3641,7 @@ static struct snd_pci_quirk ad1984_cfg_tbl[] = {
3641 /* Lenovo Thinkpad T61/X61 */ 3641 /* Lenovo Thinkpad T61/X61 */
3642 SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo Thinkpad", AD1984_THINKPAD), 3642 SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo Thinkpad", AD1984_THINKPAD),
3643 SND_PCI_QUIRK(0x1028, 0x0214, "Dell T3400", AD1984_DELL_DESKTOP), 3643 SND_PCI_QUIRK(0x1028, 0x0214, "Dell T3400", AD1984_DELL_DESKTOP),
3644 SND_PCI_QUIRK(0x1028, 0x0233, "Dell Latitude E6400", AD1984_DELL_DESKTOP),
3644 {} 3645 {}
3645}; 3646};
3646 3647
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 71f9d6475b09..972e7c453b3d 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -3092,6 +3092,7 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = {
3092 SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTO), 3092 SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTO),
3093 SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), 3093 SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD),
3094 SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP), 3094 SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP),
3095 SND_PCI_QUIRK(0x1179, 0xff1e, "Toshiba Satellite C650D", CXT5066_IDEAPAD),
3095 SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5), 3096 SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5),
3096 SND_PCI_QUIRK(0x1179, 0xffe0, "Toshiba Satellite Pro T130-15F", CXT5066_OLPC_XO_1_5), 3097 SND_PCI_QUIRK(0x1179, 0xffe0, "Toshiba Satellite Pro T130-15F", CXT5066_OLPC_XO_1_5),
3097 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400s", CXT5066_THINKPAD), 3098 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400s", CXT5066_THINKPAD),
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c
index 69b950d527c3..baa108b9d6aa 100644
--- a/sound/pci/hda/patch_nvhdmi.c
+++ b/sound/pci/hda/patch_nvhdmi.c
@@ -84,7 +84,7 @@ static struct hda_verb nvhdmi_basic_init_7x[] = {
84#else 84#else
85/* support all rates and formats */ 85/* support all rates and formats */
86#define SUPPORTED_RATES \ 86#define SUPPORTED_RATES \
87 (SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |\ 87 (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |\
88 SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 |\ 88 SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 |\
89 SNDRV_PCM_RATE_192000) 89 SNDRV_PCM_RATE_192000)
90#define SUPPORTED_MAXBPS 24 90#define SUPPORTED_MAXBPS 24
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index bcbf9160ed81..a432e6efd19b 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1594,12 +1594,22 @@ static void alc_auto_parse_digital(struct hda_codec *codec)
1594 } 1594 }
1595 1595
1596 if (spec->autocfg.dig_in_pin) { 1596 if (spec->autocfg.dig_in_pin) {
1597 hda_nid_t dig_nid; 1597 dig_nid = codec->start_nid;
1598 err = snd_hda_get_connections(codec, 1598 for (i = 0; i < codec->num_nodes; i++, dig_nid++) {
1599 spec->autocfg.dig_in_pin, 1599 unsigned int wcaps = get_wcaps(codec, dig_nid);
1600 &dig_nid, 1); 1600 if (get_wcaps_type(wcaps) != AC_WID_AUD_IN)
1601 if (err > 0) 1601 continue;
1602 spec->dig_in_nid = dig_nid; 1602 if (!(wcaps & AC_WCAP_DIGITAL))
1603 continue;
1604 if (!(wcaps & AC_WCAP_CONN_LIST))
1605 continue;
1606 err = get_connection_index(codec, dig_nid,
1607 spec->autocfg.dig_in_pin);
1608 if (err >= 0) {
1609 spec->dig_in_nid = dig_nid;
1610 break;
1611 }
1612 }
1603 } 1613 }
1604} 1614}
1605 1615
@@ -14453,6 +14463,7 @@ static void alc269_auto_init(struct hda_codec *codec)
14453 14463
14454enum { 14464enum {
14455 ALC269_FIXUP_SONY_VAIO, 14465 ALC269_FIXUP_SONY_VAIO,
14466 ALC269_FIXUP_DELL_M101Z,
14456}; 14467};
14457 14468
14458static const struct hda_verb alc269_sony_vaio_fixup_verbs[] = { 14469static const struct hda_verb alc269_sony_vaio_fixup_verbs[] = {
@@ -14464,11 +14475,20 @@ static const struct alc_fixup alc269_fixups[] = {
14464 [ALC269_FIXUP_SONY_VAIO] = { 14475 [ALC269_FIXUP_SONY_VAIO] = {
14465 .verbs = alc269_sony_vaio_fixup_verbs 14476 .verbs = alc269_sony_vaio_fixup_verbs
14466 }, 14477 },
14478 [ALC269_FIXUP_DELL_M101Z] = {
14479 .verbs = (const struct hda_verb[]) {
14480 /* Enables internal speaker */
14481 {0x20, AC_VERB_SET_COEF_INDEX, 13},
14482 {0x20, AC_VERB_SET_PROC_COEF, 0x4040},
14483 {}
14484 }
14485 },
14467}; 14486};
14468 14487
14469static struct snd_pci_quirk alc269_fixup_tbl[] = { 14488static struct snd_pci_quirk alc269_fixup_tbl[] = {
14470 SND_PCI_QUIRK(0x104d, 0x9071, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), 14489 SND_PCI_QUIRK(0x104d, 0x9071, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
14471 SND_PCI_QUIRK(0x104d, 0x9077, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), 14490 SND_PCI_QUIRK(0x104d, 0x9077, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
14491 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
14472 {} 14492 {}
14473}; 14493};
14474 14494
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c
index 1d915efb2695..98a8eb3c92f7 100644
--- a/sound/pci/oxygen/oxygen.c
+++ b/sound/pci/oxygen/oxygen.c
@@ -545,6 +545,10 @@ static int __devinit get_oxygen_model(struct oxygen *chip,
545 chip->model.suspend = claro_suspend; 545 chip->model.suspend = claro_suspend;
546 chip->model.resume = claro_resume; 546 chip->model.resume = claro_resume;
547 chip->model.set_adc_params = set_ak5385_params; 547 chip->model.set_adc_params = set_ak5385_params;
548 chip->model.device_config = PLAYBACK_0_TO_I2S |
549 PLAYBACK_1_TO_SPDIF |
550 CAPTURE_0_FROM_I2S_2 |
551 CAPTURE_1_FROM_SPDIF;
548 break; 552 break;
549 } 553 }
550 if (id->driver_data == MODEL_MERIDIAN || 554 if (id->driver_data == MODEL_MERIDIAN ||
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index 599e09051663..0b720cf7783e 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -4609,6 +4609,7 @@ static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigne
4609 if (err < 0) 4609 if (err < 0)
4610 return err; 4610 return err;
4611 4611
4612 memset(&info, 0, sizeof(info));
4612 spin_lock_irqsave(&hdsp->lock, flags); 4613 spin_lock_irqsave(&hdsp->lock, flags);
4613 info.pref_sync_ref = (unsigned char)hdsp_pref_sync_ref(hdsp); 4614 info.pref_sync_ref = (unsigned char)hdsp_pref_sync_ref(hdsp);
4614 info.wordclock_sync_check = (unsigned char)hdsp_wc_sync_check(hdsp); 4615 info.wordclock_sync_check = (unsigned char)hdsp_wc_sync_check(hdsp);
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index 547b713d7204..0c98ef9156d8 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -4127,6 +4127,7 @@ static int snd_hdspm_hwdep_ioctl(struct snd_hwdep * hw, struct file *file,
4127 4127
4128 case SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO: 4128 case SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO:
4129 4129
4130 memset(&info, 0, sizeof(info));
4130 spin_lock_irq(&hdspm->lock); 4131 spin_lock_irq(&hdspm->lock);
4131 info.pref_sync_ref = hdspm_pref_sync_ref(hdspm); 4132 info.pref_sync_ref = hdspm_pref_sync_ref(hdspm);
4132 info.wordclock_sync_check = hdspm_wc_sync_check(hdspm); 4133 info.wordclock_sync_check = hdspm_wc_sync_check(hdspm);
diff --git a/sound/soc/sh/migor.c b/sound/soc/sh/migor.c
index b823a5c9b9bc..87e2b7fcbf17 100644
--- a/sound/soc/sh/migor.c
+++ b/sound/soc/sh/migor.c
@@ -12,6 +12,7 @@
12#include <linux/firmware.h> 12#include <linux/firmware.h>
13#include <linux/module.h> 13#include <linux/module.h>
14 14
15#include <asm/clkdev.h>
15#include <asm/clock.h> 16#include <asm/clock.h>
16 17
17#include <cpu/sh7722.h> 18#include <cpu/sh7722.h>
@@ -40,12 +41,12 @@ static struct clk_ops siumckb_clk_ops = {
40}; 41};
41 42
42static struct clk siumckb_clk = { 43static struct clk siumckb_clk = {
43 .name = "siumckb_clk",
44 .id = -1,
45 .ops = &siumckb_clk_ops, 44 .ops = &siumckb_clk_ops,
46 .rate = 0, /* initialised at run-time */ 45 .rate = 0, /* initialised at run-time */
47}; 46};
48 47
48static struct clk_lookup *siumckb_lookup;
49
49static int migor_hw_params(struct snd_pcm_substream *substream, 50static int migor_hw_params(struct snd_pcm_substream *substream,
50 struct snd_pcm_hw_params *params) 51 struct snd_pcm_hw_params *params)
51{ 52{
@@ -180,6 +181,13 @@ static int __init migor_init(void)
180 if (ret < 0) 181 if (ret < 0)
181 return ret; 182 return ret;
182 183
184 siumckb_lookup = clkdev_alloc(&siumckb_clk, "siumckb_clk", NULL);
185 if (!siumckb_lookup) {
186 ret = -ENOMEM;
187 goto eclkdevalloc;
188 }
189 clkdev_add(siumckb_lookup);
190
183 /* Port number used on this machine: port B */ 191 /* Port number used on this machine: port B */
184 migor_snd_device = platform_device_alloc("soc-audio", 1); 192 migor_snd_device = platform_device_alloc("soc-audio", 1);
185 if (!migor_snd_device) { 193 if (!migor_snd_device) {
@@ -200,12 +208,15 @@ static int __init migor_init(void)
200epdevadd: 208epdevadd:
201 platform_device_put(migor_snd_device); 209 platform_device_put(migor_snd_device);
202epdevalloc: 210epdevalloc:
211 clkdev_drop(siumckb_lookup);
212eclkdevalloc:
203 clk_unregister(&siumckb_clk); 213 clk_unregister(&siumckb_clk);
204 return ret; 214 return ret;
205} 215}
206 216
207static void __exit migor_exit(void) 217static void __exit migor_exit(void)
208{ 218{
219 clkdev_drop(siumckb_lookup);
209 clk_unregister(&siumckb_clk); 220 clk_unregister(&siumckb_clk);
210 platform_device_unregister(migor_snd_device); 221 platform_device_unregister(migor_snd_device);
211} 222}
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c
index adbc68ce9050..f6b0d2829ea9 100644
--- a/sound/soc/soc-cache.c
+++ b/sound/soc/soc-cache.c
@@ -203,8 +203,9 @@ static int snd_soc_8_16_write(struct snd_soc_codec *codec, unsigned int reg,
203 data[1] = (value >> 8) & 0xff; 203 data[1] = (value >> 8) & 0xff;
204 data[2] = value & 0xff; 204 data[2] = value & 0xff;
205 205
206 if (!snd_soc_codec_volatile_register(codec, reg)) 206 if (!snd_soc_codec_volatile_register(codec, reg)
207 reg_cache[reg] = value; 207 && reg < codec->reg_cache_size)
208 reg_cache[reg] = value;
208 209
209 if (codec->cache_only) { 210 if (codec->cache_only) {
210 codec->cache_sync = 1; 211 codec->cache_sync = 1;