sound fixes for 5.18-rc3
This became an unexpectedly large pull request due to various regression fixes in the previous kernels. The majority of fixes are a series of patches to address the regression at probe errors in devres'ed drivers, while there are yet more fixes for the x86 SG allocations and for USB-audio buffer management. In addition, a few HD-audio quirks and other small fixes are found. -----BEGIN PGP SIGNATURE----- iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmJWp0oOHHRpd2FpQHN1 c2UuZGUACgkQLtJE4w1nLE8uUxAAozqgnJSXJPj/ADhgdkYEWEQQlz2nMomQFZmN QSvh+gHmPD5HATrwwGFcVpmmwXHiZdG3pzh+gJPseaNNastO6jiSuRAeEFuX/h/a Mw8mdvT1git7rHBliRUAIZnbIV7e1NKVOXdujTPF7FLt2OlcoALpCeygGh6zTTEp 0UmRUYrHhtZbXzkXszaq6SEhLjGG8Maa1AiaOo2ltl4O9fTfrFvGiOP3usxEY4xx aTAtF+fmY24UEmD6/44L3LuQ568cDf+XXDCgStOOCM9jlz3Q5ptTCcmv6pj5KaM3 zGG4gmjialzG+QS8qySvo4BU3sYWASwUklw/Yyyx8tFcnLG7q2nWjswQA9g8X19h MyZXwgh9iKKfF3XQRETcQupsOAFnzpUJj1ZQzxG2fwj/ohFdbKQ2Z/OO9f8eCvbo IEQrQwBgGS6eHetUDOCdC357XwzDlRFafx0W6o5cm+XdxcXzMIDcJZbyKoEwvzr3 tozNc8L9AUYdDqZ8dKiNMOrDy7OHGTN/VU+pV1xVBF7R7/5DKvbnF4s+mAg25uXF 1/V+z9zDciDBXSuiuSzsfz/MbHUPlMn+c8qKwHfUiw5sLX2AKXGwgmkhr3ly1ga0 /4YZfrQgTVFrzQITfMxxn8MGG5QOy42g4uKmTnEUeH2ucJ9uY5hE8FUDH3jOeC/V tJB+f4Y= =NERK -----END PGP SIGNATURE----- Merge tag 'sound-5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This became an unexpectedly large pull request due to various regression fixes in the previous kernels. The majority of fixes are a series of patches to address the regression at probe errors in devres'ed drivers, while there are yet more fixes for the x86 SG allocations and for USB-audio buffer management. In addition, a few HD-audio quirks and other small fixes are found" * tag 'sound-5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (52 commits) ALSA: usb-audio: Limit max buffer and period sizes per time ALSA: memalloc: Add fallback SG-buffer allocations for x86 ALSA: nm256: Don't call card private_free at probe error path ALSA: mtpav: Don't call card private_free at probe error path ALSA: rme9652: Fix the missing snd_card_free() call at probe error ALSA: hdspm: Fix the missing snd_card_free() call at probe error ALSA: hdsp: Fix the missing snd_card_free() call at probe error ALSA: oxygen: Fix the missing snd_card_free() call at probe error ALSA: lx6464es: Fix the missing snd_card_free() call at probe error ALSA: cmipci: Fix the missing snd_card_free() call at probe error ALSA: aw2: Fix the missing snd_card_free() call at probe error ALSA: als300: Fix the missing snd_card_free() call at probe error ALSA: lola: Fix the missing snd_card_free() call at probe error ALSA: bt87x: Fix the missing snd_card_free() call at probe error ALSA: sis7019: Fix the missing error handling ALSA: intel_hdmi: Fix the missing snd_card_free() call at probe error ALSA: via82xx: Fix the missing snd_card_free() call at probe error ALSA: sonicvibes: Fix the missing snd_card_free() call at probe error ALSA: rme96: Fix the missing snd_card_free() call at probe error ALSA: rme32: Fix the missing snd_card_free() call at probe error ...
This commit is contained in:
commit
b9b4c79e58
|
@ -284,6 +284,7 @@ int snd_card_disconnect(struct snd_card *card);
|
|||
void snd_card_disconnect_sync(struct snd_card *card);
|
||||
int snd_card_free(struct snd_card *card);
|
||||
int snd_card_free_when_closed(struct snd_card *card);
|
||||
int snd_card_free_on_error(struct device *dev, int ret);
|
||||
void snd_card_set_id(struct snd_card *card, const char *id);
|
||||
int snd_card_register(struct snd_card *card);
|
||||
int snd_card_info_init(void);
|
||||
|
|
|
@ -51,6 +51,11 @@ struct snd_dma_device {
|
|||
#define SNDRV_DMA_TYPE_DEV_SG SNDRV_DMA_TYPE_DEV /* no SG-buf support */
|
||||
#define SNDRV_DMA_TYPE_DEV_WC_SG SNDRV_DMA_TYPE_DEV_WC
|
||||
#endif
|
||||
/* fallback types, don't use those directly */
|
||||
#ifdef CONFIG_SND_DMA_SGBUF
|
||||
#define SNDRV_DMA_TYPE_DEV_SG_FALLBACK 10
|
||||
#define SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK 11
|
||||
#endif
|
||||
|
||||
/*
|
||||
* info for buffer allocation
|
||||
|
|
|
@ -209,6 +209,12 @@ static void __snd_card_release(struct device *dev, void *data)
|
|||
* snd_card_register(), the very first devres action to call snd_card_free()
|
||||
* is added automatically. In that way, the resource disconnection is assured
|
||||
* at first, then released in the expected order.
|
||||
*
|
||||
* If an error happens at the probe before snd_card_register() is called and
|
||||
* there have been other devres resources, you'd need to free the card manually
|
||||
* via snd_card_free() call in the error; otherwise it may lead to UAF due to
|
||||
* devres call orders. You can use snd_card_free_on_error() helper for
|
||||
* handling it more easily.
|
||||
*/
|
||||
int snd_devm_card_new(struct device *parent, int idx, const char *xid,
|
||||
struct module *module, size_t extra_size,
|
||||
|
@ -235,6 +241,28 @@ int snd_devm_card_new(struct device *parent, int idx, const char *xid,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(snd_devm_card_new);
|
||||
|
||||
/**
|
||||
* snd_card_free_on_error - a small helper for handling devm probe errors
|
||||
* @dev: the managed device object
|
||||
* @ret: the return code from the probe callback
|
||||
*
|
||||
* This function handles the explicit snd_card_free() call at the error from
|
||||
* the probe callback. It's just a small helper for simplifying the error
|
||||
* handling with the managed devices.
|
||||
*/
|
||||
int snd_card_free_on_error(struct device *dev, int ret)
|
||||
{
|
||||
struct snd_card *card;
|
||||
|
||||
if (!ret)
|
||||
return 0;
|
||||
card = devres_find(dev, __snd_card_release, NULL, NULL);
|
||||
if (card)
|
||||
snd_card_free(card);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_card_free_on_error);
|
||||
|
||||
static int snd_card_init(struct snd_card *card, struct device *parent,
|
||||
int idx, const char *xid, struct module *module,
|
||||
size_t extra_size)
|
||||
|
|
|
@ -499,6 +499,10 @@ static const struct snd_malloc_ops snd_dma_wc_ops = {
|
|||
};
|
||||
#endif /* CONFIG_X86 */
|
||||
|
||||
#ifdef CONFIG_SND_DMA_SGBUF
|
||||
static void *snd_dma_sg_fallback_alloc(struct snd_dma_buffer *dmab, size_t size);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Non-contiguous pages allocator
|
||||
*/
|
||||
|
@ -509,8 +513,18 @@ static void *snd_dma_noncontig_alloc(struct snd_dma_buffer *dmab, size_t size)
|
|||
|
||||
sgt = dma_alloc_noncontiguous(dmab->dev.dev, size, dmab->dev.dir,
|
||||
DEFAULT_GFP, 0);
|
||||
if (!sgt)
|
||||
if (!sgt) {
|
||||
#ifdef CONFIG_SND_DMA_SGBUF
|
||||
if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG)
|
||||
dmab->dev.type = SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK;
|
||||
else
|
||||
dmab->dev.type = SNDRV_DMA_TYPE_DEV_SG_FALLBACK;
|
||||
return snd_dma_sg_fallback_alloc(dmab, size);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
dmab->dev.need_sync = dma_need_sync(dmab->dev.dev,
|
||||
sg_dma_address(sgt->sgl));
|
||||
p = dma_vmap_noncontiguous(dmab->dev.dev, size, sgt);
|
||||
|
@ -633,6 +647,8 @@ static void *snd_dma_sg_wc_alloc(struct snd_dma_buffer *dmab, size_t size)
|
|||
|
||||
if (!p)
|
||||
return NULL;
|
||||
if (dmab->dev.type != SNDRV_DMA_TYPE_DEV_WC_SG)
|
||||
return p;
|
||||
for_each_sgtable_page(sgt, &iter, 0)
|
||||
set_memory_wc(sg_wc_address(&iter), 1);
|
||||
return p;
|
||||
|
@ -665,6 +681,95 @@ static const struct snd_malloc_ops snd_dma_sg_wc_ops = {
|
|||
.get_page = snd_dma_noncontig_get_page,
|
||||
.get_chunk_size = snd_dma_noncontig_get_chunk_size,
|
||||
};
|
||||
|
||||
/* Fallback SG-buffer allocations for x86 */
|
||||
struct snd_dma_sg_fallback {
|
||||
size_t count;
|
||||
struct page **pages;
|
||||
dma_addr_t *addrs;
|
||||
};
|
||||
|
||||
static void __snd_dma_sg_fallback_free(struct snd_dma_buffer *dmab,
|
||||
struct snd_dma_sg_fallback *sgbuf)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (sgbuf->count && dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK)
|
||||
set_pages_array_wb(sgbuf->pages, sgbuf->count);
|
||||
for (i = 0; i < sgbuf->count && sgbuf->pages[i]; i++)
|
||||
dma_free_coherent(dmab->dev.dev, PAGE_SIZE,
|
||||
page_address(sgbuf->pages[i]),
|
||||
sgbuf->addrs[i]);
|
||||
kvfree(sgbuf->pages);
|
||||
kvfree(sgbuf->addrs);
|
||||
kfree(sgbuf);
|
||||
}
|
||||
|
||||
static void *snd_dma_sg_fallback_alloc(struct snd_dma_buffer *dmab, size_t size)
|
||||
{
|
||||
struct snd_dma_sg_fallback *sgbuf;
|
||||
struct page **pages;
|
||||
size_t i, count;
|
||||
void *p;
|
||||
|
||||
sgbuf = kzalloc(sizeof(*sgbuf), GFP_KERNEL);
|
||||
if (!sgbuf)
|
||||
return NULL;
|
||||
count = PAGE_ALIGN(size) >> PAGE_SHIFT;
|
||||
pages = kvcalloc(count, sizeof(*pages), GFP_KERNEL);
|
||||
if (!pages)
|
||||
goto error;
|
||||
sgbuf->pages = pages;
|
||||
sgbuf->addrs = kvcalloc(count, sizeof(*sgbuf->addrs), GFP_KERNEL);
|
||||
if (!sgbuf->addrs)
|
||||
goto error;
|
||||
|
||||
for (i = 0; i < count; sgbuf->count++, i++) {
|
||||
p = dma_alloc_coherent(dmab->dev.dev, PAGE_SIZE,
|
||||
&sgbuf->addrs[i], DEFAULT_GFP);
|
||||
if (!p)
|
||||
goto error;
|
||||
sgbuf->pages[i] = virt_to_page(p);
|
||||
}
|
||||
|
||||
if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK)
|
||||
set_pages_array_wc(pages, count);
|
||||
p = vmap(pages, count, VM_MAP, PAGE_KERNEL);
|
||||
if (!p)
|
||||
goto error;
|
||||
dmab->private_data = sgbuf;
|
||||
return p;
|
||||
|
||||
error:
|
||||
__snd_dma_sg_fallback_free(dmab, sgbuf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void snd_dma_sg_fallback_free(struct snd_dma_buffer *dmab)
|
||||
{
|
||||
vunmap(dmab->area);
|
||||
__snd_dma_sg_fallback_free(dmab, dmab->private_data);
|
||||
}
|
||||
|
||||
static int snd_dma_sg_fallback_mmap(struct snd_dma_buffer *dmab,
|
||||
struct vm_area_struct *area)
|
||||
{
|
||||
struct snd_dma_sg_fallback *sgbuf = dmab->private_data;
|
||||
|
||||
if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK)
|
||||
area->vm_page_prot = pgprot_writecombine(area->vm_page_prot);
|
||||
return vm_map_pages(area, sgbuf->pages, sgbuf->count);
|
||||
}
|
||||
|
||||
static const struct snd_malloc_ops snd_dma_sg_fallback_ops = {
|
||||
.alloc = snd_dma_sg_fallback_alloc,
|
||||
.free = snd_dma_sg_fallback_free,
|
||||
.mmap = snd_dma_sg_fallback_mmap,
|
||||
/* reuse vmalloc helpers */
|
||||
.get_addr = snd_dma_vmalloc_get_addr,
|
||||
.get_page = snd_dma_vmalloc_get_page,
|
||||
.get_chunk_size = snd_dma_vmalloc_get_chunk_size,
|
||||
};
|
||||
#endif /* CONFIG_SND_DMA_SGBUF */
|
||||
|
||||
/*
|
||||
|
@ -736,6 +841,10 @@ static const struct snd_malloc_ops *dma_ops[] = {
|
|||
#ifdef CONFIG_GENERIC_ALLOCATOR
|
||||
[SNDRV_DMA_TYPE_DEV_IRAM] = &snd_dma_iram_ops,
|
||||
#endif /* CONFIG_GENERIC_ALLOCATOR */
|
||||
#ifdef CONFIG_SND_DMA_SGBUF
|
||||
[SNDRV_DMA_TYPE_DEV_SG_FALLBACK] = &snd_dma_sg_fallback_ops,
|
||||
[SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK] = &snd_dma_sg_fallback_ops,
|
||||
#endif
|
||||
#endif /* CONFIG_HAS_DMA */
|
||||
};
|
||||
|
||||
|
|
|
@ -433,7 +433,7 @@ int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int
|
|||
return 0;
|
||||
width = pcm_formats[(INT)format].phys; /* physical width */
|
||||
pat = pcm_formats[(INT)format].silence;
|
||||
if (! width)
|
||||
if (!width || !pat)
|
||||
return -EINVAL;
|
||||
/* signed or 1 byte data */
|
||||
if (pcm_formats[(INT)format].signd == 1 || width <= 8) {
|
||||
|
|
|
@ -693,8 +693,6 @@ static int snd_mtpav_probe(struct platform_device *dev)
|
|||
mtp_card->outmidihwport = 0xffffffff;
|
||||
timer_setup(&mtp_card->timer, snd_mtpav_output_timer, 0);
|
||||
|
||||
card->private_free = snd_mtpav_free;
|
||||
|
||||
err = snd_mtpav_get_RAWMIDI(mtp_card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
@ -716,6 +714,8 @@ static int snd_mtpav_probe(struct platform_device *dev)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
card->private_free = snd_mtpav_free;
|
||||
|
||||
platform_set_drvdata(dev, card);
|
||||
printk(KERN_INFO "Motu MidiTimePiece on parallel port irq: %d ioport: 0x%lx\n", irq, port);
|
||||
return 0;
|
||||
|
|
|
@ -116,16 +116,25 @@ static int i915_component_master_match(struct device *dev, int subcomponent,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* check whether intel graphics is present */
|
||||
static bool i915_gfx_present(void)
|
||||
/* check whether Intel graphics is present and reachable */
|
||||
static int i915_gfx_present(struct pci_dev *hdac_pci)
|
||||
{
|
||||
static const struct pci_device_id ids[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_ANY_ID),
|
||||
.class = PCI_BASE_CLASS_DISPLAY << 16,
|
||||
.class_mask = 0xff << 16 },
|
||||
{}
|
||||
};
|
||||
return pci_dev_present(ids);
|
||||
unsigned int class = PCI_BASE_CLASS_DISPLAY << 16;
|
||||
struct pci_dev *display_dev = NULL;
|
||||
bool match = false;
|
||||
|
||||
do {
|
||||
display_dev = pci_get_class(class, display_dev);
|
||||
|
||||
if (display_dev && display_dev->vendor == PCI_VENDOR_ID_INTEL &&
|
||||
connectivity_check(display_dev, hdac_pci))
|
||||
match = true;
|
||||
|
||||
pci_dev_put(display_dev);
|
||||
|
||||
} while (!match && display_dev);
|
||||
|
||||
return match;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -145,7 +154,7 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
|
|||
struct drm_audio_component *acomp;
|
||||
int err;
|
||||
|
||||
if (!i915_gfx_present())
|
||||
if (!i915_gfx_present(to_pci_dev(bus->dev)))
|
||||
return -ENODEV;
|
||||
|
||||
err = snd_hdac_acomp_init(bus, NULL,
|
||||
|
|
|
@ -390,22 +390,36 @@ static const struct config_entry config_table[] = {
|
|||
|
||||
/* Alder Lake */
|
||||
#if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE)
|
||||
/* Alderlake-S */
|
||||
{
|
||||
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
||||
.device = 0x7ad0,
|
||||
},
|
||||
/* RaptorLake-S */
|
||||
{
|
||||
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
||||
.device = 0x7a50,
|
||||
},
|
||||
/* Alderlake-P */
|
||||
{
|
||||
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
||||
.device = 0x51c8,
|
||||
},
|
||||
{
|
||||
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
||||
.device = 0x51cc,
|
||||
},
|
||||
{
|
||||
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
||||
.device = 0x51cd,
|
||||
},
|
||||
/* Alderlake-PS */
|
||||
{
|
||||
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
||||
.device = 0x51c9,
|
||||
},
|
||||
/* Alderlake-M */
|
||||
{
|
||||
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
||||
.device = 0x51cc,
|
||||
},
|
||||
/* Alderlake-N */
|
||||
{
|
||||
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
||||
.device = 0x54c8,
|
||||
|
|
|
@ -478,7 +478,7 @@ static void snd_galaxy_free(struct snd_card *card)
|
|||
galaxy_set_config(galaxy, galaxy->config);
|
||||
}
|
||||
|
||||
static int snd_galaxy_probe(struct device *dev, unsigned int n)
|
||||
static int __snd_galaxy_probe(struct device *dev, unsigned int n)
|
||||
{
|
||||
struct snd_galaxy *galaxy;
|
||||
struct snd_wss *chip;
|
||||
|
@ -598,6 +598,11 @@ static int snd_galaxy_probe(struct device *dev, unsigned int n)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_galaxy_probe(struct device *dev, unsigned int n)
|
||||
{
|
||||
return snd_card_free_on_error(dev, __snd_galaxy_probe(dev, n));
|
||||
}
|
||||
|
||||
static struct isa_driver snd_galaxy_driver = {
|
||||
.match = snd_galaxy_match,
|
||||
.probe = snd_galaxy_probe,
|
||||
|
|
|
@ -537,7 +537,7 @@ static void snd_sc6000_free(struct snd_card *card)
|
|||
sc6000_setup_board(vport, 0);
|
||||
}
|
||||
|
||||
static int snd_sc6000_probe(struct device *devptr, unsigned int dev)
|
||||
static int __snd_sc6000_probe(struct device *devptr, unsigned int dev)
|
||||
{
|
||||
static const int possible_irqs[] = { 5, 7, 9, 10, 11, -1 };
|
||||
static const int possible_dmas[] = { 1, 3, 0, -1 };
|
||||
|
@ -662,6 +662,11 @@ static int snd_sc6000_probe(struct device *devptr, unsigned int dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_sc6000_probe(struct device *devptr, unsigned int dev)
|
||||
{
|
||||
return snd_card_free_on_error(devptr, __snd_sc6000_probe(devptr, dev));
|
||||
}
|
||||
|
||||
static struct isa_driver snd_sc6000_driver = {
|
||||
.match = snd_sc6000_match,
|
||||
.probe = snd_sc6000_probe,
|
||||
|
|
|
@ -88,11 +88,7 @@ static inline int ioctl_return(int __user *addr, int value)
|
|||
*/
|
||||
|
||||
extern int dmasound_init(void);
|
||||
#ifdef MODULE
|
||||
extern void dmasound_deinit(void);
|
||||
#else
|
||||
#define dmasound_deinit() do { } while (0)
|
||||
#endif
|
||||
|
||||
/* description of the set-up applies to either hard or soft settings */
|
||||
|
||||
|
@ -114,9 +110,7 @@ typedef struct {
|
|||
void *(*dma_alloc)(unsigned int, gfp_t);
|
||||
void (*dma_free)(void *, unsigned int);
|
||||
int (*irqinit)(void);
|
||||
#ifdef MODULE
|
||||
void (*irqcleanup)(void);
|
||||
#endif
|
||||
void (*init)(void);
|
||||
void (*silence)(void);
|
||||
int (*setFormat)(int);
|
||||
|
|
|
@ -206,12 +206,10 @@ module_param(writeBufSize, int, 0);
|
|||
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
#ifdef MODULE
|
||||
static int sq_unit = -1;
|
||||
static int mixer_unit = -1;
|
||||
static int state_unit = -1;
|
||||
static int irq_installed;
|
||||
#endif /* MODULE */
|
||||
|
||||
/* control over who can modify resources shared between play/record */
|
||||
static fmode_t shared_resource_owner;
|
||||
|
@ -391,9 +389,6 @@ static const struct file_operations mixer_fops =
|
|||
|
||||
static void mixer_init(void)
|
||||
{
|
||||
#ifndef MODULE
|
||||
int mixer_unit;
|
||||
#endif
|
||||
mixer_unit = register_sound_mixer(&mixer_fops, -1);
|
||||
if (mixer_unit < 0)
|
||||
return;
|
||||
|
@ -1171,9 +1166,6 @@ static const struct file_operations sq_fops =
|
|||
static int sq_init(void)
|
||||
{
|
||||
const struct file_operations *fops = &sq_fops;
|
||||
#ifndef MODULE
|
||||
int sq_unit;
|
||||
#endif
|
||||
|
||||
sq_unit = register_sound_dsp(fops, -1);
|
||||
if (sq_unit < 0) {
|
||||
|
@ -1366,9 +1358,6 @@ static const struct file_operations state_fops = {
|
|||
|
||||
static int state_init(void)
|
||||
{
|
||||
#ifndef MODULE
|
||||
int state_unit;
|
||||
#endif
|
||||
state_unit = register_sound_special(&state_fops, SND_DEV_STATUS);
|
||||
if (state_unit < 0)
|
||||
return state_unit ;
|
||||
|
@ -1386,10 +1375,9 @@ static int state_init(void)
|
|||
int dmasound_init(void)
|
||||
{
|
||||
int res ;
|
||||
#ifdef MODULE
|
||||
|
||||
if (irq_installed)
|
||||
return -EBUSY;
|
||||
#endif
|
||||
|
||||
/* Set up sound queue, /dev/audio and /dev/dsp. */
|
||||
|
||||
|
@ -1408,9 +1396,7 @@ int dmasound_init(void)
|
|||
printk(KERN_ERR "DMA sound driver: Interrupt initialization failed\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
#ifdef MODULE
|
||||
irq_installed = 1;
|
||||
#endif
|
||||
|
||||
printk(KERN_INFO "%s DMA sound driver rev %03d installed\n",
|
||||
dmasound.mach.name, (DMASOUND_CORE_REVISION<<4) +
|
||||
|
@ -1424,8 +1410,6 @@ int dmasound_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
void dmasound_deinit(void)
|
||||
{
|
||||
if (irq_installed) {
|
||||
|
@ -1444,8 +1428,6 @@ void dmasound_deinit(void)
|
|||
unregister_sound_dsp(sq_unit);
|
||||
}
|
||||
|
||||
#else /* !MODULE */
|
||||
|
||||
static int dmasound_setup(char *str)
|
||||
{
|
||||
int ints[6], size;
|
||||
|
@ -1489,8 +1471,6 @@ static int dmasound_setup(char *str)
|
|||
|
||||
__setup("dmasound=", dmasound_setup);
|
||||
|
||||
#endif /* !MODULE */
|
||||
|
||||
/*
|
||||
* Conversion tables
|
||||
*/
|
||||
|
@ -1577,9 +1557,7 @@ char dmasound_alaw2dma8[] = {
|
|||
|
||||
EXPORT_SYMBOL(dmasound);
|
||||
EXPORT_SYMBOL(dmasound_init);
|
||||
#ifdef MODULE
|
||||
EXPORT_SYMBOL(dmasound_deinit);
|
||||
#endif
|
||||
EXPORT_SYMBOL(dmasound_write_sq);
|
||||
EXPORT_SYMBOL(dmasound_catchRadius);
|
||||
#ifdef HAS_8BIT_TABLES
|
||||
|
|
|
@ -844,8 +844,8 @@ snd_ad1889_create(struct snd_card *card, struct pci_dev *pci)
|
|||
}
|
||||
|
||||
static int
|
||||
snd_ad1889_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
__snd_ad1889_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
int err;
|
||||
static int devno;
|
||||
|
@ -904,6 +904,12 @@ snd_ad1889_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ad1889_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_ad1889_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static const struct pci_device_id snd_ad1889_ids[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_ANALOG_DEVICES, PCI_DEVICE_ID_AD1889JS) },
|
||||
{ 0, },
|
||||
|
|
|
@ -2124,8 +2124,8 @@ static int snd_ali_create(struct snd_card *card,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ali_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_ali_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
struct snd_card *card;
|
||||
struct snd_ali *codec;
|
||||
|
@ -2170,6 +2170,12 @@ static int snd_ali_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ali_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_ali_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver ali5451_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_ali_ids,
|
||||
|
|
|
@ -708,7 +708,7 @@ static int snd_als300_probe(struct pci_dev *pci,
|
|||
|
||||
err = snd_als300_create(card, pci, chip_type);
|
||||
if (err < 0)
|
||||
return err;
|
||||
goto error;
|
||||
|
||||
strcpy(card->driver, "ALS300");
|
||||
if (chip->chip_type == DEVICE_ALS300_PLUS)
|
||||
|
@ -723,11 +723,15 @@ static int snd_als300_probe(struct pci_dev *pci,
|
|||
|
||||
err = snd_card_register(card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
goto error;
|
||||
|
||||
pci_set_drvdata(pci, card);
|
||||
dev++;
|
||||
return 0;
|
||||
|
||||
error:
|
||||
snd_card_free(card);
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct pci_driver als300_driver = {
|
||||
|
|
|
@ -806,8 +806,8 @@ static void snd_card_als4000_free( struct snd_card *card )
|
|||
snd_als4000_free_gameport(acard);
|
||||
}
|
||||
|
||||
static int snd_card_als4000_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_card_als4000_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -930,6 +930,12 @@ static int snd_card_als4000_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_card_als4000_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_card_als4000_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int snd_als4000_suspend(struct device *dev)
|
||||
{
|
||||
|
|
|
@ -1572,8 +1572,8 @@ static int snd_atiixp_init(struct snd_card *card, struct pci_dev *pci)
|
|||
}
|
||||
|
||||
|
||||
static int snd_atiixp_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_atiixp_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
struct snd_card *card;
|
||||
struct atiixp *chip;
|
||||
|
@ -1623,6 +1623,12 @@ static int snd_atiixp_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_atiixp_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_atiixp_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver atiixp_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_atiixp_ids,
|
||||
|
|
|
@ -1201,8 +1201,8 @@ static int snd_atiixp_init(struct snd_card *card, struct pci_dev *pci)
|
|||
}
|
||||
|
||||
|
||||
static int snd_atiixp_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_atiixp_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
struct snd_card *card;
|
||||
struct atiixp_modem *chip;
|
||||
|
@ -1247,6 +1247,12 @@ static int snd_atiixp_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_atiixp_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_atiixp_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver atiixp_modem_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_atiixp_ids,
|
||||
|
|
|
@ -193,7 +193,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci)
|
|||
|
||||
// constructor -- see "Constructor" sub-section
|
||||
static int
|
||||
snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
__snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -310,6 +310,12 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_vortex_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
// pci_driver definition
|
||||
static struct pci_driver vortex_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
|
|
|
@ -275,7 +275,7 @@ static int snd_aw2_probe(struct pci_dev *pci,
|
|||
/* (3) Create main component */
|
||||
err = snd_aw2_create(card, pci);
|
||||
if (err < 0)
|
||||
return err;
|
||||
goto error;
|
||||
|
||||
/* initialize mutex */
|
||||
mutex_init(&chip->mtx);
|
||||
|
@ -294,13 +294,17 @@ static int snd_aw2_probe(struct pci_dev *pci,
|
|||
/* (6) Register card instance */
|
||||
err = snd_card_register(card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
goto error;
|
||||
|
||||
/* (7) Set PCI driver data */
|
||||
pci_set_drvdata(pci, card);
|
||||
|
||||
dev++;
|
||||
return 0;
|
||||
|
||||
error:
|
||||
snd_card_free(card);
|
||||
return err;
|
||||
}
|
||||
|
||||
/* open callback */
|
||||
|
|
|
@ -2427,7 +2427,7 @@ snd_azf3328_create(struct snd_card *card,
|
|||
}
|
||||
|
||||
static int
|
||||
snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
__snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -2520,6 +2520,12 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_azf3328_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static inline void
|
||||
snd_azf3328_suspend_regs(const struct snd_azf3328 *chip,
|
||||
|
|
|
@ -805,8 +805,8 @@ static int snd_bt87x_detect_card(struct pci_dev *pci)
|
|||
return SND_BT87X_BOARD_UNKNOWN;
|
||||
}
|
||||
|
||||
static int snd_bt87x_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_bt87x_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -889,6 +889,12 @@ static int snd_bt87x_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_bt87x_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_bt87x_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
/* default entries for all Bt87x cards - it's not exported */
|
||||
/* driver_data is set to 0 to call detection */
|
||||
static const struct pci_device_id snd_bt87x_default_ids[] = {
|
||||
|
|
|
@ -1725,8 +1725,8 @@ static int snd_ca0106_midi(struct snd_ca0106 *chip, unsigned int channel)
|
|||
}
|
||||
|
||||
|
||||
static int snd_ca0106_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_ca0106_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -1786,6 +1786,12 @@ static int snd_ca0106_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_ca0106_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_ca0106_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int snd_ca0106_suspend(struct device *dev)
|
||||
{
|
||||
|
|
|
@ -3247,15 +3247,19 @@ static int snd_cmipci_probe(struct pci_dev *pci,
|
|||
|
||||
err = snd_cmipci_create(card, pci, dev);
|
||||
if (err < 0)
|
||||
return err;
|
||||
goto error;
|
||||
|
||||
err = snd_card_register(card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
goto error;
|
||||
|
||||
pci_set_drvdata(pci, card);
|
||||
dev++;
|
||||
return 0;
|
||||
|
||||
error:
|
||||
snd_card_free(card);
|
||||
return err;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
|
|
|
@ -1827,8 +1827,8 @@ static void snd_cs4281_opl3_command(struct snd_opl3 *opl3, unsigned short cmd,
|
|||
spin_unlock_irqrestore(&opl3->reg_lock, flags);
|
||||
}
|
||||
|
||||
static int snd_cs4281_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_cs4281_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -1888,6 +1888,12 @@ static int snd_cs4281_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_cs4281_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_cs4281_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
/*
|
||||
* Power Management
|
||||
*/
|
||||
|
|
|
@ -281,8 +281,8 @@ static int snd_cs5535audio_create(struct snd_card *card,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_cs5535audio_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_cs5535audio_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -331,6 +331,12 @@ static int snd_cs5535audio_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_cs5535audio_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_cs5535audio_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver cs5535audio_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_cs5535audio_ids,
|
||||
|
|
|
@ -1970,8 +1970,8 @@ static int snd_echo_create(struct snd_card *card,
|
|||
}
|
||||
|
||||
/* constructor */
|
||||
static int snd_echo_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_echo_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -2139,6 +2139,11 @@ static int snd_echo_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_echo_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_echo_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
|
||||
#if defined(CONFIG_PM_SLEEP)
|
||||
|
|
|
@ -1491,8 +1491,8 @@ static int snd_emu10k1x_midi(struct emu10k1x *emu)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_emu10k1x_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_emu10k1x_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -1554,6 +1554,12 @@ static int snd_emu10k1x_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_emu10k1x_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_emu10k1x_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
// PCI IDs
|
||||
static const struct pci_device_id snd_emu10k1x_ids[] = {
|
||||
{ PCI_VDEVICE(CREATIVE, 0x0006), 0 }, /* Dell OEM version (EMU10K1) */
|
||||
|
|
|
@ -2304,8 +2304,8 @@ static irqreturn_t snd_audiopci_interrupt(int irq, void *dev_id)
|
|||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int snd_audiopci_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_audiopci_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -2369,6 +2369,12 @@ static int snd_audiopci_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_audiopci_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_audiopci_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver ens137x_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_audiopci_ids,
|
||||
|
|
|
@ -1716,8 +1716,8 @@ static int snd_es1938_mixer(struct es1938 *chip)
|
|||
}
|
||||
|
||||
|
||||
static int snd_es1938_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_es1938_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -1796,6 +1796,12 @@ static int snd_es1938_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_es1938_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_es1938_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver es1938_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_es1938_ids,
|
||||
|
|
|
@ -2741,8 +2741,8 @@ static int snd_es1968_create(struct snd_card *card,
|
|||
|
||||
/*
|
||||
*/
|
||||
static int snd_es1968_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_es1968_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -2848,6 +2848,12 @@ static int snd_es1968_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_es1968_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_es1968_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver es1968_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_es1968_ids,
|
||||
|
|
|
@ -1268,8 +1268,8 @@ static int snd_fm801_create(struct snd_card *card,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_card_fm801_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_card_fm801_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -1333,6 +1333,12 @@ static int snd_card_fm801_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_card_fm801_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_card_fm801_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static const unsigned char saved_regs[] = {
|
||||
FM801_PCM_VOL, FM801_I2S_VOL, FM801_FM_VOL, FM801_REC_SRC,
|
||||
|
|
|
@ -2619,6 +2619,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
|||
SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
|
@ -9264,6 +9265,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
|||
SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
|
||||
SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
|
||||
SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
|
||||
SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
|
||||
SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
|
||||
SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
|
||||
|
|
|
@ -2519,8 +2519,8 @@ static int snd_vt1724_create(struct snd_card *card,
|
|||
*
|
||||
*/
|
||||
|
||||
static int snd_vt1724_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_vt1724_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -2662,6 +2662,12 @@ static int snd_vt1724_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_vt1724_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_vt1724_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int snd_vt1724_suspend(struct device *dev)
|
||||
{
|
||||
|
|
|
@ -3109,8 +3109,8 @@ static int check_default_spdif_aclink(struct pci_dev *pci)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_intel8x0_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_intel8x0_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
struct snd_card *card;
|
||||
struct intel8x0 *chip;
|
||||
|
@ -3189,6 +3189,12 @@ static int snd_intel8x0_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_intel8x0_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_intel8x0_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver intel8x0_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_intel8x0_ids,
|
||||
|
|
|
@ -1178,8 +1178,8 @@ static struct shortname_table {
|
|||
{ 0 },
|
||||
};
|
||||
|
||||
static int snd_intel8x0m_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_intel8x0m_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
struct snd_card *card;
|
||||
struct intel8x0m *chip;
|
||||
|
@ -1225,6 +1225,12 @@ static int snd_intel8x0m_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_intel8x0m_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_intel8x0m_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver intel8x0m_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_intel8x0m_ids,
|
||||
|
|
|
@ -2355,7 +2355,7 @@ snd_korg1212_probe(struct pci_dev *pci,
|
|||
|
||||
err = snd_korg1212_create(card, pci);
|
||||
if (err < 0)
|
||||
return err;
|
||||
goto error;
|
||||
|
||||
strcpy(card->driver, "korg1212");
|
||||
strcpy(card->shortname, "korg1212");
|
||||
|
@ -2366,10 +2366,14 @@ snd_korg1212_probe(struct pci_dev *pci,
|
|||
|
||||
err = snd_card_register(card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
goto error;
|
||||
pci_set_drvdata(pci, card);
|
||||
dev++;
|
||||
return 0;
|
||||
|
||||
error:
|
||||
snd_card_free(card);
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct pci_driver korg1212_driver = {
|
||||
|
|
|
@ -637,8 +637,8 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci, int dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lola_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __lola_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -687,6 +687,12 @@ static int lola_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lola_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __lola_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
/* PCI IDs */
|
||||
static const struct pci_device_id lola_ids[] = {
|
||||
{ PCI_VDEVICE(DIGIGRAM, 0x0001) },
|
||||
|
|
|
@ -1019,7 +1019,7 @@ static int snd_lx6464es_probe(struct pci_dev *pci,
|
|||
err = snd_lx6464es_create(card, pci);
|
||||
if (err < 0) {
|
||||
dev_err(card->dev, "error during snd_lx6464es_create\n");
|
||||
return err;
|
||||
goto error;
|
||||
}
|
||||
|
||||
strcpy(card->driver, "LX6464ES");
|
||||
|
@ -1036,12 +1036,16 @@ static int snd_lx6464es_probe(struct pci_dev *pci,
|
|||
|
||||
err = snd_card_register(card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
goto error;
|
||||
|
||||
dev_dbg(chip->card->dev, "initialization successful\n");
|
||||
pci_set_drvdata(pci, card);
|
||||
dev++;
|
||||
return 0;
|
||||
|
||||
error:
|
||||
snd_card_free(card);
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct pci_driver lx6464es_driver = {
|
||||
|
|
|
@ -2637,7 +2637,7 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
|
|||
/*
|
||||
*/
|
||||
static int
|
||||
snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
__snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -2702,6 +2702,12 @@ snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_m3_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver m3_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_m3_ids,
|
||||
|
|
|
@ -1573,7 +1573,6 @@ snd_nm256_create(struct snd_card *card, struct pci_dev *pci)
|
|||
chip->coeffs_current = 0;
|
||||
|
||||
snd_nm256_init_chip(chip);
|
||||
card->private_free = snd_nm256_free;
|
||||
|
||||
// pci_set_master(pci); /* needed? */
|
||||
return 0;
|
||||
|
@ -1680,6 +1679,7 @@ static int snd_nm256_probe(struct pci_dev *pci,
|
|||
err = snd_card_register(card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
card->private_free = snd_nm256_free;
|
||||
|
||||
pci_set_drvdata(pci, card);
|
||||
return 0;
|
||||
|
|
|
@ -576,7 +576,7 @@ static void oxygen_card_free(struct snd_card *card)
|
|||
mutex_destroy(&chip->mutex);
|
||||
}
|
||||
|
||||
int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
|
||||
static int __oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
|
||||
struct module *owner,
|
||||
const struct pci_device_id *ids,
|
||||
int (*get_model)(struct oxygen *chip,
|
||||
|
@ -701,6 +701,16 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
|
|||
pci_set_drvdata(pci, card);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
|
||||
struct module *owner,
|
||||
const struct pci_device_id *ids,
|
||||
int (*get_model)(struct oxygen *chip,
|
||||
const struct pci_device_id *id))
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev,
|
||||
__oxygen_pci_probe(pci, index, id, owner, ids, get_model));
|
||||
}
|
||||
EXPORT_SYMBOL(oxygen_pci_probe);
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
|
|
|
@ -2023,7 +2023,7 @@ static void snd_riptide_joystick_remove(struct pci_dev *pci)
|
|||
#endif
|
||||
|
||||
static int
|
||||
snd_card_riptide_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
__snd_card_riptide_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -2124,6 +2124,12 @@ snd_card_riptide_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
snd_card_riptide_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_card_riptide_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_riptide_ids,
|
||||
|
|
|
@ -1875,7 +1875,7 @@ static void snd_rme32_card_free(struct snd_card *card)
|
|||
}
|
||||
|
||||
static int
|
||||
snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
__snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct rme32 *rme32;
|
||||
|
@ -1927,6 +1927,12 @@ snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_rme32_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver rme32_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_rme32_ids,
|
||||
|
|
|
@ -2430,8 +2430,8 @@ static void snd_rme96_card_free(struct snd_card *card)
|
|||
}
|
||||
|
||||
static int
|
||||
snd_rme96_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
__snd_rme96_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct rme96 *rme96;
|
||||
|
@ -2498,6 +2498,12 @@ snd_rme96_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_rme96_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_rme96_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver rme96_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_rme96_ids,
|
||||
|
|
|
@ -5444,17 +5444,21 @@ static int snd_hdsp_probe(struct pci_dev *pci,
|
|||
hdsp->pci = pci;
|
||||
err = snd_hdsp_create(card, hdsp);
|
||||
if (err)
|
||||
return err;
|
||||
goto error;
|
||||
|
||||
strcpy(card->shortname, "Hammerfall DSP");
|
||||
sprintf(card->longname, "%s at 0x%lx, irq %d", hdsp->card_name,
|
||||
hdsp->port, hdsp->irq);
|
||||
err = snd_card_register(card);
|
||||
if (err)
|
||||
return err;
|
||||
goto error;
|
||||
pci_set_drvdata(pci, card);
|
||||
dev++;
|
||||
return 0;
|
||||
|
||||
error:
|
||||
snd_card_free(card);
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct pci_driver hdsp_driver = {
|
||||
|
|
|
@ -6895,7 +6895,7 @@ static int snd_hdspm_probe(struct pci_dev *pci,
|
|||
|
||||
err = snd_hdspm_create(card, hdspm);
|
||||
if (err < 0)
|
||||
return err;
|
||||
goto error;
|
||||
|
||||
if (hdspm->io_type != MADIface) {
|
||||
snprintf(card->shortname, sizeof(card->shortname), "%s_%x",
|
||||
|
@ -6914,12 +6914,16 @@ static int snd_hdspm_probe(struct pci_dev *pci,
|
|||
|
||||
err = snd_card_register(card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
goto error;
|
||||
|
||||
pci_set_drvdata(pci, card);
|
||||
|
||||
dev++;
|
||||
return 0;
|
||||
|
||||
error:
|
||||
snd_card_free(card);
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct pci_driver hdspm_driver = {
|
||||
|
|
|
@ -2572,7 +2572,7 @@ static int snd_rme9652_probe(struct pci_dev *pci,
|
|||
rme9652->pci = pci;
|
||||
err = snd_rme9652_create(card, rme9652, precise_ptr[dev]);
|
||||
if (err)
|
||||
return err;
|
||||
goto error;
|
||||
|
||||
strcpy(card->shortname, rme9652->card_name);
|
||||
|
||||
|
@ -2580,10 +2580,14 @@ static int snd_rme9652_probe(struct pci_dev *pci,
|
|||
card->shortname, rme9652->port, rme9652->irq);
|
||||
err = snd_card_register(card);
|
||||
if (err)
|
||||
return err;
|
||||
goto error;
|
||||
pci_set_drvdata(pci, card);
|
||||
dev++;
|
||||
return 0;
|
||||
|
||||
error:
|
||||
snd_card_free(card);
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct pci_driver rme9652_driver = {
|
||||
|
|
|
@ -1331,8 +1331,8 @@ static int sis_chip_create(struct snd_card *card,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_sis7019_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_sis7019_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
struct snd_card *card;
|
||||
struct sis7019 *sis;
|
||||
|
@ -1352,8 +1352,8 @@ static int snd_sis7019_probe(struct pci_dev *pci,
|
|||
if (!codecs)
|
||||
codecs = SIS_PRIMARY_CODEC_PRESENT;
|
||||
|
||||
rc = snd_card_new(&pci->dev, index, id, THIS_MODULE,
|
||||
sizeof(*sis), &card);
|
||||
rc = snd_devm_card_new(&pci->dev, index, id, THIS_MODULE,
|
||||
sizeof(*sis), &card);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
|
@ -1386,6 +1386,12 @@ static int snd_sis7019_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_sis7019_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_sis7019_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver sis7019_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_sis7019_ids,
|
||||
|
|
|
@ -1387,8 +1387,8 @@ static int snd_sonicvibes_midi(struct sonicvibes *sonic,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_sonic_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_sonic_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card;
|
||||
|
@ -1459,6 +1459,12 @@ static int snd_sonic_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_sonic_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_sonic_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver sonicvibes_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_sonic_ids,
|
||||
|
|
|
@ -2458,8 +2458,8 @@ static int check_dxs_list(struct pci_dev *pci, int revision)
|
|||
return VIA_DXS_48K;
|
||||
};
|
||||
|
||||
static int snd_via82xx_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_via82xx_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
struct snd_card *card;
|
||||
struct via82xx *chip;
|
||||
|
@ -2569,6 +2569,12 @@ static int snd_via82xx_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_via82xx_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_via82xx_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver via82xx_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_via82xx_ids,
|
||||
|
|
|
@ -1103,8 +1103,8 @@ static int snd_via82xx_create(struct snd_card *card,
|
|||
}
|
||||
|
||||
|
||||
static int snd_via82xx_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int __snd_via82xx_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
struct snd_card *card;
|
||||
struct via82xx_modem *chip;
|
||||
|
@ -1157,6 +1157,12 @@ static int snd_via82xx_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_via82xx_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
return snd_card_free_on_error(&pci->dev, __snd_via82xx_probe(pci, pci_id));
|
||||
}
|
||||
|
||||
static struct pci_driver via82xx_modem_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = snd_via82xx_modem_ids,
|
||||
|
|
|
@ -669,9 +669,9 @@ static const struct snd_pcm_hardware snd_usb_hardware =
|
|||
SNDRV_PCM_INFO_PAUSE,
|
||||
.channels_min = 1,
|
||||
.channels_max = 256,
|
||||
.buffer_bytes_max = 1024 * 1024,
|
||||
.buffer_bytes_max = INT_MAX, /* limited by BUFFER_TIME later */
|
||||
.period_bytes_min = 64,
|
||||
.period_bytes_max = 512 * 1024,
|
||||
.period_bytes_max = INT_MAX, /* limited by PERIOD_TIME later */
|
||||
.periods_min = 2,
|
||||
.periods_max = 1024,
|
||||
};
|
||||
|
@ -1064,6 +1064,18 @@ static int setup_hw_info(struct snd_pcm_runtime *runtime, struct snd_usb_substre
|
|||
return err;
|
||||
}
|
||||
|
||||
/* set max period and buffer sizes for 1 and 2 seconds, respectively */
|
||||
err = snd_pcm_hw_constraint_minmax(runtime,
|
||||
SNDRV_PCM_HW_PARAM_PERIOD_TIME,
|
||||
0, 1000000);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_pcm_hw_constraint_minmax(runtime,
|
||||
SNDRV_PCM_HW_PARAM_BUFFER_TIME,
|
||||
0, 2000000);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
/* additional hw constraints for implicit fb */
|
||||
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT,
|
||||
hw_rule_format_implicit_fb, subs,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
/* handling of USB vendor/product ID pairs as 32-bit numbers */
|
||||
#define USB_ID(vendor, product) (((vendor) << 16) | (product))
|
||||
#define USB_ID(vendor, product) (((unsigned int)(vendor) << 16) | (product))
|
||||
#define USB_ID_VENDOR(id) ((id) >> 16)
|
||||
#define USB_ID_PRODUCT(id) ((u16)(id))
|
||||
|
||||
|
|
|
@ -1652,7 +1652,7 @@ static void hdmi_lpe_audio_free(struct snd_card *card)
|
|||
* This function is called when the i915 driver creates the
|
||||
* hdmi-lpe-audio platform device.
|
||||
*/
|
||||
static int hdmi_lpe_audio_probe(struct platform_device *pdev)
|
||||
static int __hdmi_lpe_audio_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct snd_card *card;
|
||||
struct snd_intelhad_card *card_ctx;
|
||||
|
@ -1815,6 +1815,11 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int hdmi_lpe_audio_probe(struct platform_device *pdev)
|
||||
{
|
||||
return snd_card_free_on_error(&pdev->dev, __hdmi_lpe_audio_probe(pdev));
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops hdmi_lpe_audio_pm = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(hdmi_lpe_audio_suspend, hdmi_lpe_audio_resume)
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue