Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252129
b: refs/heads/master
c: 4258781
h: refs/heads/master
i:
  252127: 842ea75
v: v3
  • Loading branch information
Sergey Senozhatsky authored and Guenter Roeck committed May 27, 2011
1 parent 41b7905 commit e1f6cc2
Show file tree
Hide file tree
Showing 29 changed files with 287 additions and 433 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: 09cefbb605ccb07c65f313253268a634e0dcd283
refs/heads/master: 4258781ac720ff8f2fa6c34c1bd06a0cb8562188
7 changes: 0 additions & 7 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2584,13 +2584,6 @@ S: Maintained
F: drivers/hwmon/f75375s.c
F: include/linux/f75375s.h

FIREWIRE AUDIO DRIVERS
M: Clemens Ladisch <clemens@ladisch.de>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
T: git git://git.alsa-project.org/alsa-kernel.git
S: Maintained
F: sound/firewire/

FIREWIRE SUBSYSTEM
M: Stefan Richter <stefanr@s5r6.in-berlin.de>
L: linux1394-devel@lists.sourceforge.net
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/hwmon/coretemp.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ static int get_pkg_tjmax(unsigned int cpu, struct device *dev)

static int create_name_attr(struct platform_data *pdata, struct device *dev)
{
sysfs_attr_init(&pdata->name_attr.attr);
pdata->name_attr.attr.name = "name";
pdata->name_attr.attr.mode = S_IRUGO;
pdata->name_attr.show = show_name;
Expand All @@ -372,6 +373,7 @@ static int create_core_attrs(struct temp_data *tdata, struct device *dev,
for (i = 0; i < MAX_ATTRS; i++) {
snprintf(tdata->attr_name[i], CORETEMP_NAME_LENGTH, names[i],
attr_no);
sysfs_attr_init(&tdata->sd_attrs[i].dev_attr.attr);
tdata->sd_attrs[i].dev_attr.attr.name = tdata->attr_name[i];
tdata->sd_attrs[i].dev_attr.attr.mode = S_IRUGO;
tdata->sd_attrs[i].dev_attr.show = rd_ptr[i];
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/core/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,12 +704,13 @@ static int snd_ctl_elem_list(struct snd_card *card,
struct snd_ctl_elem_list list;
struct snd_kcontrol *kctl;
struct snd_ctl_elem_id *dst, *id;
unsigned int offset, space, jidx;
unsigned int offset, space, first, jidx;

if (copy_from_user(&list, _list, sizeof(list)))
return -EFAULT;
offset = list.offset;
space = list.space;
first = 0;
/* try limit maximum space */
if (space > 16384)
return -ENOMEM;
Expand Down
3 changes: 3 additions & 0 deletions trunk/sound/core/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ static const struct file_operations snd_shutdown_f_ops =
int snd_card_disconnect(struct snd_card *card)
{
struct snd_monitor_file *mfile;
struct file *file;
int err;

if (!card)
Expand All @@ -365,6 +366,8 @@ int snd_card_disconnect(struct snd_card *card)

spin_lock(&card->files_lock);
list_for_each_entry(mfile, &card->files_list, list) {
file = mfile->file;

/* it's critical part, use endless loop */
/* we have no room to fail */
mfile->disconnected_f_op = mfile->file->f_op;
Expand Down
3 changes: 3 additions & 0 deletions trunk/sound/core/oss/linear.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@ static snd_pcm_sframes_t linear_transfer(struct snd_pcm_plugin *plugin,
struct snd_pcm_plugin_channel *dst_channels,
snd_pcm_uframes_t frames)
{
struct linear_priv *data;

if (snd_BUG_ON(!plugin || !src_channels || !dst_channels))
return -ENXIO;
data = (struct linear_priv *)plugin->extra_data;
if (frames == 0)
return 0;
#ifdef CONFIG_SND_DEBUG
Expand Down
17 changes: 4 additions & 13 deletions trunk/sound/core/pcm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1756,27 +1756,18 @@ static int wait_for_avail(struct snd_pcm_substream *substream,
wait_queue_t wait;
int err = 0;
snd_pcm_uframes_t avail = 0;
long wait_time, tout;

if (runtime->no_period_wakeup)
wait_time = MAX_SCHEDULE_TIMEOUT;
else {
wait_time = 10;
if (runtime->rate) {
long t = runtime->period_size * 2 / runtime->rate;
wait_time = max(t, wait_time);
}
wait_time = msecs_to_jiffies(wait_time * 1000);
}
long tout;

init_waitqueue_entry(&wait, current);
add_wait_queue(&runtime->tsleep, &wait);
for (;;) {
if (signal_pending(current)) {
err = -ERESTARTSYS;
break;
}
set_current_state(TASK_INTERRUPTIBLE);
snd_pcm_stream_unlock_irq(substream);
tout = schedule_timeout_interruptible(wait_time);
tout = schedule_timeout(msecs_to_jiffies(10000));
snd_pcm_stream_lock_irq(substream);
switch (runtime->status->state) {
case SNDRV_PCM_STATE_SUSPENDED:
Expand Down
21 changes: 10 additions & 11 deletions trunk/sound/core/pcm_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -1481,20 +1481,11 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream,
break; /* all drained */
init_waitqueue_entry(&wait, current);
add_wait_queue(&to_check->sleep, &wait);
set_current_state(TASK_INTERRUPTIBLE);
snd_pcm_stream_unlock_irq(substream);
up_read(&snd_pcm_link_rwsem);
snd_power_unlock(card);
if (runtime->no_period_wakeup)
tout = MAX_SCHEDULE_TIMEOUT;
else {
tout = 10;
if (runtime->rate) {
long t = runtime->period_size * 2 / runtime->rate;
tout = max(t, tout);
}
tout = msecs_to_jiffies(tout * 1000);
}
tout = schedule_timeout_interruptible(tout);
tout = schedule_timeout(10 * HZ);
snd_power_lock(card);
down_read(&snd_pcm_link_rwsem);
snd_pcm_stream_lock_irq(substream);
Expand Down Expand Up @@ -1527,11 +1518,13 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream,
static int snd_pcm_drop(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime;
struct snd_card *card;
int result = 0;

if (PCM_RUNTIME_CHECK(substream))
return -ENXIO;
runtime = substream->runtime;
card = substream->pcm->card;

if (runtime->status->state == SNDRV_PCM_STATE_OPEN ||
runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED ||
Expand Down Expand Up @@ -2063,6 +2056,7 @@ static int snd_pcm_open_file(struct file *file,
{
struct snd_pcm_file *pcm_file;
struct snd_pcm_substream *substream;
struct snd_pcm_str *str;
int err;

if (rpcm_file)
Expand All @@ -2079,6 +2073,7 @@ static int snd_pcm_open_file(struct file *file,
}
pcm_file->substream = substream;
if (substream->ref_count == 1) {
str = substream->pstr;
substream->file = pcm_file;
substream->pcm_release = pcm_release_private;
}
Expand Down Expand Up @@ -3020,9 +3015,11 @@ static const struct vm_operations_struct snd_pcm_vm_ops_status =
static int snd_pcm_mmap_status(struct snd_pcm_substream *substream, struct file *file,
struct vm_area_struct *area)
{
struct snd_pcm_runtime *runtime;
long size;
if (!(area->vm_flags & VM_READ))
return -EINVAL;
runtime = substream->runtime;
size = area->vm_end - area->vm_start;
if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_status)))
return -EINVAL;
Expand Down Expand Up @@ -3057,9 +3054,11 @@ static const struct vm_operations_struct snd_pcm_vm_ops_control =
static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file *file,
struct vm_area_struct *area)
{
struct snd_pcm_runtime *runtime;
long size;
if (!(area->vm_flags & VM_READ))
return -EINVAL;
runtime = substream->runtime;
size = area->vm_end - area->vm_start;
if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_control)))
return -EINVAL;
Expand Down
2 changes: 2 additions & 0 deletions trunk/sound/core/seq/seq_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,13 @@ int snd_seq_queue_timer_open(int queueid)
int snd_seq_queue_timer_close(int queueid)
{
struct snd_seq_queue *queue;
struct snd_seq_timer *tmr;
int result = 0;

queue = queueptr(queueid);
if (queue == NULL)
return -EINVAL;
tmr = queue->timer;
snd_seq_timer_close(queue);
queuefree(queue);
return result;
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -4719,7 +4719,7 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
cfg->dig_out_pins[0], cfg->dig_out_pins[1]);
snd_printd(" inputs:");
for (i = 0; i < cfg->num_inputs; i++) {
snd_printd(" %s=0x%x",
snd_printdd(" %s=0x%x",
hda_get_autocfg_input_label(codec, cfg, i),
cfg->inputs[i].pin);
}
Expand Down
21 changes: 18 additions & 3 deletions trunk/sound/pci/hda/hda_eld.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,23 @@ static int hdmi_update_eld(struct hdmi_eld *e,
return -EINVAL;
}

static int hdmi_eld_valid(struct hda_codec *codec, hda_nid_t nid)
{
int eldv;
int present;

present = snd_hda_pin_sense(codec, nid);
eldv = (present & AC_PINSENSE_ELDV);
present = (present & AC_PINSENSE_PRESENCE);

#ifdef CONFIG_SND_DEBUG_VERBOSE
printk(KERN_INFO "HDMI: sink_present = %d, eld_valid = %d\n",
!!present, !!eldv);
#endif

return eldv && present;
}

int snd_hdmi_get_eld_size(struct hda_codec *codec, hda_nid_t nid)
{
return snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_HDMI_DIP_SIZE,
Expand All @@ -326,7 +343,7 @@ int snd_hdmi_get_eld(struct hdmi_eld *eld,
int size;
unsigned char *buf;

if (!eld->eld_valid)
if (!hdmi_eld_valid(codec, nid))
return -ENOENT;

size = snd_hdmi_get_eld_size(codec, nid);
Expand Down Expand Up @@ -460,8 +477,6 @@ static void hdmi_print_eld_info(struct snd_info_entry *entry,

snd_iprintf(buffer, "monitor_present\t\t%d\n", e->monitor_present);
snd_iprintf(buffer, "eld_valid\t\t%d\n", e->eld_valid);
if (!e->eld_valid)
return;
snd_iprintf(buffer, "monitor_name\t\t%s\n", e->monitor_name);
snd_iprintf(buffer, "connection_type\t\t%s\n",
eld_connection_type_names[e->conn_type]);
Expand Down
Loading

0 comments on commit e1f6cc2

Please sign in to comment.