Skip to content

Commit

Permalink
Merge branch 'topic/misc' into for-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
tiwai committed Jan 13, 2011
2 parents 3c0eee3 + c386735 commit e38302f
Show file tree
Hide file tree
Showing 59 changed files with 2,752 additions and 1,125 deletions.
20 changes: 9 additions & 11 deletions Documentation/sound/alsa/ALSA-Configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -974,13 +974,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.

See hdspm.txt for details.

Module snd-hifier
-----------------

Module for the MediaTek/TempoTec HiFier Fantasia sound card.

This module supports autoprobe and multiple cards.

Module snd-ice1712
------------------

Expand Down Expand Up @@ -1531,15 +1524,20 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module snd-oxygen
-----------------

Module for sound cards based on the C-Media CMI8788 chip:
Module for sound cards based on the C-Media CMI8786/8787/8788 chip:
* Asound A-8788
* Asus Xonar DG
* AuzenTech X-Meridian
* AuzenTech X-Meridian 2G
* Bgears b-Enspirer
* Club3D Theatron DTS
* HT-Omega Claro (plus)
* HT-Omega Claro halo (XT)
* Kuroutoshikou CMI8787-HG2PCI
* Razer Barracuda AC-1
* Sondigo Inferno
* TempoTec HiFier Fantasia
* TempoTec HiFier Serenade

This module supports autoprobe and multiple cards.

Expand Down Expand Up @@ -2006,9 +2004,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module snd-virtuoso
-------------------

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

This module supports autoprobe and multiple cards.

Expand Down
43 changes: 43 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,14 @@ S: Supported
F: block/bsg.c
F: include/linux/bsg.h

BT87X AUDIO DRIVER
M: Clemens Ladisch <[email protected]>
L: [email protected] (moderated for non-subscribers)
T: git git://git.alsa-project.org/alsa-kernel.git
S: Maintained
F: Documentation/sound/alsa/Bt87x.txt
F: sound/pci/bt87x.c

BT8XXGPIO DRIVER
M: Michael Buesch <[email protected]>
W: http://bu3sch.de/btgpio.php
Expand All @@ -1459,6 +1467,13 @@ S: Maintained
F: Documentation/video4linux/bttv/
F: drivers/media/video/bt8xx/bttv*

C-MEDIA CMI8788 DRIVER
M: Clemens Ladisch <[email protected]>
L: [email protected] (moderated for non-subscribers)
T: git git://git.alsa-project.org/alsa-kernel.git
S: Maintained
F: sound/pci/oxygen/

CACHEFILES: FS-CACHE BACKEND FOR CACHING ON MOUNTED FILESYSTEMS
M: David Howells <[email protected]>
L: [email protected]
Expand Down Expand Up @@ -2249,6 +2264,13 @@ W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/r82600_edac.c

EDIROL UA-101/UA-1000 DRIVER
M: Clemens Ladisch <[email protected]>
L: [email protected] (moderated for non-subscribers)
T: git git://git.alsa-project.org/alsa-kernel.git
S: Maintained
F: sound/usb/misc/ua101.c

EEEPC LAPTOP EXTRAS DRIVER
M: Corentin Chary <[email protected]>
L: [email protected]
Expand Down Expand Up @@ -3393,6 +3415,13 @@ L: [email protected]
S: Maintained
F: drivers/serial/jsm/

K10TEMP HARDWARE MONITORING DRIVER
M: Clemens Ladisch <[email protected]>
L: [email protected]
S: Maintained
F: Documentation/hwmon/k10temp
F: drivers/hwmon/k10temp.c

K8TEMP HARDWARE MONITORING DRIVER
M: Rudolf Marek <[email protected]>
L: [email protected]
Expand Down Expand Up @@ -4409,6 +4438,13 @@ F: drivers/of
F: include/linux/of*.h
K: of_get_property

OPL4 DRIVER
M: Clemens Ladisch <[email protected]>
L: [email protected] (moderated for non-subscribers)
T: git git://git.alsa-project.org/alsa-kernel.git
S: Maintained
F: sound/drivers/opl4/

