Skip to content

Commit e7553b1

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: sound/pci/rme9652: prevent reading uninitialized stack memory ALSA: hda - Fix auto-parse of SPDIF input of Realtek codecs ASoC: Fix multi-componentism ASoC: Fix soc-cache buffer overflow bug ALSA: oxygen: fix analog capture on Claro halo cards ALSA: hda - Add Dell Latitude E6400 model quirk ASoC: fix clkdev API usage in sh/migor.c
2 parents 5ec1055 + 3b23cd2 commit e7553b1

File tree

7 files changed

+39
-10
lines changed

7 files changed

+39
-10
lines changed

sound/pci/hda/patch_analog.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3641,6 +3641,7 @@ static struct snd_pci_quirk ad1984_cfg_tbl[] = {
36413641
/* Lenovo Thinkpad T61/X61 */
36423642
SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo Thinkpad", AD1984_THINKPAD),
36433643
SND_PCI_QUIRK(0x1028, 0x0214, "Dell T3400", AD1984_DELL_DESKTOP),
3644+
SND_PCI_QUIRK(0x1028, 0x0233, "Dell Latitude E6400", AD1984_DELL_DESKTOP),
36443645
{}
36453646
};
36463647

sound/pci/hda/patch_realtek.c

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,12 +1594,22 @@ static void alc_auto_parse_digital(struct hda_codec *codec)
15941594
}
15951595

15961596
if (spec->autocfg.dig_in_pin) {
1597-
hda_nid_t dig_nid;
1598-
err = snd_hda_get_connections(codec,
1599-
spec->autocfg.dig_in_pin,
1600-
&dig_nid, 1);
1601-
if (err > 0)
1602-
spec->dig_in_nid = dig_nid;
1597+
dig_nid = codec->start_nid;
1598+
for (i = 0; i < codec->num_nodes; i++, dig_nid++) {
1599+
unsigned int wcaps = get_wcaps(codec, dig_nid);
1600+
if (get_wcaps_type(wcaps) != AC_WID_AUD_IN)
1601+
continue;
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+
}
16031613
}
16041614
}
16051615

sound/pci/oxygen/oxygen.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,10 @@ static int __devinit get_oxygen_model(struct oxygen *chip,
543543
chip->model.suspend = claro_suspend;
544544
chip->model.resume = claro_resume;
545545
chip->model.set_adc_params = set_ak5385_params;
546+
chip->model.device_config = PLAYBACK_0_TO_I2S |
547+
PLAYBACK_1_TO_SPDIF |
548+
CAPTURE_0_FROM_I2S_2 |
549+
CAPTURE_1_FROM_SPDIF;
546550
break;
547551
}
548552
if (id->driver_data == MODEL_MERIDIAN ||

sound/pci/rme9652/hdsp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4609,6 +4609,7 @@ static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigne
46094609
if (err < 0)
46104610
return err;
46114611

4612+
memset(&info, 0, sizeof(info));
46124613
spin_lock_irqsave(&hdsp->lock, flags);
46134614
info.pref_sync_ref = (unsigned char)hdsp_pref_sync_ref(hdsp);
46144615
info.wordclock_sync_check = (unsigned char)hdsp_wc_sync_check(hdsp);

sound/pci/rme9652/hdspm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4127,6 +4127,7 @@ static int snd_hdspm_hwdep_ioctl(struct snd_hwdep * hw, struct file *file,
41274127

41284128
case SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO:
41294129

4130+
memset(&info, 0, sizeof(info));
41304131
spin_lock_irq(&hdspm->lock);
41314132
info.pref_sync_ref = hdspm_pref_sync_ref(hdspm);
41324133
info.wordclock_sync_check = hdspm_wc_sync_check(hdspm);

sound/soc/sh/migor.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/firmware.h>
1313
#include <linux/module.h>
1414

15+
#include <asm/clkdev.h>
1516
#include <asm/clock.h>
1617

1718
#include <cpu/sh7722.h>
@@ -40,12 +41,12 @@ static struct clk_ops siumckb_clk_ops = {
4041
};
4142

4243
static struct clk siumckb_clk = {
43-
.name = "siumckb_clk",
44-
.id = -1,
4544
.ops = &siumckb_clk_ops,
4645
.rate = 0, /* initialised at run-time */
4746
};
4847

48+
static struct clk_lookup *siumckb_lookup;
49+
4950
static int migor_hw_params(struct snd_pcm_substream *substream,
5051
struct snd_pcm_hw_params *params)
5152
{
@@ -180,6 +181,13 @@ static int __init migor_init(void)
180181
if (ret < 0)
181182
return ret;
182183

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+
183191
/* Port number used on this machine: port B */
184192
migor_snd_device = platform_device_alloc("soc-audio", 1);
185193
if (!migor_snd_device) {
@@ -200,12 +208,15 @@ static int __init migor_init(void)
200208
epdevadd:
201209
platform_device_put(migor_snd_device);
202210
epdevalloc:
211+
clkdev_drop(siumckb_lookup);
212+
eclkdevalloc:
203213
clk_unregister(&siumckb_clk);
204214
return ret;
205215
}
206216

207217
static void __exit migor_exit(void)
208218
{
219+
clkdev_drop(siumckb_lookup);
209220
clk_unregister(&siumckb_clk);
210221
platform_device_unregister(migor_snd_device);
211222
}

sound/soc/soc-cache.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,9 @@ static int snd_soc_8_16_write(struct snd_soc_codec *codec, unsigned int reg,
203203
data[1] = (value >> 8) & 0xff;
204204
data[2] = value & 0xff;
205205

206-
if (!snd_soc_codec_volatile_register(codec, reg))
207-
reg_cache[reg] = value;
206+
if (!snd_soc_codec_volatile_register(codec, reg)
207+
&& reg < codec->reg_cache_size)
208+
reg_cache[reg] = value;
208209

209210
if (codec->cache_only) {
210211
codec->cache_sync = 1;

0 commit comments

Comments
 (0)