Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182701
b: refs/heads/master
c: 3e879d7
h: refs/heads/master
i:
  182699: e25134d
v: v3
  • Loading branch information
Takashi Iwai committed Jan 18, 2010
1 parent 37c15a3 commit 5fd48fd
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 1,312 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: 8b296c8f9f660b70e958e6e6b9b4293e6ae854f2
refs/heads/master: 3e879d7bac705be4813a0ec9560cbe31db4b269f
2 changes: 1 addition & 1 deletion trunk/Documentation/sound/alsa/ALSA-Configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
-------------------

Module for sound cards based on the Asus AV100/AV200 chips,
i.e., Xonar D1, DX, D2, D2X, DS, HDAV1.3 (Deluxe), Essence ST
i.e., Xonar D1, DX, D2, D2X, HDAV1.3 (Deluxe), Essence ST
(Deluxe) and Essence STX.

This module supports autoprobe and multiple cards.
Expand Down
5 changes: 2 additions & 3 deletions trunk/include/sound/pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,8 @@ struct snd_pcm_runtime {
struct snd_pcm_mmap_control *control;

/* -- locking / scheduling -- */
unsigned int twake: 1; /* do transfer (!poll) wakeup */
wait_queue_head_t sleep; /* poll sleep */
wait_queue_head_t tsleep; /* transfer sleep */
unsigned int nowake: 1; /* no wakeup (data-copy in progress) */
wait_queue_head_t sleep;
struct fasync_struct *fasync;

/* -- private section -- */
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/core/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,6 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream,
memset((void*)runtime->control, 0, size);

init_waitqueue_head(&runtime->sleep);
init_waitqueue_head(&runtime->tsleep);

runtime->status->state = SNDRV_PCM_STATE_OPEN;

Expand Down
20 changes: 10 additions & 10 deletions trunk/sound/core/pcm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ int snd_pcm_update_state(struct snd_pcm_substream *substream,
return -EPIPE;
}
}
if (avail >= runtime->control->avail_min)
wake_up(runtime->twake ? &runtime->tsleep : &runtime->sleep);
if (!runtime->nowake && avail >= runtime->control->avail_min)
wake_up(&runtime->sleep);
return 0;
}