OPROFILE
M: Robert Richter <[email protected]>
L: [email protected]
Expand Down Expand Up @@ -6141,6 +6177,13 @@ S: Maintained
W: http://www.one-eyed-alien.net/~mdharm/linux-usb/
F: drivers/usb/storage/

USB MIDI DRIVER
M: Clemens Ladisch <[email protected]>
L: [email protected] (moderated for non-subscribers)
T: git git://git.alsa-project.org/alsa-kernel.git
S: Maintained
F: sound/usb/midi.*

USB OHCI DRIVER
M: David Brownell <[email protected]>
L: [email protected]
Expand Down
3 changes: 3 additions & 0 deletions include/sound/asound.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ typedef int __bitwise snd_pcm_subformat_t;
#define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000 /* only half duplex */
#define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 /* playback and capture stream are somewhat correlated */
#define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */
#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000 /* period wakeup can be disabled */
#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 /* internal kernel flag - FIFO size is in frames */

typedef int __bitwise snd_pcm_state_t;
Expand Down Expand Up @@ -334,6 +335,8 @@ typedef int snd_pcm_hw_param_t;
#define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME

#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1<<0) /* avoid rate resampling */
#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1<<1) /* export buffer */
#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1<<2) /* disable period wakeups */

struct snd_interval {
unsigned int min, max;
Expand Down
4 changes: 3 additions & 1 deletion include/sound/control.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,14 @@ static inline struct snd_ctl_elem_id *snd_ctl_build_ioff(struct snd_ctl_elem_id
}

/*
* Frequently used control callbacks
* Frequently used control callbacks/helpers
*/
int snd_ctl_boolean_mono_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo);
int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo);
int snd_ctl_enum_info(struct snd_ctl_elem_info *info, unsigned int channels,
unsigned int items, const char *const names[]);

/*
* virtual master control
Expand Down
1 change: 1 addition & 0 deletions include/sound/hdsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ enum HDSP_IO_Type {
Multiface,
H9652,
H9632,
RPM,
Undefined,
};

Expand Down
4 changes: 2 additions & 2 deletions include/sound/minors.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
/* these minors can still be used for autoloading devices (/dev/aload*) */
#define SNDRV_MINOR_CONTROL 0 /* 0 */
#define SNDRV_MINOR_GLOBAL 1 /* 1 */
#define SNDRV_MINOR_SEQUENCER (SNDRV_MINOR_GLOBAL + 0 * 32)
#define SNDRV_MINOR_TIMER (SNDRV_MINOR_GLOBAL + 1 * 32)
#define SNDRV_MINOR_SEQUENCER 1 /* SNDRV_MINOR_GLOBAL + 0 * 32 */
#define SNDRV_MINOR_TIMER 33 /* SNDRV_MINOR_GLOBAL + 1 * 32 */

