You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa
* git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa: (22 commits) [ALSA] via82xx - Use DXS_SRC as default for VIA8235/8237/8251 chips [ALSA] hda-codec - Add model entry for ASUS Z62F [ALSA] PCMCIA sound devices shouldn't depend on ISA [ALSA] hda-codec - Fix capture from line-in on VAIO SZ/FE laptops [ALSA] Fix Oops at rmmod with CONFIG_SND_VERBOSE_PROCFS=n [ALSA] PCM core - introduce CONFIG_SND_PCM_XRUN_DEBUG [ALSA] adding __devinitdata to pci_device_id [ALSA] add __devinitdata to all pci_device_id [ALSA] hda-codec - Add codec id for AD1988B codec chip [ALSA] hda-codec - Add model entry for ASUS M9 laptop [ALSA] pcxhr - Fix a compiler warning on 64bit architectures [ALSA] via82xx: tweak VT8251 workaround [ALSA] intel8x0 - Disable ALI5455 SPDIF-input [ALSA] via82xx: add support for VIA VT8251 (AC'97) [ALSA] Fix typos and add information about Jack support to Audiophile-Usb.txt [ALSA] Fix double free in error path of miro driver [ALSA] hda-codec - Add entry for Epox EP-5LDA+ GLi [ALSA] sound/pci/: remove duplicate #include's [ALSA] hda-codec - Use model 'hp' for all HP laptops with AD1981HD [ALSA] continue on IS_ERR from platform device registration ...
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
Guide to using M-Audio Audiophile USB with ALSA and Jack v1.2
|
||||
Guide to using M-Audio Audiophile USB with ALSA and Jack v1.3
|
||||
========================================================
|
||||
|
||||
Thibault Le Meur <Thibault.LeMeur@supelec.fr>
|
||||
@@ -22,16 +22,16 @@ The device has 4 audio interfaces, and 2 MIDI ports:
|
||||
* Midi In (Mi)
|
||||
* Midi Out (Mo)
|
||||
|
||||
The internal DAC/ADC has the following caracteristics:
|
||||
The internal DAC/ADC has the following characteristics:
|
||||
* sample depth of 16 or 24 bits
|
||||
* sample rate from 8kHz to 96kHz
|
||||
* Two ports can't use different sample depths at the same time.Moreover, the
|
||||
* Two ports can't use different sample depths at the same time. Moreover, the
|
||||
Audiophile USB documentation gives the following Warning: "Please exit any
|
||||
audio application running before switching between bit depths"
|
||||
|
||||
Due to the USB 1.1 bandwidth limitation, a limited number of interfaces can be
|
||||
activated at the same time depending on the audio mode selected:
|
||||
* 16-bit/48kHz ==> 4 channels in/ 4 channels out
|
||||
* 16-bit/48kHz ==> 4 channels in/4 channels out
|
||||
- Ai+Ao+Di+Do
|
||||
* 24-bit/48kHz ==> 4 channels in/2 channels out,
|
||||
or 2 channels in/4 channels out
|
||||
@@ -41,8 +41,8 @@ activated at the same time depending on the audio mode selected:
|
||||
|
||||
Important facts about the Digital interface:
|
||||
--------------------------------------------
|
||||
* The Do port additionnaly supports surround-encoded AC-3 and DTS passthrough,
|
||||
though I haven't tested it under linux
|
||||
* The Do port additionally supports surround-encoded AC-3 and DTS passthrough,
|
||||
though I haven't tested it under Linux
|
||||
- Note that in this setup only the Do interface can be enabled
|
||||
* Apart from recording an audio digital stream, enabling the Di port is a way
|
||||
to synchronize the device to an external sample clock
|
||||
@@ -60,24 +60,23 @@ synchronization error (for instance sound played at an odd sample rate)
|
||||
The Audiophile USB MIDI ports will be automatically supported once the
|
||||
following modules have been loaded:
|
||||
* snd-usb-audio
|
||||
* snd-seq
|
||||
* snd-seq-midi
|
||||
|
||||
No additionnal setting is required.
|
||||
No additional setting is required.
|
||||
|
||||
2.2 - Audio ports
|
||||
-----------------
|
||||
|
||||
Audio functions of the Audiophile USB device are handled by the snd-usb-audio
|
||||
module. This module can work in a default mode (without any device-specific
|
||||
parameter), or in an advanced mode with the device-specific parameter called
|
||||
parameter), or in an "advanced" mode with the device-specific parameter called
|
||||
"device_setup".
|
||||
|
||||
2.2.1 - Default Alsa driver mode
|
||||
|
||||
The default behaviour of the snd-usb-audio driver is to parse the device
|
||||
The default behavior of the snd-usb-audio driver is to parse the device
|
||||
capabilities at startup and enable all functions inside the device (including
|
||||
all ports at any sample rates and any sample depths supported). This approach
|
||||
all ports at any supported sample rates and sample depths). This approach
|
||||
has the advantage to let the driver easily switch from sample rates/depths
|
||||
automatically according to the need of the application claiming the device.
|
||||
|
||||
@@ -114,9 +113,9 @@ gain).
|
||||
For people having this problem, the snd-usb-audio module has a new module
|
||||
parameter called "device_setup".
|
||||
|
||||
2.2.2.1 - Initializing the working mode of the Audiohile USB
|
||||
2.2.2.1 - Initializing the working mode of the Audiophile USB
|
||||
|
||||
As far as the Audiohile USB device is concerned, this value let the user
|
||||
As far as the Audiophile USB device is concerned, this value let the user
|
||||
specify:
|
||||
* the sample depth
|
||||
* the sample rate
|
||||
@@ -174,20 +173,20 @@ The parameter can be given:
|
||||
|
||||
IMPORTANT NOTE WHEN SWITCHING CONFIGURATION:
|
||||
-------------------------------------------
|
||||
* You may need to _first_ intialize the module with the correct device_setup
|
||||
* You may need to _first_ initialize the module with the correct device_setup
|
||||
parameter and _only_after_ turn on the Audiophile USB device
|
||||
* This is especially true when switching the sample depth:
|
||||
- first trun off the device
|
||||
- de-register the snd-usb-audio module
|
||||
- change the device_setup parameter (by either manually reprobing the module
|
||||
or changing modprobe.conf)
|
||||
- first turn off the device
|
||||
- de-register the snd-usb-audio module (modprobe -r)
|
||||
- change the device_setup parameter by changing the device_setup
|
||||
option in /etc/modprobe.conf
|
||||
- turn on the device
|
||||
|
||||
2.2.2.3 - Audiophile USB's device_setup structure
|
||||
|
||||
If you want to understand the device_setup magic numbers for the Audiophile
|
||||
USB, you need some very basic understanding of binary computation. However,
|
||||
this is not required to use the parameter and you may skip thi section.
|
||||
this is not required to use the parameter and you may skip this section.
|
||||
|
||||
The device_setup is one byte long and its structure is the following:
|
||||
|
||||
@@ -231,11 +230,11 @@ Caution:
|
||||
|
||||
2.2.3 - USB implementation details for this device
|
||||
|
||||
You may safely skip this section if you're not interrested in driver
|
||||
You may safely skip this section if you're not interested in driver
|
||||
development.
|
||||
|
||||
This section describes some internals aspect of the device and summarize the
|
||||
data I got by usb-snooping the windows and linux drivers.
|
||||
This section describes some internal aspects of the device and summarize the
|
||||
data I got by usb-snooping the windows and Linux drivers.
|
||||
|
||||
The M-Audio Audiophile USB has 7 USB Interfaces:
|
||||
a "USB interface":
|
||||
@@ -277,9 +276,9 @@ Here is a short description of the AltSettings capabilities:
|
||||
- 16-bit depth, 8-48kHz sample mode
|
||||
- Synch playback (Do), audio format type III IEC1937_AC-3
|
||||
|
||||
In order to ensure a correct intialization of the device, the driver
|
||||
In order to ensure a correct initialization of the device, the driver
|
||||
_must_know_ how the device will be used:
|
||||
* if DTS is choosen, only Interface 2 with AltSet nb.6 must be
|
||||
* if DTS is chosen, only Interface 2 with AltSet nb.6 must be
|
||||
registered
|
||||
* if 96KHz only AltSets nb.1 of each interface must be selected
|
||||
* if samples are using 24bits/48KHz then AltSet 2 must me used if
|
||||
@@ -290,7 +289,7 @@ _must_know_ how the device will be used:
|
||||
is not connected
|
||||
|
||||
When device_setup is given as a parameter to the snd-usb-audio module, the
|
||||
parse_audio_enpoint function uses a quirk called
|
||||
parse_audio_endpoints function uses a quirk called
|
||||
"audiophile_skip_setting_quirk" in order to prevent AltSettings not
|
||||
corresponding to device_setup from being registered in the driver.
|
||||
|
||||
@@ -317,9 +316,8 @@ However you may see the following warning message:
|
||||
using the "default" ALSA device. This is less efficient than it could be.
|
||||
Consider using a hardware device instead rather than using the plug layer."
|
||||
|
||||
|
||||
3.2 - Patching alsa to use direct pcm device
|
||||
-------------------------------------------
|
||||
--------------------------------------------
|
||||
A patch for Jack by Andreas Steinmetz adds support for Big Endian devices.
|
||||
However it has not been included in the CVS tree.
|
||||
|
||||
@@ -331,3 +329,32 @@ After having applied the patch you can run jackd with the following command
|
||||
line:
|
||||
% jackd -R -dalsa -Phw:1,0 -r48000 -p128 -n2 -D -Chw:1,1
|
||||
|
||||
3.2 - Getting 2 input and/or output interfaces in Jack
|
||||
------------------------------------------------------
|
||||
|
||||
As you can see, starting the Jack server this way will only enable 1 stereo
|
||||
input (Di or Ai) and 1 stereo output (Ao or Do).
|
||||
|
||||
This is due to the following restrictions:
|
||||
* Jack can only open one capture device and one playback device at a time
|
||||
* The Audiophile USB is seen as 2 (or three) Alsa devices: hw:1,0, hw:1,1
|
||||
(and optionally hw:1,2)
|
||||
If you want to get Ai+Di and/or Ao+Do support with Jack, you would need to
|
||||
combine the Alsa devices into one logical "complex" device.
|
||||
|
||||
If you want to give it a try, I recommend reading the information from
|
||||
this page: http://www.sound-man.co.uk/linuxaudio/ice1712multi.html
|
||||
It is related to another device (ice1712) but can be adapted to suit
|
||||
the Audiophile USB.
|
||||
|
||||
Enabling multiple Audiophile USB interfaces for Jackd will certainly require:
|
||||
* patching Jack with the previously mentioned "Big Endian" patch
|
||||
* patching Jackd with the MMAP_COMPLEX patch (see the ice1712 page)
|
||||
* patching the alsa-lib/src/pcm/pcm_multi.c file (see the ice1712 page)
|
||||
* define a multi device (combination of hw:1,0 and hw:1,1) in your .asoundrc
|
||||
file
|
||||
* start jackd with this device
|
||||
|
||||
I had no success in testing this for now, but this may be due to my OS
|
||||
configuration. If you have any success with this kind of setup, please
|
||||
drop me an email.
|
||||
|
||||
@@ -1172,7 +1172,7 @@
|
||||
}
|
||||
|
||||
/* PCI IDs */
|
||||
static struct pci_device_id snd_mychip_ids[] = {
|
||||
static struct pci_device_id snd_mychip_ids[] __devinitdata = {
|
||||
{ PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
|
||||
....
|
||||
@@ -1565,7 +1565,7 @@
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
static struct pci_device_id snd_mychip_ids[] = {
|
||||
static struct pci_device_id snd_mychip_ids[] __devinitdata = {
|
||||
{ PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
|
||||
....
|
||||
|
||||
@@ -616,7 +616,7 @@ static struct snd_kcontrol_new snd_cx88_capture_volume = {
|
||||
* Only boards with eeprom and byte 1 at eeprom=1 have it
|
||||
*/
|
||||
|
||||
static struct pci_device_id cx88_audio_pci_tbl[] = {
|
||||
static struct pci_device_id cx88_audio_pci_tbl[] __devinitdata = {
|
||||
{0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0},
|
||||
{0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0},
|
||||
{0, }
|
||||
|
||||
+5
-1
@@ -374,12 +374,14 @@ struct snd_pcm_substream {
|
||||
/* -- OSS things -- */
|
||||
struct snd_pcm_oss_substream oss;
|
||||
#endif
|
||||
#ifdef CONFIG_SND_VERBOSE_PROCFS
|
||||
struct snd_info_entry *proc_root;
|
||||
struct snd_info_entry *proc_info_entry;
|
||||
struct snd_info_entry *proc_hw_params_entry;
|
||||
struct snd_info_entry *proc_sw_params_entry;
|
||||
struct snd_info_entry *proc_status_entry;
|
||||
struct snd_info_entry *proc_prealloc_entry;
|
||||
#endif
|
||||
/* misc flags */
|
||||
unsigned int no_mmap_ctrl: 1;
|
||||
unsigned int hw_opened: 1;
|
||||
@@ -400,12 +402,14 @@ struct snd_pcm_str {
|
||||
struct snd_pcm_oss_stream oss;
|
||||
#endif
|
||||
struct snd_pcm_file *files;
|
||||
#ifdef CONFIG_SND_VERBOSE_PROCFS
|
||||
struct snd_info_entry *proc_root;
|
||||
struct snd_info_entry *proc_info_entry;
|
||||
#ifdef CONFIG_SND_DEBUG
|
||||
#ifdef CONFIG_SND_PCM_XRUN_DEBUG
|
||||
unsigned int xrun_debug; /* 0 = disabled, 1 = verbose, 2 = stacktrace */
|
||||
struct snd_info_entry *proc_xrun_debug_entry;
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
struct snd_pcm {
|
||||
|
||||
@@ -75,7 +75,9 @@ struct snd_pcm_oss_substream {
|
||||
struct snd_pcm_oss_stream {
|
||||
struct snd_pcm_oss_setup *setup_list; /* setup list */
|
||||
struct mutex setup_mutex;
|
||||
#ifdef CONFIG_SND_VERBOSE_PROCFS
|
||||
struct snd_info_entry *proc_entry;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct snd_pcm_oss {
|
||||
|
||||
+11
-1
@@ -142,7 +142,7 @@ config SND_SUPPORT_OLD_API
|
||||
|
||||
config SND_VERBOSE_PROCFS
|
||||
bool "Verbose procfs contents"
|
||||
depends on SND
|
||||
depends on SND && PROC_FS
|
||||
default y
|
||||
help
|
||||
Say Y here to include code for verbose procfs contents (provides
|
||||
@@ -171,3 +171,13 @@ config SND_DEBUG_DETECT
|
||||
help
|
||||
Say Y here to enable extra-verbose log messages printed when
|
||||
detecting devices.
|
||||
|
||||
config SND_PCM_XRUN_DEBUG
|
||||
bool "Enable PCM ring buffer overrun/underrun debugging"
|
||||
default n
|
||||
depends on SND_DEBUG && SND_VERBOSE_PROCFS
|
||||
help
|
||||
Say Y to enable the PCM ring buffer overrun/underrun debugging.
|
||||
It is usually not required, but if you have trouble with
|
||||
sound clicking when system is loaded, it may help to determine
|
||||
the process or driver which causes the scheduling gaps.
|
||||
|
||||
@@ -1242,6 +1242,8 @@ static int snd_pcm_oss_set_format(struct snd_pcm_oss_file *pcm_oss_file, int for
|
||||
|
||||
if (format != AFMT_QUERY) {
|
||||
formats = snd_pcm_oss_get_formats(pcm_oss_file);
|
||||
if (formats < 0)
|
||||
return formats;
|
||||
if (!(formats & format))
|
||||
format = AFMT_U8;
|
||||
for (idx = 1; idx >= 0; --idx) {
|
||||
@@ -2212,7 +2214,7 @@ static int snd_pcm_oss_mmap(struct file *file, struct vm_area_struct *area)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_VERBOSE_PROCFS
|
||||
/*
|
||||
* /proc interface
|
||||
*/
|
||||
@@ -2366,10 +2368,10 @@ static void snd_pcm_oss_proc_done(struct snd_pcm *pcm)
|
||||
}
|
||||
}
|
||||
}
|
||||
#else /* !CONFIG_PROC_FS */
|
||||
#else /* !CONFIG_SND_VERBOSE_PROCFS */
|
||||
#define snd_pcm_oss_proc_init(pcm)
|
||||
#define snd_pcm_oss_proc_done(pcm)
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
#endif /* CONFIG_SND_VERBOSE_PROCFS */
|
||||
|
||||
/*
|
||||
* ENTRY functions
|
||||
|
||||
+6
-6
@@ -142,7 +142,7 @@ static int snd_pcm_control_ioctl(struct snd_card *card,
|
||||
return -ENOIOCTLCMD;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_PROC_FS) && defined(CONFIG_SND_VERBOSE_PROCFS)
|
||||
#ifdef CONFIG_SND_VERBOSE_PROCFS
|
||||
|
||||
#define STATE(v) [SNDRV_PCM_STATE_##v] = #v
|
||||
#define STREAM(v) [SNDRV_PCM_STREAM_##v] = #v
|
||||
@@ -436,7 +436,7 @@ static void snd_pcm_substream_proc_status_read(struct snd_info_entry *entry,
|
||||
snd_iprintf(buffer, "appl_ptr : %ld\n", runtime->control->appl_ptr);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SND_DEBUG
|
||||
#ifdef CONFIG_SND_PCM_XRUN_DEBUG
|
||||
static void snd_pcm_xrun_debug_read(struct snd_info_entry *entry,
|
||||
struct snd_info_buffer *buffer)
|
||||
{
|
||||
@@ -480,7 +480,7 @@ static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr)
|
||||
}
|
||||
pstr->proc_info_entry = entry;
|
||||
|
||||
#ifdef CONFIG_SND_DEBUG
|
||||
#ifdef CONFIG_SND_PCM_XRUN_DEBUG
|
||||
if ((entry = snd_info_create_card_entry(pcm->card, "xrun_debug",
|
||||
pstr->proc_root)) != NULL) {
|
||||
entry->c.text.read_size = 64;
|
||||
@@ -501,7 +501,7 @@ static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr)
|
||||
|
||||
static int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr)
|
||||
{
|
||||
#ifdef CONFIG_SND_DEBUG
|
||||
#ifdef CONFIG_SND_PCM_XRUN_DEBUG
|
||||
if (pstr->proc_xrun_debug_entry) {
|
||||
snd_info_unregister(pstr->proc_xrun_debug_entry);
|
||||
pstr->proc_xrun_debug_entry = NULL;
|
||||
@@ -599,12 +599,12 @@ static int snd_pcm_substream_proc_done(struct snd_pcm_substream *substream)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#else /* !CONFIG_PROC_FS */
|
||||
#else /* !CONFIG_SND_VERBOSE_PROCFS */
|
||||
static inline int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) { return 0; }
|
||||
static inline int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) { return 0; }
|
||||
static inline int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream) { return 0; }
|
||||
static inline int snd_pcm_substream_proc_done(struct snd_pcm_substream *substream) { return 0; }
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
#endif /* CONFIG_SND_VERBOSE_PROCFS */
|
||||
|
||||
/**
|
||||
* snd_pcm_new_stream - create a new PCM stream
|
||||
|
||||
@@ -130,7 +130,7 @@ void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_ufram
|
||||
static void xrun(struct snd_pcm_substream *substream)
|
||||
{
|
||||
snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN);
|
||||
#ifdef CONFIG_SND_DEBUG
|
||||
#ifdef CONFIG_SND_PCM_XRUN_DEBUG
|
||||
if (substream->pstr->xrun_debug) {
|
||||
snd_printd(KERN_DEBUG "XRUN: pcmC%dD%d%c\n",
|
||||
substream->pcm->card->number,
|
||||
@@ -204,7 +204,7 @@ static inline int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *subs
|
||||
delta = hw_ptr_interrupt - new_hw_ptr;
|
||||
if (delta > 0) {
|
||||
if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) {
|
||||
#ifdef CONFIG_SND_DEBUG
|
||||
#ifdef CONFIG_SND_PCM_XRUN_DEBUG
|
||||
if (runtime->periods > 1 && substream->pstr->xrun_debug) {
|
||||
snd_printd(KERN_ERR "Unexpected hw_pointer value [1] (stream = %i, delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", substream->stream, (long) delta, runtime->buffer_size / 2);
|
||||
if (substream->pstr->xrun_debug > 1)
|
||||
@@ -249,7 +249,7 @@ int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream)
|
||||
delta = old_hw_ptr - new_hw_ptr;
|
||||
if (delta > 0) {
|
||||
if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) {
|
||||
#ifdef CONFIG_SND_DEBUG
|
||||
#ifdef CONFIG_SND_PCM_XRUN_DEBUG
|
||||
if (runtime->periods > 2 && substream->pstr->xrun_debug) {
|
||||
snd_printd(KERN_ERR "Unexpected hw_pointer value [2] (stream = %i, delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", substream->stream, (long) delta, runtime->buffer_size / 2);
|
||||
if (substream->pstr->xrun_debug > 1)
|
||||
|
||||
@@ -100,8 +100,10 @@ static void snd_pcm_lib_preallocate_dma_free(struct snd_pcm_substream *substream
|
||||
int snd_pcm_lib_preallocate_free(struct snd_pcm_substream *substream)
|
||||
{
|
||||
snd_pcm_lib_preallocate_dma_free(substream);
|
||||
#ifdef CONFIG_SND_VERBOSE_PROCFS
|
||||
snd_info_unregister(substream->proc_prealloc_entry);
|
||||
substream->proc_prealloc_entry = NULL;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -124,7 +126,7 @@ int snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *pcm)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_VERBOSE_PROCFS
|
||||
/*
|
||||
* read callback for prealloc proc file
|
||||
*
|
||||
@@ -203,9 +205,9 @@ static inline void preallocate_info_init(struct snd_pcm_substream *substream)
|
||||
substream->proc_prealloc_entry = entry;
|
||||
}
|
||||
|
||||
#else /* !CONFIG_PROC_FS */
|
||||
#else /* !CONFIG_SND_VERBOSE_PROCFS */
|
||||
#define preallocate_info_init(s)
|
||||
#endif
|
||||
#endif /* CONFIG_SND_VERBOSE_PROCFS */
|
||||
|
||||
/*
|
||||
* pre-allocate the buffer and create a proc file for the substream
|
||||
|
||||
+4
-10
@@ -675,10 +675,8 @@ static int __init alsa_card_dummy_init(void)
|
||||
continue;
|
||||
device = platform_device_register_simple(SND_DUMMY_DRIVER,
|
||||
i, NULL, 0);
|
||||
if (IS_ERR(device)) {
|
||||
err = PTR_ERR(device);
|
||||
goto errout;
|
||||
}
|
||||
if (IS_ERR(device))
|
||||
continue;
|
||||
devices[i] = device;
|
||||
cards++;
|
||||
}
|
||||
@@ -686,14 +684,10 @@ static int __init alsa_card_dummy_init(void)
|
||||
#ifdef MODULE
|
||||
printk(KERN_ERR "Dummy soundcard not found or device busy\n");
|
||||
#endif
|
||||
err = -ENODEV;
|
||||
goto errout;
|
||||
snd_dummy_unregister_all();
|
||||
return -ENODEV;
|
||||
}
|
||||
return 0;
|
||||
|
||||
errout:
|
||||
snd_dummy_unregister_all();
|
||||
return err;
|
||||
}
|
||||
|
||||
static void __exit alsa_card_dummy_exit(void)
|
||||
|
||||
@@ -251,10 +251,8 @@ static int __init alsa_card_mpu401_init(void)
|
||||
#endif
|
||||
device = platform_device_register_simple(SND_MPU401_DRIVER,
|
||||
i, NULL, 0);
|
||||
if (IS_ERR(device)) {
|
||||
err = PTR_ERR(device);
|
||||
goto errout;
|
||||
}
|
||||
if (IS_ERR(device))
|
||||
continue;
|
||||
platform_devices[i] = device;
|
||||
snd_mpu401_devices++;
|
||||
}
|
||||
@@ -266,14 +264,10 @@ static int __init alsa_card_mpu401_init(void)
|
||||
#ifdef MODULE
|
||||
printk(KERN_ERR "MPU-401 device not found or device busy\n");
|
||||
#endif
|
||||
err = -ENODEV;
|
||||
goto errout;
|
||||
snd_mpu401_unregister_all();
|
||||
return -ENODEV;
|
||||
}
|
||||
return 0;
|
||||
|
||||
errout:
|
||||
snd_mpu401_unregister_all();
|
||||
return err;
|
||||
}
|
||||
|
||||
static void __exit alsa_card_mpu401_exit(void)
|
||||
|
||||
@@ -996,10 +996,8 @@ static int __init alsa_card_serial_init(void)
|
||||
continue;
|
||||
device = platform_device_register_simple(SND_SERIAL_DRIVER,
|
||||
i, NULL, 0);
|
||||
if (IS_ERR(device)) {
|
||||
err = PTR_ERR(device);
|
||||
goto errout;
|
||||
}
|
||||
if (IS_ERR(device))
|
||||
continue;
|
||||
devices[i] = device;
|
||||
cards++;
|
||||
}
|
||||
@@ -1007,14 +1005,10 @@ static int __init alsa_card_serial_init(void)
|
||||
#ifdef MODULE
|
||||
printk(KERN_ERR "serial midi soundcard not found or device busy\n");
|
||||
#endif
|
||||
err = -ENODEV;
|
||||
goto errout;
|
||||
snd_serial_unregister_all();
|
||||
return -ENODEV;
|
||||
}
|
||||
return 0;
|
||||
|
||||
errout:
|
||||
snd_serial_unregister_all();
|
||||
return err;
|
||||
}
|
||||
|
||||
static void __exit alsa_card_serial_exit(void)
|
||||
|
||||
+4
-10
@@ -169,10 +169,8 @@ static int __init alsa_card_virmidi_init(void)
|
||||
continue;
|
||||
device = platform_device_register_simple(SND_VIRMIDI_DRIVER,
|
||||
i, NULL, 0);
|
||||
if (IS_ERR(device)) {
|
||||
err = PTR_ERR(device);
|
||||
goto errout;
|
||||
}
|
||||
if (IS_ERR(device))
|
||||
continue;
|
||||
devices[i] = device;
|
||||
cards++;
|
||||
}
|
||||
@@ -180,14 +178,10 @@ static int __init alsa_card_virmidi_init(void)
|
||||
#ifdef MODULE
|
||||
printk(KERN_ERR "Card-VirMIDI soundcard not found or device busy\n");
|
||||
#endif
|
||||
err = -ENODEV;
|
||||
goto errout;
|
||||
snd_virmidi_unregister_all();
|
||||
return -ENODEV;
|
||||
}
|
||||
return 0;
|
||||
|
||||
errout:
|
||||
snd_virmidi_unregister_all();
|
||||
return err;
|
||||
}
|
||||
|
||||
static void __exit alsa_card_virmidi_exit(void)
|
||||
|
||||
@@ -1179,20 +1179,17 @@ static int __init snd_card_miro_aci_detect(struct snd_card *card, struct snd_mir
|
||||
/* force ACI into a known state */
|
||||
for (i = 0; i < 3; i++)
|
||||
if (aci_cmd(miro, ACI_ERROR_OP, -1, -1) < 0) {
|
||||
snd_card_free(card);
|
||||
snd_printk(KERN_ERR "can't force aci into known state.\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
if ((miro->aci_vendor=aci_cmd(miro, ACI_READ_IDCODE, -1, -1)) < 0 ||
|
||||
(miro->aci_product=aci_cmd(miro, ACI_READ_IDCODE, -1, -1)) < 0) {
|
||||
snd_card_free(card);
|
||||
snd_printk(KERN_ERR "can't read aci id on 0x%lx.\n", miro->aci_port);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
if ((miro->aci_version=aci_cmd(miro, ACI_READ_VERSION, -1, -1)) < 0) {
|
||||
snd_card_free(card);
|
||||
snd_printk(KERN_ERR "can't read aci version on 0x%lx.\n",
|
||||
miro->aci_port);
|
||||
return -ENXIO;
|
||||
|
||||
+1
-2
@@ -39,7 +39,6 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <sound/driver.h>
|
||||
#include <sound/core.h>
|
||||
@@ -1052,7 +1051,7 @@ snd_ad1889_remove(struct pci_dev *pci)
|
||||
pci_set_drvdata(pci, NULL);
|
||||
}
|
||||
|
||||
static struct pci_device_id snd_ad1889_ids[] = {
|
||||
static struct pci_device_id snd_ad1889_ids[] __devinitdata = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_ANALOG_DEVICES, PCI_DEVICE_ID_AD1889JS) },
|
||||
{ 0, },
|
||||
};
|
||||
|
||||
@@ -279,7 +279,7 @@ struct snd_ali {
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct pci_device_id snd_ali_ids[] = {
|
||||
static struct pci_device_id snd_ali_ids[] __devinitdata = {
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5451), 0, 0, 0},
|
||||
{0, }
|
||||
};
|
||||
|
||||
+1
-1
@@ -146,7 +146,7 @@ struct snd_als300_substream_data {
|
||||
int block_counter_register;
|
||||
};
|
||||
|
||||
static struct pci_device_id snd_als300_ids[] = {
|
||||
static struct pci_device_id snd_als300_ids[] __devinitdata = {
|
||||
{ 0x4005, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300 },
|
||||
{ 0x4005, 0x0308, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300_PLUS },
|
||||
{ 0, }
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@ struct snd_card_als4000 {
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct pci_device_id snd_als4000_ids[] = {
|
||||
static struct pci_device_id snd_als4000_ids[] __devinitdata = {
|
||||
{ 0x4005, 0x4000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ALS4000 */
|
||||
{ 0, }
|
||||
};
|
||||
|
||||
+1
-1
@@ -284,7 +284,7 @@ struct atiixp {
|
||||
|
||||
/*
|
||||
*/
|
||||
static struct pci_device_id snd_atiixp_ids[] = {
|
||||
static struct pci_device_id snd_atiixp_ids[] __devinitdata = {
|
||||
{ 0x1002, 0x4341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */
|
||||
{ 0x1002, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB300 */
|
||||
{ 0x1002, 0x4370, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user