Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa

* 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa:
  [ALSA] version 1.0.13
  [ALSA] snd-emu10k1: Fix capture for one variant.
  [ALSA] Fix hang-up at disconnection of usb-audio
  [ALSA] hda: fix typo for xw4400 PCI sub-ID
  [ALSA] hda: fix sigmatel dell system detection
  [ALSA] Enable stereo line input for TAS codec
  [ALSA] rtctimer: handle RTC interrupts with a tasklet
This commit is contained in:
Linus Torvalds 2006-11-28 17:27:52 -08:00
commit b6a1088644
9 changed files with 41 additions and 23 deletions

View file

@ -1,3 +1,3 @@
/* include/version.h. Generated by alsa/ksync script. */ /* include/version.h. Generated by alsa/ksync script. */
#define CONFIG_SND_VERSION "1.0.13" #define CONFIG_SND_VERSION "1.0.13"
#define CONFIG_SND_DATE " (Sun Oct 22 08:56:16 2006 UTC)" #define CONFIG_SND_DATE " (Tue Nov 28 14:07:24 2006 UTC)"

View file

@ -514,9 +514,15 @@ static int tas_snd_capture_source_put(struct snd_kcontrol *kcontrol,
mutex_lock(&tas->mtx); mutex_lock(&tas->mtx);
oldacr = tas->acr; oldacr = tas->acr;
tas->acr &= ~TAS_ACR_INPUT_B; /*
* Despite what the data sheet says in one place, the
* TAS_ACR_B_MONAUREAL bit forces mono output even when
* input A (line in) is selected.
*/
tas->acr &= ~(TAS_ACR_INPUT_B | TAS_ACR_B_MONAUREAL);
if (ucontrol->value.enumerated.item[0]) if (ucontrol->value.enumerated.item[0])
tas->acr |= TAS_ACR_INPUT_B; tas->acr |= TAS_ACR_INPUT_B | TAS_ACR_B_MONAUREAL |
TAS_ACR_B_MON_SEL_RIGHT;
if (oldacr == tas->acr) { if (oldacr == tas->acr) {
mutex_unlock(&tas->mtx); mutex_unlock(&tas->mtx);
return 0; return 0;
@ -686,8 +692,7 @@ static int tas_reset_init(struct tas *tas)
if (tas_write_reg(tas, TAS_REG_MCS, 1, &tmp)) if (tas_write_reg(tas, TAS_REG_MCS, 1, &tmp))
goto outerr; goto outerr;
tas->acr |= TAS_ACR_ANALOG_PDOWN | TAS_ACR_B_MONAUREAL | tas->acr |= TAS_ACR_ANALOG_PDOWN;
TAS_ACR_B_MON_SEL_RIGHT;
if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr)) if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr))
goto outerr; goto outerr;

View file

@ -2359,7 +2359,8 @@ static int snd_pcm_oss_release(struct inode *inode, struct file *file)
substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE]; substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
snd_assert(substream != NULL, return -ENXIO); snd_assert(substream != NULL, return -ENXIO);
pcm = substream->pcm; pcm = substream->pcm;
snd_pcm_oss_sync(pcm_oss_file); if (!pcm->card->shutdown)
snd_pcm_oss_sync(pcm_oss_file);
mutex_lock(&pcm->open_mutex); mutex_lock(&pcm->open_mutex);
snd_pcm_oss_release_file(pcm_oss_file); snd_pcm_oss_release_file(pcm_oss_file);
mutex_unlock(&pcm->open_mutex); mutex_unlock(&pcm->open_mutex);

View file