Expand Down Expand Up @@ -1706,7 +1706,7 @@ static int wait_for_avail_min(struct snd_pcm_substream *substream,
long tout;

init_waitqueue_entry(&wait, current);
add_wait_queue(&runtime->tsleep, &wait);
add_wait_queue(&runtime->sleep, &wait);
for (;;) {
if (signal_pending(current)) {
err = -ERESTARTSYS;
Expand Down Expand Up @@ -1749,7 +1749,7 @@ static int wait_for_avail_min(struct snd_pcm_substream *substream,
break;
}
_endloop:
remove_wait_queue(&runtime->tsleep, &wait);
remove_wait_queue(&runtime->sleep, &wait);
*availp = avail;
return err;
}
Expand Down Expand Up @@ -1808,7 +1808,7 @@ static snd_pcm_sframes_t snd_pcm_lib_write1(struct snd_pcm_substream *substream,
goto _end_unlock;
}

runtime->twake = 1;
runtime->nowake = 1;
while (size > 0) {
snd_pcm_uframes_t frames, appl_ptr, appl_ofs;
snd_pcm_uframes_t avail;
Expand All @@ -1830,7 +1830,7 @@ static snd_pcm_sframes_t snd_pcm_lib_write1(struct snd_pcm_substream *substream,
if (frames > cont)
frames = cont;
if (snd_BUG_ON(!frames)) {
runtime->twake = 0;
runtime->nowake = 0;
snd_pcm_stream_unlock_irq(substream);
return -EINVAL;
}
Expand Down Expand Up @@ -1869,7 +1869,7 @@ static snd_pcm_sframes_t snd_pcm_lib_write1(struct snd_pcm_substream *substream,
}
}
_end_unlock:
runtime->twake = 0;
runtime->nowake = 0;
if (xfer > 0 && err >= 0)
snd_pcm_update_state(substream, runtime);
snd_pcm_stream_unlock_irq(substream);
Expand Down Expand Up @@ -2030,7 +2030,7 @@ static snd_pcm_sframes_t snd_pcm_lib_read1(struct snd_pcm_substream *substream,
goto _end_unlock;
}

runtime->twake = 1;
runtime->nowake = 1;
while (size > 0) {
snd_pcm_uframes_t frames, appl_ptr, appl_ofs;
snd_pcm_uframes_t avail;
Expand Down Expand Up @@ -2059,7 +2059,7 @@ static snd_pcm_sframes_t snd_pcm_lib_read1(struct snd_pcm_substream *substream,
if (frames > cont)
frames = cont;
if (snd_BUG_ON(!frames)) {
runtime->twake = 0;
runtime->nowake = 0;
snd_pcm_stream_unlock_irq(substream);
return -EINVAL;
}
Expand Down Expand Up @@ -2092,7 +2092,7 @@ static snd_pcm_sframes_t snd_pcm_lib_read1(struct snd_pcm_substream *substream,
xfer += frames;
}
_end_unlock:
runtime->twake = 0;
runtime->nowake = 0;
if (xfer > 0 && err >= 0)
snd_pcm_update_state(substream, runtime);
snd_pcm_stream_unlock_irq(substream);
Expand Down
5 changes: 0 additions & 5 deletions trunk/sound/core/pcm_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,6 @@ static void snd_pcm_post_stop(struct snd_pcm_substream *substream, int state)
runtime->status->state = state;
}
wake_up(&runtime->sleep);
wake_up(&runtime->tsleep);
}

static struct action_ops snd_pcm_action_stop = {
Expand Down Expand Up @@ -1005,7 +1004,6 @@ static void snd_pcm_post_pause(struct snd_pcm_substream *substream, int push)
SNDRV_TIMER_EVENT_MPAUSE,
&runtime->trigger_tstamp);
wake_up(&runtime->sleep);
wake_up(&runtime->tsleep);
} else {
runtime->status->state = SNDRV_PCM_STATE_RUNNING;
if (substream->timer)
Expand Down Expand Up @@ -1063,7 +1061,6 @@ static void snd_pcm_post_suspend(struct snd_pcm_substream *substream, int state)
runtime->status->suspended_state = runtime->status->state;
runtime->status->state = SNDRV_PCM_STATE_SUSPENDED;
wake_up(&runtime->sleep);
wake_up(&runtime->tsleep);
}

static struct action_ops snd_pcm_action_suspend = {
Expand Down Expand Up @@ -3165,9 +3162,7 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream,
long size;
unsigned long offset;

#ifdef pgprot_noncached
area->vm_page_prot = pgprot_noncached(area->vm_page_prot);
#endif
area->vm_flags |= VM_IO;
size = area->vm_end - area->vm_start;
offset = area->vm_pgoff << PAGE_SHIFT;
Expand Down
27 changes: 14 additions & 13 deletions trunk/sound/core/seq/seq_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,22 @@

#define SKEW_BASE 0x10000 /* 16bit shift */

static void snd_seq_timer_set_tick_resolution(struct snd_seq_timer *tmr)
static void snd_seq_timer_set_tick_resolution(struct snd_seq_timer_tick *tick,
int tempo, int ppq)
{
if (tmr->tempo < 1000000)
tmr->tick.resolution = (tmr->tempo * 1000) / tmr->ppq;
if (tempo < 1000000)
tick->resolution = (tempo * 1000) / ppq;
else {
/* might overflow.. */
unsigned int s;
s = tmr->tempo % tmr->ppq;
s = (s * 1000) / tmr->ppq;
tmr->tick.resolution = (tmr->tempo / tmr->ppq) * 1000;
tmr->tick.resolution += s;
s = tempo % ppq;
s = (s * 1000) / ppq;
tick->resolution = (tempo / ppq) * 1000;
tick->resolution += s;
}
if (tmr->tick.resolution <= 0)
tmr->tick.resolution = 1;
snd_seq_timer_update_tick(&tmr->tick, 0);
if (tick->resolution <= 0)
tick->resolution = 1;
snd_seq_timer_update_tick(tick, 0);
}

/* create new timer (constructor) */
Expand Down Expand Up @@ -95,7 +96,7 @@ void snd_seq_timer_defaults(struct snd_seq_timer * tmr)
/* setup defaults */
tmr->ppq = 96; /* 96 PPQ */
tmr->tempo = 500000; /* 120 BPM */
snd_seq_timer_set_tick_resolution(tmr);
snd_seq_timer_set_tick_resolution(&tmr->tick, tmr->tempo, tmr->ppq);
tmr->running = 0;

tmr->type = SNDRV_SEQ_TIMER_ALSA;
Expand Down Expand Up @@ -179,7 +180,7 @@ int snd_seq_timer_set_tempo(struct snd_seq_timer * tmr, int tempo)
spin_lock_irqsave(&tmr->lock, flags);
if ((unsigned int)tempo != tmr->tempo) {
tmr->tempo = tempo;
snd_seq_timer_set_tick_resolution(tmr);
snd_seq_timer_set_tick_resolution(&tmr->tick, tmr->tempo, tmr->ppq);
}
spin_unlock_irqrestore(&tmr->lock, flags);
return 0;
Expand All @@ -204,7 +205,7 @@ int snd_seq_timer_set_ppq(struct snd_seq_timer * tmr, int ppq)
}

tmr->ppq = ppq;
snd_seq_timer_set_tick_resolution(tmr);
snd_seq_timer_set_tick_resolution(&tmr->tick, tmr->tempo, tmr->ppq);
spin_unlock_irqrestore(&tmr->lock, flags);
return 0;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/pci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,6 @@ config SND_VIRTUOSO
Say Y here to include support for sound cards based on the
Asus AV100/AV200 chips, i.e., Xonar D1, DX, D2, D2X,
Essence ST (Deluxe), and Essence STX.
Support for the DS is experimental.
Support for the HDAV1.3 (Deluxe) is very experimental.

To compile this driver as a module, choose M here: the module
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/pci/oxygen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ snd-oxygen-lib-objs := oxygen_io.o oxygen_lib.o oxygen_mixer.o oxygen_pcm.o
snd-hifier-objs := hifier.o
snd-oxygen-objs := oxygen.o
snd-virtuoso-objs := virtuoso.o xonar_lib.o \
xonar_pcm179x.o xonar_cs43xx.o xonar_wm87x6.o xonar_hdmi.o
xonar_pcm179x.o xonar_cs43xx.o xonar_hdmi.o

obj-$(CONFIG_SND_OXYGEN_LIB) += snd-oxygen-lib.o
obj-$(CONFIG_SND_HIFIER) += snd-hifier.o
Expand Down
3 changes: 0 additions & 3 deletions trunk/sound/pci/oxygen/virtuoso.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ static struct pci_device_id xonar_ids[] __devinitdata = {
{ OXYGEN_PCI_SUBID(0x1043, 0x834f) },
{ OXYGEN_PCI_SUBID(0x1043, 0x835c) },
{ OXYGEN_PCI_SUBID(0x1043, 0x835d) },
{ OXYGEN_PCI_SUBID(0x1043, 0x838e) },
{ OXYGEN_PCI_SUBID_BROKEN_EEPROM },
{ }
};
Expand All @@ -62,8 +61,6 @@ static int __devinit get_xonar_model(struct oxygen *chip,
return 0;
if (get_xonar_cs43xx_model(chip, id) >= 0)
return 0;
if (get_xonar_wm87x6_model(chip, id) >= 0)
return 0;
return -EINVAL;
}

Expand Down
73 changes: 0 additions & 73 deletions trunk/sound/pci/oxygen/wm8766.h

This file was deleted.

Loading

0 comments on commit 5fd48fd

Please sign in to comment.