Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263860
b: refs/heads/master
c: 4038a12
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Sep 14, 2011
1 parent c47ff72 commit 3d55d25
Show file tree
Hide file tree
Showing 27 changed files with 266 additions and 123 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5013951be88e136d9990ef55303276e2779ce8d8
refs/heads/master: 4038a12e7443b5fed3e526c475c38c115d9600f6
2 changes: 1 addition & 1 deletion trunk/sound/aoa/fabrics/layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,10 +1073,10 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)
sdev->pcmid = -1;
list_del(&ldev->list);
layouts_list_items--;
kfree(ldev);
outnodev:
of_node_put(sound);
layout_device = NULL;
kfree(ldev);
return -ENODEV;
}

Expand Down
5 changes: 5 additions & 0 deletions trunk/sound/core/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ int snd_timer_close(struct snd_timer_instance *timeri)
mutex_unlock(&register_mutex);
} else {
timer = timeri->timer;
if (snd_BUG_ON(!timer))
goto out;
/* wait, until the active callback is finished */
spin_lock_irq(&timer->lock);
while (timeri->flags & SNDRV_TIMER_IFLG_CALLBACK) {
Expand All @@ -353,6 +355,7 @@ int snd_timer_close(struct snd_timer_instance *timeri)
}
mutex_unlock(&register_mutex);
}
out:
if (timeri->private_free)
timeri->private_free(timeri);
kfree(timeri->owner);
Expand Down Expand Up @@ -531,6 +534,8 @@ int snd_timer_stop(struct snd_timer_instance *timeri)
if (err < 0)
return err;
timer = timeri->timer;
if (!timer)
return -EINVAL;
spin_lock_irqsave(&timer->lock, flags);
timeri->cticks = timeri->ticks;
timeri->pticks = 0;
Expand Down
8 changes: 4 additions & 4 deletions trunk/sound/oss/pas2_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ static int pcm_set_speed(int arg)

if (pcm_channels & 2)
{
foo = ((CLOCK_TICK_RATE / 2) + (arg / 2)) / arg;
arg = ((CLOCK_TICK_RATE / 2) + (foo / 2)) / foo;
foo = ((PIT_TICK_RATE / 2) + (arg / 2)) / arg;
arg = ((PIT_TICK_RATE / 2) + (foo / 2)) / foo;
}
else
{
foo = (CLOCK_TICK_RATE + (arg / 2)) / arg;
arg = (CLOCK_TICK_RATE + (foo / 2)) / foo;
foo = (PIT_TICK_RATE + (arg / 2)) / arg;
arg = (PIT_TICK_RATE + (foo / 2)) / foo;
}

pcm_speed = arg;
Expand Down
6 changes: 4 additions & 2 deletions trunk/sound/oss/pss.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,8 @@ static void configure_nonsound_components(void)

if (pss_cdrom_port == -1) { /* If cdrom port enablation wasn't requested */
printk(KERN_INFO "PSS: CDROM port not enabled.\n");
} else if (check_region(pss_cdrom_port, 2)) {
} else if (!request_region(pss_cdrom_port, 2, "PSS CDROM")) {
pss_cdrom_port = -1;
printk(KERN_ERR "PSS: CDROM I/O port conflict.\n");
} else {
set_io_base(devc, CONF_CDROM, pss_cdrom_port);
Expand Down Expand Up @@ -1232,7 +1233,8 @@ static void __exit cleanup_pss(void)
if(pssmpu)
unload_pss_mpu(&cfg_mpu);
unload_pss(&cfg);
}
} else if (pss_cdrom_port != -1)
release_region(pss_cdrom_port, 2);

