Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264143
b: refs/heads/master
c: 34c8698
h: refs/heads/master
i:
  264141: 292acc9
  264139: a3cc34d
  264135: 3998a62
  264127: 3bc0421
v: v3
  • Loading branch information
Jarkko Nikula authored and Mark Brown committed Sep 23, 2011
1 parent f6617e6 commit 5a6048e
Show file tree
Hide file tree
Showing 31 changed files with 149 additions and 318 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: 61a6a108d15213f5ee06332e1e7766d3860e4453
refs/heads/master: 34c869855a28af3c6031d29e2267b5a3cce0d67d
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
33 changes: 9 additions & 24 deletions trunk/sound/core/pcm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1761,10 +1761,6 @@ static int wait_for_avail(struct snd_pcm_substream *substream,
snd_pcm_uframes_t avail = 0;
long wait_time, tout;

init_waitqueue_entry(&wait, current);
set_current_state(TASK_INTERRUPTIBLE);
add_wait_queue(&runtime->tsleep, &wait);

if (runtime->no_period_wakeup)
wait_time = MAX_SCHEDULE_TIMEOUT;
else {
Expand All @@ -1775,32 +1771,16 @@ static int wait_for_avail(struct snd_pcm_substream *substream,
}
wait_time = msecs_to_jiffies(wait_time * 1000);
}

init_waitqueue_entry(&wait, current);
add_wait_queue(&runtime->tsleep, &wait);
for (;;) {
if (signal_pending(current)) {
err = -ERESTARTSYS;
break;
}

/*
* We need to check if space became available already
* (and thus the wakeup happened already) first to close
* the race of space already having become available.
* This check must happen after been added to the waitqueue
* and having current state be INTERRUPTIBLE.
*/
if (is_playback)
avail = snd_pcm_playback_avail(runtime);
else
avail = snd_pcm_capture_avail(runtime);
if (avail >= runtime->twake)
break;
snd_pcm_stream_unlock_irq(substream);

tout = schedule_timeout(wait_time);

tout = schedule_timeout_interruptible(wait_time);
snd_pcm_stream_lock_irq(substream);
set_current_state(TASK_INTERRUPTIBLE);
switch (runtime->status->state) {
case SNDRV_PCM_STATE_SUSPENDED:
err = -ESTRPIPE;
Expand All @@ -1826,9 +1806,14 @@ static int wait_for_avail(struct snd_pcm_substream *substream,
err = -EIO;
break;
}
if (is_playback)
avail = snd_pcm_playback_avail(runtime);
else
avail = snd_pcm_capture_avail(runtime);
if (avail >= runtime->twake)
break;
}
_endloop:
set_current_state(TASK_RUNNING);
remove_wait_queue(&runtime->tsleep, &wait);
*availp = avail;
return err;
Expand Down
5 changes: 0 additions & 5 deletions trunk/sound/core/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,6 @@ 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 @@ -355,7 +353,6 @@ 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 @@ -534,8 +531,6 @@ 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 = ((PIT_TICK_RATE / 2) + (arg / 2)) / arg;
arg = ((PIT_TICK_RATE / 2) + (foo / 2)) / foo;
foo = ((CLOCK_TICK_RATE / 2) + (arg / 2)) / arg;
arg = ((CLOCK_TICK_RATE / 2) + (foo / 2)) / foo;
}
else
{
foo = (PIT_TICK_RATE + (arg / 2)) / arg;
arg = (PIT_TICK_RATE + (foo / 2)) / foo;
foo = (CLOCK_TICK_RATE + (arg / 2)) / arg;
arg = (CLOCK_TICK_RATE + (foo / 2)) / foo;
}

pcm_speed = arg;
Expand Down
6 changes: 2 additions & 4 deletions trunk/sound/oss/pss.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,7 @@ 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 (!request_region(pss_cdrom_port, 2, "PSS CDROM")) {
pss_cdrom_port = -1;
} else if (check_region(pss_cdrom_port, 2)) {
printk(KERN_ERR "PSS: CDROM I/O port conflict.\n");
} else {
set_io_base(devc, CONF_CDROM, pss_cdrom_port);
Expand Down Expand Up @@ -1233,8 +1232,7 @@ 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,10 +1,5 @@
# 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 @@ -568,6 +563,11 @@ 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: 0 additions & 1 deletion trunk/sound/pci/ac97/ac97_patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1909,7 +1909,6 @@ 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: 3 additions & 2 deletions trunk/sound/pci/asihpi/hpicmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,12 +631,13 @@ struct hpi_control_cache *hpi_alloc_control_cache(const u32 control_count,
if (!p_cache)
return NULL;

p_cache->p_info = kzalloc(sizeof(*p_cache->p_info) * control_count,
GFP_KERNEL);
p_cache->p_info =
kmalloc(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: 4 additions & 7 deletions trunk/sound/pci/azt3328.c
Original file line number Diff line number Diff line change
Expand Up @@ -2625,19 +2625,16 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
int err;

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

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

strcpy(card->driver, "AZF3328");
strcpy(card->shortname, "Aztech AZF3328 (PCI168)");
Expand Down
15 changes: 5 additions & 10 deletions trunk/sound/pci/fm801.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ MODULE_PARM_DESC(enable, "Enable FM801 soundcard.");
module_param_array(tea575x_tuner, int, NULL, 0444);
MODULE_PARM_DESC(tea575x_tuner, "TEA575x tuner access method (0 = auto, 1 = SF256-PCS, 2=SF256-PCP, 3=SF64-PCR, 8=disable, +16=tuner-only).");

#define TUNER_DISABLED (1<<3)
#define TUNER_ONLY (1<<4)
#define TUNER_TYPE_MASK (~TUNER_ONLY & 0xFFFF)

Expand Down Expand Up @@ -1151,8 +1150,7 @@ static int snd_fm801_free(struct fm801 *chip)

__end_hw:
#ifdef CONFIG_SND_FM801_TEA575X_BOOL
if (!(chip->tea575x_tuner & TUNER_DISABLED))
snd_tea575x_exit(&chip->tea);
snd_tea575x_exit(&chip->tea);
#endif
if (chip->irq >= 0)
free_irq(chip->irq, chip);
Expand Down Expand Up @@ -1238,6 +1236,7 @@ static int __devinit snd_fm801_create(struct snd_card *card,
(tea575x_tuner & TUNER_TYPE_MASK) < 4) {
if (snd_tea575x_init(&chip->tea)) {
snd_printk(KERN_ERR "TEA575x radio not found\n");
snd_fm801_free(chip);
return -ENODEV;
}
} else if ((tea575x_tuner & TUNER_TYPE_MASK) == 0) {
Expand All @@ -1252,15 +1251,11 @@ static int __devinit snd_fm801_create(struct snd_card *card,
}
if (tea575x_tuner == 4) {
snd_printk(KERN_ERR "TEA575x radio not found\n");
chip->tea575x_tuner = TUNER_DISABLED;
snd_fm801_free(chip);
return -ENODEV;
}
}
if (!(chip->tea575x_tuner & TUNER_DISABLED)) {
strlcpy(chip->tea.card,
snd_fm801_tea575x_gpios[(tea575x_tuner &
TUNER_TYPE_MASK) - 1].name,
sizeof(chip->tea.card));
}
strlcpy(chip->tea.card, snd_fm801_tea575x_gpios[(tea575x_tuner & TUNER_TYPE_MASK) - 1].name, sizeof(chip->tea.card));
#endif

*rchip = chip;
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 },
.cap_mixer = alc268_capture_nosrc_mixer,
.mixers = { alc267_quanta_il1_mixer, alc268_beep_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_beep_mixer },
.cap_mixer = alc268_capture_alt_mixer,
.mixers = { alc268_base_mixer, alc268_capture_alt_mixer,
alc268_beep_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_beep_mixer },
.cap_mixer = alc268_capture_alt_mixer,
.mixers = { alc268_toshiba_mixer, alc268_capture_alt_mixer,
alc268_beep_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_beep_mixer },
.cap_mixer = alc268_capture_alt_mixer,
.mixers = { alc268_acer_mixer, alc268_capture_alt_mixer,
alc268_beep_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_beep_mixer },
.cap_mixer = alc268_capture_alt_mixer,
.mixers = { alc268_acer_dmic_mixer, alc268_capture_alt_mixer,
alc268_beep_mixer },
.init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
alc268_acer_verbs },
.num_dacs = ARRAY_SIZE(alc268_dac_nids),
Expand All @@ -561,8 +561,9 @@ 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},
.cap_mixer = alc268_capture_nosrc_mixer,
.mixers = { alc268_acer_aspire_one_mixer,
alc268_beep_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 @@ -578,8 +579,8 @@ static const struct alc_config_preset alc268_presets[] = {
.init_hook = alc_inithook,
},
[ALC268_DELL] = {
.mixers = { alc268_dell_mixer, alc268_beep_mixer},
.cap_mixer = alc268_capture_nosrc_mixer,
.mixers = { alc268_dell_mixer, alc268_beep_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 @@ -595,8 +596,8 @@ static const struct alc_config_preset alc268_presets[] = {
.init_hook = alc_inithook,
},
[ALC268_ZEPTO] = {
.mixers = { alc268_base_mixer, alc268_beep_mixer },
.cap_mixer = alc268_capture_alt_mixer,
.mixers = { alc268_base_mixer, alc268_capture_alt_mixer,
alc268_beep_mixer },
.init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
alc268_toshiba_verbs },
.num_dacs = ARRAY_SIZE(alc268_dac_nids),
Expand All @@ -615,8 +616,7 @@ static const struct alc_config_preset alc268_presets[] = {
},
#ifdef CONFIG_SND_DEBUG
[ALC268_TEST] = {
.mixers = { alc268_test_mixer },
.cap_mixer = alc268_capture_mixer,
.mixers = { alc268_test_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: 7 additions & 0 deletions trunk/sound/pci/hda/alc269_quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,17 @@ 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: 1 addition & 5 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,13 +579,9 @@ int snd_hda_get_conn_index(struct hda_codec *codec, hda_nid_t mux,
return -1;
}
recursive++;
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;
for (i = 0; i < nums; i++)
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
Loading

0 comments on commit 5a6048e

Please sign in to comment.