@ -1310,7 +1310,8 @@ static int snd_pcm_pre_prepare(struct snd_pcm_substream *substream,
int f_flags) int f_flags)
{ {
struct snd_pcm_runtime *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
if (runtime->status->state == SNDRV_PCM_STATE_OPEN) if (runtime->status->state == SNDRV_PCM_STATE_OPEN ||
runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED)
return -EBADFD; return -EBADFD;
if (snd_pcm_running(substream)) if (snd_pcm_running(substream))
return -EBUSY; return -EBUSY;
@ -1568,7 +1569,8 @@ static int snd_pcm_drop(struct snd_pcm_substream *substream)
runtime = substream->runtime; runtime = substream->runtime;
card = substream->pcm->card; card = substream->pcm->card;
if (runtime->status->state == SNDRV_PCM_STATE_OPEN) if (runtime->status->state == SNDRV_PCM_STATE_OPEN ||
runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED)
return -EBADFD; return -EBADFD;
snd_power_lock(card); snd_power_lock(card);

View file

@ -22,13 +22,10 @@
#include <sound/driver.h> #include <sound/driver.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/time.h>
#include <linux/threads.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/timer.h> #include <sound/timer.h>
#include <sound/info.h>
#if defined(CONFIG_RTC) || defined(CONFIG_RTC_MODULE) #if defined(CONFIG_RTC) || defined(CONFIG_RTC_MODULE)
@ -50,7 +47,9 @@ static int rtctimer_stop(struct snd_timer *t);
* The hardware dependent description for this timer. * The hardware dependent description for this timer.
*/ */
static struct snd_timer_hardware rtc_hw = { static struct snd_timer_hardware rtc_hw = {
.flags = SNDRV_TIMER_HW_FIRST|SNDRV_TIMER_HW_AUTO, .flags = SNDRV_TIMER_HW_AUTO |
SNDRV_TIMER_HW_FIRST |
SNDRV_TIMER_HW_TASKLET,
.ticks = 100000000L, /* FIXME: XXX */ .ticks = 100000000L, /* FIXME: XXX */
.open = rtctimer_open, .open = rtctimer_open,
.close = rtctimer_close, .close = rtctimer_close,
@ -60,6 +59,7 @@ static struct snd_timer_hardware rtc_hw = {
static int rtctimer_freq = RTC_FREQ; /* frequency */ static int rtctimer_freq = RTC_FREQ; /* frequency */
static struct snd_timer *rtctimer; static struct snd_timer *rtctimer;
static struct tasklet_struct rtc_tasklet;
static rtc_task_t rtc_task; static rtc_task_t rtc_task;
@ -81,6 +81,7 @@ rtctimer_close(struct snd_timer *t)
rtc_task_t *rtc = t->private_data; rtc_task_t *rtc = t->private_data;
if (rtc) { if (rtc) {
rtc_unregister(rtc); rtc_unregister(rtc);
tasklet_kill(&rtc_tasklet);
t->private_data = NULL; t->private_data = NULL;
} }
return 0; return 0;
@ -105,12 +106,17 @@ rtctimer_stop(struct snd_timer *timer)
return 0; return 0;
} }
static void rtctimer_tasklet(unsigned long data)
{
snd_timer_interrupt((struct snd_timer *)data, 1);
}
/* /*
* interrupt * interrupt
*/ */
static void rtctimer_interrupt(void *private_data) static void rtctimer_interrupt(void *private_data)
{ {
snd_timer_interrupt(private_data, 1); tasklet_hi_schedule(private_data);
} }
@ -139,9 +145,11 @@ static int __init rtctimer_init(void)
timer->hw = rtc_hw; timer->hw = rtc_hw;
timer->hw.resolution = NANO_SEC / rtctimer_freq; timer->hw.resolution = NANO_SEC / rtctimer_freq;
tasklet_init(&rtc_tasklet, rtctimer_tasklet, (unsigned long)timer);
/* set up RTC callback */ /* set up RTC callback */
rtc_task.func = rtctimer_interrupt; rtc_task.func = rtctimer_interrupt;
rtc_task.private_data = timer; rtc_task.private_data = &rtc_tasklet;
err = snd_timer_global_register(timer); err = snd_timer_global_register(timer);
if (err < 0) { if (err < 0) {

View file

@ -956,6 +956,7 @@ static struct snd_emu_chip_details emu_chip_details[] = {
.ca0151_chip = 1, .ca0151_chip = 1,
.spk71 = 1, .spk71 = 1,
.spdif_bug = 1, .spdif_bug = 1,
.adc_1361t = 1, /* 24 bit capture instead of 16bit. Fixes ALSA bug#324 */
.ac97_chip = 1} , .ac97_chip = 1} ,
{.vendor = 0x1102, .device = 0x0004, .revision = 0x04, {.vendor = 0x1102, .device = 0x0004, .revision = 0x04,
.driver = "Audigy2", .name = "Audigy 2 [Unknown]", .driver = "Audigy2", .name = "Audigy 2 [Unknown]",

View file

@ -5870,7 +5870,7 @@ static struct hda_board_config alc262_cfg_tbl[] = {
{ .pci_subvendor = 0x10cf, .pci_subdevice = 0x1397, { .pci_subvendor = 0x10cf, .pci_subdevice = 0x1397,
.config = ALC262_FUJITSU }, .config = ALC262_FUJITSU },
{ .modelname = "hp-bpc", .config = ALC262_HP_BPC }, { .modelname = "hp-bpc", .config = ALC262_HP_BPC },
{ .pci_subvendor = 0x103c, .pci_subdevice = 0x208c, { .pci_subvendor = 0x103c, .pci_subdevice = 0x280c,
.config = ALC262_HP_BPC }, /* xw4400 */ .config = ALC262_HP_BPC }, /* xw4400 */
{ .pci_subvendor = 0x103c, .pci_subdevice = 0x3014, { .pci_subvendor = 0x103c, .pci_subdevice = 0x3014,
.config = ALC262_HP_BPC }, /* xw6400 */ .config = ALC262_HP_BPC }, /* xw6400 */

View file

@ -336,6 +336,13 @@ static struct hda_board_config stac9200_cfg_tbl[] = {
.pci_subvendor = PCI_VENDOR_ID_INTEL, .pci_subvendor = PCI_VENDOR_ID_INTEL,
.pci_subdevice = 0x2668, /* DFI LanParty */ .pci_subdevice = 0x2668, /* DFI LanParty */
.config = STAC_REF }, .config = STAC_REF },
/* Dell laptops have BIOS problem */
{ .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01b5,
.config = STAC_REF }, /* Dell Inspiron 630m */
{ .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01c2,
.config = STAC_REF }, /* Dell Latitude D620 */
{ .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01cb,
.config = STAC_REF }, /* Dell Latitude 120L */
{} /* terminator */ {} /* terminator */
}; };
@ -591,13 +598,6 @@ static struct hda_board_config stac9205_cfg_tbl[] = {
.pci_subvendor = PCI_VENDOR_ID_INTEL, .pci_subvendor = PCI_VENDOR_ID_INTEL,
.pci_subdevice = 0x2668, /* DFI LanParty */ .pci_subdevice = 0x2668, /* DFI LanParty */
.config = STAC_REF }, /* SigmaTel reference board */ .config = STAC_REF }, /* SigmaTel reference board */
/* Dell laptops have BIOS problem */
{ .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01b5,
.config = STAC_REF }, /* Dell Inspiron 630m */
{ .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01c2,
.config = STAC_REF }, /* Dell Latitude D620 */
{ .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01cb,
.config = STAC_REF }, /* Dell Latitude 120L */
{} /* terminator */ {} /* terminator */
}; };

View file

@ -1469,7 +1469,8 @@ static int snd_usb_hw_free(struct snd_pcm_substream *substream)
subs->cur_audiofmt = NULL; subs->cur_audiofmt = NULL;
subs->cur_rate = 0; subs->cur_rate = 0;
subs->period_bytes = 0; subs->period_bytes = 0;
release_substream_urbs(subs, 0); if (!subs->stream->chip->shutdown)
release_substream_urbs(subs, 0);
return snd_pcm_free_vmalloc_buffer(substream); return snd_pcm_free_vmalloc_buffer(substream);
} }