if(!pss_keep_settings) /* Keep hardware settings if asked */
{
Expand Down
10 changes: 5 additions & 5 deletions trunk/sound/pci/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# ALSA PCI drivers

config SND_TEA575X
tristate
depends on SND_FM801_TEA575X_BOOL || SND_ES1968_RADIO || RADIO_SF16FMR2
default SND_FM801 || SND_ES1968 || RADIO_SF16FMR2

menuconfig SND_PCI
bool "PCI sound devices"
depends on PCI
Expand Down Expand Up @@ -563,11 +568,6 @@ config SND_FM801_TEA575X_BOOL
FM801 chip with a TEA5757 tuner (MediaForte SF256-PCS, SF256-PCP and
SF64-PCR) into the snd-fm801 driver.

config SND_TEA575X
tristate
depends on SND_FM801_TEA575X_BOOL || SND_ES1968_RADIO || RADIO_SF16FMR2
default SND_FM801 || SND_ES1968 || RADIO_SF16FMR2

source "sound/pci/hda/Kconfig"

config SND_HDSP
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/pci/ac97/ac97_patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1909,6 +1909,7 @@ static unsigned int ad1981_jacks_whitelist[] = {
0x103c0944, /* HP nc6220 */
0x103c0934, /* HP nc8220 */
0x103c006d, /* HP nx9105 */
0x103c300d, /* HP Compaq dc5100 SFF(PT003AW) */
0x17340088, /* FSC Scenic-W */
0 /* end */
};
Expand Down
5 changes: 2 additions & 3 deletions trunk/sound/pci/asihpi/hpicmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,13 +631,12 @@ struct hpi_control_cache *hpi_alloc_control_cache(const u32 control_count,
if (!p_cache)
return NULL;

p_cache->p_info =
kmalloc(sizeof(*p_cache->p_info) * control_count, GFP_KERNEL);
p_cache->p_info = kzalloc(sizeof(*p_cache->p_info) * control_count,
GFP_KERNEL);
if (!p_cache->p_info) {
kfree(p_cache);
return NULL;
}
memset(p_cache->p_info, 0, sizeof(*p_cache->p_info) * control_count);
p_cache->cache_size_in_bytes = size_in_bytes;
p_cache->control_count = control_count;
p_cache->p_cache = p_dsp_control_buffer;
Expand Down
11 changes: 7 additions & 4 deletions trunk/sound/pci/azt3328.c
Original file line number Diff line number Diff line change
Expand Up @@ -2625,16 +2625,19 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
int err;

snd_azf3328_dbgcallenter();
if (dev >= SNDRV_CARDS)
return -ENODEV;
if (dev >= SNDRV_CARDS) {
err = -ENODEV;
goto out;
}
if (!enable[dev]) {
dev++;
return -ENOENT;
err = -ENOENT;
goto out;
}

err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
if (err < 0)
return err;
goto out;

strcpy(card->driver, "AZF3328");
strcpy(card->shortname, "Aztech AZF3328 (PCI168)");
Expand Down
36 changes: 18 additions & 18 deletions trunk/sound/pci/hda/alc268_quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ static const struct snd_pci_quirk alc268_ssid_cfg_tbl[] = {

static const struct alc_config_preset alc268_presets[] = {
[ALC267_QUANTA_IL1] = {
.mixers = { alc267_quanta_il1_mixer, alc268_beep_mixer,
alc268_capture_nosrc_mixer },
.mixers = { alc267_quanta_il1_mixer, alc268_beep_mixer },
.cap_mixer = alc268_capture_nosrc_mixer,
.init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
alc267_quanta_il1_verbs },
.num_dacs = ARRAY_SIZE(alc268_dac_nids),
Expand All @@ -492,8 +492,8 @@ static const struct alc_config_preset alc268_presets[] = {
.init_hook = alc_inithook,
},
[ALC268_3ST] = {
.mixers = { alc268_base_mixer, alc268_capture_alt_mixer,
alc268_beep_mixer },
.mixers = { alc268_base_mixer, alc268_beep_mixer },
.cap_mixer = alc268_capture_alt_mixer,
.init_verbs = { alc268_base_init_verbs },
.num_dacs = ARRAY_SIZE(alc268_dac_nids),
.dac_nids = alc268_dac_nids,
Expand All @@ -507,8 +507,8 @@ static const struct alc_config_preset alc268_presets[] = {
.input_mux = &alc268_capture_source,
},
[ALC268_TOSHIBA] = {
.mixers = { alc268_toshiba_mixer, alc268_capture_alt_mixer,
alc268_beep_mixer },
.mixers = { alc268_toshiba_mixer, alc268_beep_mixer },
.cap_mixer = alc268_capture_alt_mixer,
.init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
alc268_toshiba_verbs },
.num_dacs = ARRAY_SIZE(alc268_dac_nids),
Expand All @@ -525,8 +525,8 @@ static const struct alc_config_preset alc268_presets[] = {
.init_hook = alc_inithook,
},
[ALC268_ACER] = {
.mixers = { alc268_acer_mixer, alc268_capture_alt_mixer,
alc268_beep_mixer },
.mixers = { alc268_acer_mixer, alc268_beep_mixer },
.cap_mixer = alc268_capture_alt_mixer,
.init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
alc268_acer_verbs },
.num_dacs = ARRAY_SIZE(alc268_dac_nids),
Expand All @@ -543,8 +543,8 @@ static const struct alc_config_preset alc268_presets[] = {
.init_hook = alc_inithook,
},
[ALC268_ACER_DMIC] = {
.mixers = { alc268_acer_dmic_mixer, alc268_capture_alt_mixer,
alc268_beep_mixer },
.mixers = { alc268_acer_dmic_mixer, alc268_beep_mixer },
.cap_mixer = alc268_capture_alt_mixer,
.init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
alc268_acer_verbs },
.num_dacs = ARRAY_SIZE(alc268_dac_nids),
Expand All @@ -561,9 +561,8 @@ static const struct alc_config_preset alc268_presets[] = {
.init_hook = alc_inithook,
},
[ALC268_ACER_ASPIRE_ONE] = {
.mixers = { alc268_acer_aspire_one_mixer,
alc268_beep_mixer,
alc268_capture_nosrc_mixer },
.mixers = { alc268_acer_aspire_one_mixer, alc268_beep_mixer},
.cap_mixer = alc268_capture_nosrc_mixer,
.init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
alc268_acer_aspire_one_verbs },
.num_dacs = ARRAY_SIZE(alc268_dac_nids),
Expand All @@ -579,8 +578,8 @@ static const struct alc_config_preset alc268_presets[] = {
.init_hook = alc_inithook,
},
[ALC268_DELL] = {
.mixers = { alc268_dell_mixer, alc268_beep_mixer,
alc268_capture_nosrc_mixer },
.mixers = { alc268_dell_mixer, alc268_beep_mixer},
.cap_mixer = alc268_capture_nosrc_mixer,
.init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
alc268_dell_verbs },
.num_dacs = ARRAY_SIZE(alc268_dac_nids),
Expand All @@ -596,8 +595,8 @@ static const struct alc_config_preset alc268_presets[] = {
.init_hook = alc_inithook,
},
[ALC268_ZEPTO] = {
.mixers = { alc268_base_mixer, alc268_capture_alt_mixer,
alc268_beep_mixer },
.mixers = { alc268_base_mixer, alc268_beep_mixer },
.cap_mixer = alc268_capture_alt_mixer,
.init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
alc268_toshiba_verbs },
.num_dacs = ARRAY_SIZE(alc268_dac_nids),
Expand All @@ -616,7 +615,8 @@ static const struct alc_config_preset alc268_presets[] = {
},
#ifdef CONFIG_SND_DEBUG
[ALC268_TEST] = {
.mixers = { alc268_test_mixer, alc268_capture_mixer },
.mixers = { alc268_test_mixer },
.cap_mixer = alc268_capture_mixer,
.init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
alc268_volume_init_verbs,
alc268_beep_init_verbs },
Expand Down
7 changes: 0 additions & 7 deletions trunk/sound/pci/hda/alc269_quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,17 +531,10 @@ static const struct snd_pci_quirk alc269_cfg_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_AMIC),
SND_PCI_QUIRK(0x1043, 0x1693, "ASUS F50N", ALC269_AMIC),
SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_AMIC),
SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_DMIC),
SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_AMIC),
SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_AMIC),
SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_AMIC),
SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_AMIC),
SND_PCI_QUIRK(0x1043, 0x831a, "ASUS Eeepc P901",
ALC269_DMIC),
SND_PCI_QUIRK(0x1043, 0x834a, "ASUS Eeepc S101",
ALC269_DMIC),
SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005HA", ALC269_DMIC),
SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005HA", ALC269_DMIC),
SND_PCI_QUIRK(0x104d, 0x9071, "Sony VAIO", ALC269_AUTO),
SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook ICH9M-based", ALC269_LIFEBOOK),
SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_DMIC),
Expand Down
6 changes: 5 additions & 1 deletion trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,13 @@ int snd_hda_get_conn_index(struct hda_codec *codec, hda_nid_t mux,
return -1;
}
recursive++;
for (i = 0; i < nums; i++)
for (i = 0; i < nums; i++) {
unsigned int type = get_wcaps_type(get_wcaps(codec, conn[i]));
if (type == AC_WID_PIN || type == AC_WID_AUD_OUT)
continue;
if (snd_hda_get_conn_index(codec, conn[i], nid, recursive) >= 0)
return i;
}
return -1;
}
EXPORT_SYMBOL_HDA(snd_hda_get_conn_index);
Expand Down
31 changes: 19 additions & 12 deletions trunk/sound/pci/hda/hda_eld.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,25 +144,17 @@ static int cea_sampling_frequencies[8] = {
SNDRV_PCM_RATE_192000, /* 7: 192000Hz */
};