#ifndef CONFIG_SND_DYNAMIC_MINORS
/* 2 - 3 (reserved) */
Expand Down
1 change: 1 addition & 0 deletions include/sound/pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ struct snd_pcm_runtime {
unsigned int info;
unsigned int rate_num;
unsigned int rate_den;
unsigned int no_period_wakeup: 1;

/* -- SW params -- */
int tstamp_mode; /* mmap timestamp is updated */
Expand Down
4 changes: 2 additions & 2 deletions sound/ac97_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

/*
* Let drivers decide whether they want to support given codec from their
* probe method. Drivers have direct access to the struct snd_ac97 structure and may
* decide based on the id field amongst other things.
* probe method. Drivers have direct access to the struct snd_ac97
* structure and may decide based on the id field amongst other things.
*/
static int ac97_bus_match(struct device *dev, struct device_driver *drv)
{
Expand Down
1 change: 0 additions & 1 deletion sound/aoa/codecs/onyx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,6 @@ static int onyx_i2c_remove(struct i2c_client *client)
of_node_put(onyx->codec.node);
if (onyx->codec_info)
kfree(onyx->codec_info);
i2c_set_clientdata(client, onyx);
kfree(onyx);
return 0;
}
Expand Down
7 changes: 3 additions & 4 deletions sound/aoa/core/gpio-feature.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,9 @@ static void ftr_gpio_exit(struct gpio_runtime *rt)
free_irq(linein_detect_irq, &rt->line_in_notify);
if (rt->line_out_notify.gpio_private)
free_irq(lineout_detect_irq, &rt->line_out_notify);
cancel_delayed_work(&rt->headphone_notify.work);
cancel_delayed_work(&rt->line_in_notify.work);
cancel_delayed_work(&rt->line_out_notify.work);
flush_scheduled_work();
cancel_delayed_work_sync(&rt->headphone_notify.work);
cancel_delayed_work_sync(&rt->line_in_notify.work);
cancel_delayed_work_sync(&rt->line_out_notify.work);
mutex_destroy(&rt->headphone_notify.mutex);
mutex_destroy(&rt->line_in_notify.mutex);
mutex_destroy(&rt->line_out_notify.mutex);
Expand Down
7 changes: 3 additions & 4 deletions sound/aoa/core/gpio-pmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,9 @@ static void pmf_gpio_exit(struct gpio_runtime *rt)

/* make sure no work is pending before freeing
* all things */
cancel_delayed_work(&rt->headphone_notify.work);
cancel_delayed_work(&rt->line_in_notify.work);
cancel_delayed_work(&rt->line_out_notify.work);
flush_scheduled_work();
cancel_delayed_work_sync(&rt->headphone_notify.work);
cancel_delayed_work_sync(&rt->line_in_notify.work);
cancel_delayed_work_sync(&rt->line_out_notify.work);

mutex_destroy(&rt->headphone_notify.mutex);
mutex_destroy(&rt->line_in_notify.mutex);
Expand Down
28 changes: 27 additions & 1 deletion sound/core/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,7 @@ int snd_ctl_create(struct snd_card *card)
}

/*
* Frequently used control callbacks
* Frequently used control callbacks/helpers
*/
int snd_ctl_boolean_mono_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
Expand All @@ -1513,3 +1513,29 @@ int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol,
}

EXPORT_SYMBOL(snd_ctl_boolean_stereo_info);

/**
* snd_ctl_enum_info - fills the info structure for an enumerated control
* @info: the structure to be filled
* @channels: the number of the control's channels; often one
* @items: the number of control values; also the size of @names
* @names: an array containing the names of all control values
*
* Sets all required fields in @info to their appropriate values.
* If the control's accessibility is not the default (readable and writable),
* the caller has to fill @info->access.
*/
int snd_ctl_enum_info(struct snd_ctl_elem_info *info, unsigned int channels,
unsigned int items, const char *const names[])
{
info->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
info->count = channels;
info->value.enumerated.items = items;
if (info->value.enumerated.item >= items)
info->value.enumerated.item = items - 1;
strlcpy(info->value.enumerated.name,
names[info->value.enumerated.item],
sizeof(info->value.enumerated.name));
return 0;
}
EXPORT_SYMBOL(snd_ctl_enum_info);
4 changes: 3 additions & 1 deletion sound/core/oss/pcm_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,10 @@ static int snd_pcm_hw_param_near(struct snd_pcm_substream *pcm,
} else {
*params = *save;
max = snd_pcm_hw_param_max(pcm, params, var, max, &maxdir);
if (max < 0)
if (max < 0) {
kfree(save);
return max;
}
last = 1;
}
_end:
Expand Down
22 changes: 22 additions & 0 deletions sound/core/pcm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,27 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
(unsigned long)new_hw_ptr,
(unsigned long)runtime->hw_ptr_base);
}