static unsigned char hdmi_get_eld_byte(struct hda_codec *codec, hda_nid_t nid,
static unsigned int hdmi_get_eld_data(struct hda_codec *codec, hda_nid_t nid,
int byte_index)
{
unsigned int val;

val = snd_hda_codec_read(codec, nid, 0,
AC_VERB_GET_HDMI_ELDD, byte_index);

#ifdef BE_PARANOID
printk(KERN_INFO "HDMI: ELD data byte %d: 0x%x\n", byte_index, val);
#endif

if ((val & AC_ELDD_ELD_VALID) == 0) {
snd_printd(KERN_INFO "HDMI: invalid ELD data byte %d\n",
byte_index);
val = 0;
}

return val & AC_ELDD_ELD_DATA;
return val;
}

#define GRAB_BITS(buf, byte, lowbit, bits) \
Expand Down Expand Up @@ -344,11 +336,26 @@ int snd_hdmi_get_eld(struct hdmi_eld *eld,
if (!buf)
return -ENOMEM;

for (i = 0; i < size; i++)
buf[i] = hdmi_get_eld_byte(codec, nid, i);
for (i = 0; i < size; i++) {
unsigned int val = hdmi_get_eld_data(codec, nid, i);
if (!(val & AC_ELDD_ELD_VALID)) {
if (!i) {
snd_printd(KERN_INFO
"HDMI: invalid ELD data\n");
ret = -EINVAL;
goto error;
}
snd_printd(KERN_INFO
"HDMI: invalid ELD data byte %d\n", i);
val = 0;
} else
val &= AC_ELDD_ELD_DATA;
buf[i] = val;
}

ret = hdmi_update_eld(eld, buf, size);

error:
kfree(buf);
return ret;
}
Expand Down
10 changes: 6 additions & 4 deletions trunk/sound/pci/hda/patch_cirrus.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ static int is_ext_mic(struct hda_codec *codec, unsigned int idx)
static hda_nid_t get_adc(struct hda_codec *codec, hda_nid_t pin,
unsigned int *idxp)
{
int i;
int i, idx;
hda_nid_t nid;

nid = codec->start_nid;
Expand All @@ -384,9 +384,11 @@ static hda_nid_t get_adc(struct hda_codec *codec, hda_nid_t pin,
type = get_wcaps_type(get_wcaps(codec, nid));
if (type != AC_WID_AUD_IN)
continue;
*idxp = snd_hda_get_conn_index(codec, nid, pin, false);
if (*idxp >= 0)
idx = snd_hda_get_conn_index(codec, nid, pin, false);
if (idx >= 0) {
*idxp = idx;
return nid;
}
}
return 0;
}
Expand Down Expand Up @@ -533,7 +535,7 @@ static int add_volume(struct hda_codec *codec, const char *name,
int index, unsigned int pval, int dir,
struct snd_kcontrol **kctlp)
{
char tmp[32];
char tmp[44];
struct snd_kcontrol_new knew =
HDA_CODEC_VOLUME_IDX(tmp, index, 0, 0, HDA_OUTPUT);
knew.private_value = pval;
Expand Down
Loading

0 comments on commit 3d55d25

Please sign in to comment.