if (runtime->no_period_wakeup) {
/*
* Without regular period interrupts, we have to check
* the elapsed time to detect xruns.
*/
jdelta = jiffies - runtime->hw_ptr_jiffies;
if (jdelta < runtime->hw_ptr_buffer_jiffies / 2)
goto no_delta_check;
hdelta = jdelta - delta * HZ / runtime->rate;
while (hdelta > runtime->hw_ptr_buffer_jiffies / 2 + 1) {
delta += runtime->buffer_size;
hw_base += runtime->buffer_size;
if (hw_base >= runtime->boundary)
hw_base = 0;
new_hw_ptr = hw_base + pos;
hdelta -= runtime->hw_ptr_buffer_jiffies;
}
goto no_delta_check;
}

/* something must be really wrong */
if (delta >= runtime->buffer_size + runtime->period_size) {
hw_ptr_error(substream,
Expand Down Expand Up @@ -442,6 +463,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
(long)old_hw_ptr);
}

no_delta_check:
if (runtime->status->hw_ptr == new_hw_ptr)
return 0;

Expand Down
3 changes: 3 additions & 0 deletions sound/core/pcm_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
runtime->info = params->info;
runtime->rate_num = params->rate_num;
runtime->rate_den = params->rate_den;
runtime->no_period_wakeup =
(params->info & SNDRV_PCM_INFO_NO_PERIOD_WAKEUP) &&
(params->flags & SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP);

bits = snd_pcm_format_physical_width(runtime->format);
runtime->sample_bits = bits;
Expand Down
4 changes: 4 additions & 0 deletions sound/core/seq/seq.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "seq_timer.h"
#include "seq_system.h"
#include "seq_info.h"
#include <sound/minors.h>
#include <sound/seq_device.h>

#if defined(CONFIG_SND_SEQ_DUMMY_MODULE)
Expand Down Expand Up @@ -73,6 +74,9 @@ MODULE_PARM_DESC(seq_default_timer_subdevice, "The default timer subdevice numbe
module_param(seq_default_timer_resolution, int, 0644);
MODULE_PARM_DESC(seq_default_timer_resolution, "The default timer resolution in Hz.");

MODULE_ALIAS_CHARDEV(CONFIG_SND_MAJOR, SNDRV_MINOR_SEQUENCER);
MODULE_ALIAS("devname:snd/seq");

/*
* INIT PART
*/
Expand Down
18 changes: 13 additions & 5 deletions sound/core/sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,22 @@ static const struct file_operations snd_fops =
};

#ifdef CONFIG_SND_DYNAMIC_MINORS
static int snd_find_free_minor(void)
static int snd_find_free_minor(int type)
{
int minor;

/* static minors for module auto loading */
if (type == SNDRV_DEVICE_TYPE_SEQUENCER)
return SNDRV_MINOR_SEQUENCER;
if (type == SNDRV_DEVICE_TYPE_TIMER)
return SNDRV_MINOR_TIMER;

for (minor = 0; minor < ARRAY_SIZE(snd_minors); ++minor) {
/* skip minors still used statically for autoloading devices */
if (SNDRV_MINOR_DEVICE(minor) == SNDRV_MINOR_CONTROL ||
minor == SNDRV_MINOR_SEQUENCER)
/* skip static minors still used for module auto loading */
if (SNDRV_MINOR_DEVICE(minor) == SNDRV_MINOR_CONTROL)
continue;
if (minor == SNDRV_MINOR_SEQUENCER ||
minor == SNDRV_MINOR_TIMER)
continue;
if (!snd_minors[minor])
return minor;
Expand Down Expand Up @@ -269,7 +277,7 @@ int snd_register_device_for_dev(int type, struct snd_card *card, int dev,
preg->private_data = private_data;
mutex_lock(&sound_mutex);
#ifdef CONFIG_SND_DYNAMIC_MINORS
minor = snd_find_free_minor();
minor = snd_find_free_minor(type);
#else
minor = snd_kernel_minor(type, card, dev);
if (minor >= 0 && snd_minors[minor])
Expand Down
Loading

0 comments on commit e38302f

Please sign in to comment.