LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/16] ALSA fixes for 2.6.25-rc2
@ 2008-02-22 17:33 Takashi Iwai
2008-02-22 17:34 ` [PATCH 01/16] [ALSA] opl3 - Fix compilation without sequencer support Takashi Iwai
` (15 more replies)
0 siblings, 16 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:33 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
Hi,
the following patches are fixes for severe ALSA problems on
2.6.25-rc2. Please apply.
thanks,
Takashi
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 01/16] [ALSA] opl3 - Fix compilation without sequencer support
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
@ 2008-02-22 17:34 ` Takashi Iwai
2008-02-22 17:34 ` [PATCH 02/16] [ALSA] race between disconnect and error handling in usbmidi Takashi Iwai
` (14 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:34 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
Add proper ifdef's to the patch loading code moved from the old instr
layer so that opl3 driver can be compiled without the sequencer support.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
include/sound/opl3.h | 9 +++++++--
sound/drivers/opl3/opl3_synth.c | 8 ++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/include/sound/opl3.h b/include/sound/opl3.h
index a0c5feb..6ba6707 100644
--- a/include/sound/opl3.h
+++ b/include/sound/opl3.h
@@ -370,12 +370,13 @@ int snd_opl3_hwdep_new(struct snd_opl3 * opl3, int device, int seq_device,
int snd_opl3_open(struct snd_hwdep * hw, struct file *file);
int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file,
unsigned int cmd, unsigned long arg);
-long snd_opl3_write(struct snd_hwdep *hw, const char __user *buf, long count,
- loff_t *offset);
int snd_opl3_release(struct snd_hwdep * hw, struct file *file);
void snd_opl3_reset(struct snd_opl3 * opl3);
+#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
+long snd_opl3_write(struct snd_hwdep *hw, const char __user *buf, long count,
+ loff_t *offset);
int snd_opl3_load_patch(struct snd_opl3 *opl3,
int prog, int bank, int type,
const char *name,
@@ -384,5 +385,9 @@ int snd_opl3_load_patch(struct snd_opl3 *opl3,
struct fm_patch *snd_opl3_find_patch(struct snd_opl3 *opl3, int prog, int bank,
int create_patch);
void snd_opl3_clear_patches(struct snd_opl3 *opl3);
+#else
+#define snd_opl3_write NULL
+static inline void snd_opl3_clear_patches(struct snd_opl3 *opl3) {}
+#endif
#endif /* __SOUND_OPL3_H */
diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c
index a7bf7a4..fb64c89 100644
--- a/sound/drivers/opl3/opl3_synth.c
+++ b/sound/drivers/opl3/opl3_synth.c
@@ -22,6 +22,10 @@
#include <sound/opl3.h>
#include <sound/asound_fm.h>
+#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
+#define OPL3_SUPPORT_SYNTH
+#endif
+
/*
* There is 18 possible 2 OP voices
* (9 in the left and 9 in the right).
@@ -155,9 +159,11 @@ int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file,
#endif
return snd_opl3_set_connection(opl3, (int) arg);
+#ifdef OPL3_SUPPORT_SYNTH
case SNDRV_DM_FM_IOCTL_CLEAR_PATCHES:
snd_opl3_clear_patches(opl3);
return 0;
+#endif
#ifdef CONFIG_SND_DEBUG
default:
@@ -178,6 +184,7 @@ int snd_opl3_release(struct snd_hwdep * hw, struct file *file)
return 0;
}
+#ifdef OPL3_SUPPORT_SYNTH
/*
* write the device - load patches
*/
@@ -341,6 +348,7 @@ void snd_opl3_clear_patches(struct snd_opl3 *opl3)
}
memset(opl3->patch_table, 0, sizeof(opl3->patch_table));
}
+#endif /* OPL3_SUPPORT_SYNTH */
/* ------------------------------ */
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 02/16] [ALSA] race between disconnect and error handling in usbmidi
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
2008-02-22 17:34 ` [PATCH 01/16] [ALSA] opl3 - Fix compilation without sequencer support Takashi Iwai
@ 2008-02-22 17:34 ` Takashi Iwai
2008-02-22 17:35 ` [PATCH 03/16] [ALSA] oxygen - Fix section mismatch Takashi Iwai
` (13 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:34 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
The driver resubmits URBs from an error handler and schedules the error
handler from the URBs' completion handlers. To reliably kill the cycle
a flag must be used.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/usb/usbmidi.c | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
index 750e929..6676a17 100644
--- a/sound/usb/usbmidi.c
+++ b/sound/usb/usbmidi.c
@@ -104,12 +104,14 @@ struct snd_usb_midi {
struct usb_protocol_ops* usb_protocol_ops;
struct list_head list;
struct timer_list error_timer;
+ spinlock_t disc_lock;
struct snd_usb_midi_endpoint {
struct snd_usb_midi_out_endpoint *out;
struct snd_usb_midi_in_endpoint *in;
} endpoints[MIDI_MAX_ENDPOINTS];
unsigned long input_triggered;
+ unsigned char disconnected;
};
struct snd_usb_midi_out_endpoint {
@@ -306,6 +308,11 @@ static void snd_usbmidi_error_timer(unsigned long data)
struct snd_usb_midi *umidi = (struct snd_usb_midi *)data;
int i;
+ spin_lock(&umidi->disc_lock);
+ if (umidi->disconnected) {
+ spin_unlock(&umidi->disc_lock);
+ return;
+ }
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
struct snd_usb_midi_in_endpoint *in = umidi->endpoints[i].in;
if (in && in->error_resubmit) {
@@ -316,6 +323,7 @@ static void snd_usbmidi_error_timer(unsigned long data)
if (umidi->endpoints[i].out)
snd_usbmidi_do_output(umidi->endpoints[i].out);
}
+ spin_unlock(&umidi->disc_lock);
}
/* helper function to send static data that may not DMA-able */
@@ -1049,7 +1057,14 @@ void snd_usbmidi_disconnect(struct list_head* p)
int i;
umidi = list_entry(p, struct snd_usb_midi, list);
- del_timer_sync(&umidi->error_timer);
+ /*
+ * an URB's completion handler may start the timer and
+ * a timer may submit an URB. To reliably break the cycle
+ * a flag under lock must be used
+ */
+ spin_lock_irq(&umidi->disc_lock);
+ umidi->disconnected = 1;
+ spin_unlock_irq(&umidi->disc_lock);
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
struct snd_usb_midi_endpoint* ep = &umidi->endpoints[i];
if (ep->out)
@@ -1062,6 +1077,7 @@ void snd_usbmidi_disconnect(struct list_head* p)
if (ep->in)
usb_kill_urb(ep->in->urb);
}
+ del_timer_sync(&umidi->error_timer);
}
static void snd_usbmidi_rawmidi_free(struct snd_rawmidi *rmidi)
@@ -1685,6 +1701,7 @@ int snd_usb_create_midi_interface(struct snd_usb_audio* chip,
umidi->quirk = quirk;
umidi->usb_protocol_ops = &snd_usbmidi_standard_ops;
init_timer(&umidi->error_timer);
+ spin_lock_init(&umidi->disc_lock);
umidi->error_timer.function = snd_usbmidi_error_timer;
umidi->error_timer.data = (unsigned long)umidi;
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 03/16] [ALSA] oxygen - Fix section mismatch
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
2008-02-22 17:34 ` [PATCH 01/16] [ALSA] opl3 - Fix compilation without sequencer support Takashi Iwai
2008-02-22 17:34 ` [PATCH 02/16] [ALSA] race between disconnect and error handling in usbmidi Takashi Iwai
@ 2008-02-22 17:35 ` Takashi Iwai
2008-02-22 17:35 ` [PATCH 04/16] [ALSA] hdsp " Takashi Iwai
` (12 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:35 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
Removed invalid __devinit and __devexit that are remaining after
split to a helper module.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/oxygen/oxygen_lib.c | 10 +++++-----
sound/pci/oxygen/oxygen_pcm.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c
index 6eb36dd..78c2115 100644
--- a/sound/pci/oxygen/oxygen_lib.c
+++ b/sound/pci/oxygen/oxygen_lib.c
@@ -204,7 +204,7 @@ static void oxygen_proc_read(struct snd_info_entry *entry,
mutex_unlock(&chip->mutex);
}
-static void __devinit oxygen_proc_init(struct oxygen *chip)
+static void oxygen_proc_init(struct oxygen *chip)
{
struct snd_info_entry *entry;
@@ -215,7 +215,7 @@ static void __devinit oxygen_proc_init(struct oxygen *chip)
#define oxygen_proc_init(chip)
#endif
-static void __devinit oxygen_init(struct oxygen *chip)
+static void oxygen_init(struct oxygen *chip)
{
unsigned int i;
@@ -399,8 +399,8 @@ static void oxygen_card_free(struct snd_card *card)
pci_disable_device(chip->pci);
}
-int __devinit oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
- int midi, const struct oxygen_model *model)
+int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
+ int midi, const struct oxygen_model *model)
{
struct snd_card *card;
struct oxygen *chip;
@@ -507,7 +507,7 @@ err_card:
}
EXPORT_SYMBOL(oxygen_pci_probe);
-void __devexit oxygen_pci_remove(struct pci_dev *pci)
+void oxygen_pci_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
diff --git a/sound/pci/oxygen/oxygen_pcm.c b/sound/pci/oxygen/oxygen_pcm.c
index dfad3db..b70046a 100644
--- a/sound/pci/oxygen/oxygen_pcm.c
+++ b/sound/pci/oxygen/oxygen_pcm.c
@@ -634,7 +634,7 @@ static void oxygen_pcm_free(struct snd_pcm *pcm)
snd_pcm_lib_preallocate_free_for_all(pcm);
}
-int __devinit oxygen_pcm_init(struct oxygen *chip)
+int oxygen_pcm_init(struct oxygen *chip)
{
struct snd_pcm *pcm;
int outs, ins;
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 04/16] [ALSA] hdsp - Fix section mismatch
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
` (2 preceding siblings ...)
2008-02-22 17:35 ` [PATCH 03/16] [ALSA] oxygen - Fix section mismatch Takashi Iwai
@ 2008-02-22 17:35 ` Takashi Iwai
2008-02-22 17:36 ` [PATCH 05/16] [ALSA] HDA - enable snoop on SCH Takashi Iwai
` (11 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:35 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
Removed invalid __devinit from hdsp_request_fw_loader() and
snd_hwdep_create_hwdep() that aren't always init functions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/rme9652/hdsp.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index c2bd438..1be84f2 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -745,7 +745,7 @@ static int hdsp_get_iobox_version (struct hdsp *hdsp)
#ifdef HDSP_FW_LOADER
-static int __devinit hdsp_request_fw_loader(struct hdsp *hdsp);
+static int hdsp_request_fw_loader(struct hdsp *hdsp);
#endif
static int hdsp_check_for_firmware (struct hdsp *hdsp, int load_on_demand)
@@ -4688,8 +4688,7 @@ static struct snd_pcm_ops snd_hdsp_capture_ops = {
.copy = snd_hdsp_capture_copy,
};
-static int __devinit snd_hdsp_create_hwdep(struct snd_card *card,
- struct hdsp *hdsp)
+static int snd_hdsp_create_hwdep(struct snd_card *card, struct hdsp *hdsp)
{
struct snd_hwdep *hw;
int err;
@@ -4857,7 +4856,7 @@ static int snd_hdsp_create_alsa_devices(struct snd_card *card, struct hdsp *hdsp
#ifdef HDSP_FW_LOADER
/* load firmware via hotplug fw loader */
-static int __devinit hdsp_request_fw_loader(struct hdsp *hdsp)
+static int hdsp_request_fw_loader(struct hdsp *hdsp)
{
const char *fwfile;
const struct firmware *fw;
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 05/16] [ALSA] HDA - enable snoop on SCH
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
` (3 preceding siblings ...)
2008-02-22 17:35 ` [PATCH 04/16] [ALSA] hdsp " Takashi Iwai
@ 2008-02-22 17:36 ` Takashi Iwai
2008-02-22 17:36 ` [PATCH 06/16] [ALSA] hda-codec - Fix SPDIF output on Conexant 5045 codec Takashi Iwai
` (10 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:36 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
This patch enables snoop on Intel SCH chipset, eliminating static during
playback.
Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/hda_intel.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 56f8a30..a1098bb 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -275,6 +275,11 @@ enum {
#define NVIDIA_HDA_TRANSREG_ADDR 0x4e
#define NVIDIA_HDA_ENABLE_COHBITS 0x0f
+/* Defines for Intel SCH HDA snoop control */
+#define INTEL_SCH_HDA_DEVC 0x78
+#define INTEL_SCH_HDA_DEVC_NOSNOOP (0x1<<11)
+
+
/*
*/
@@ -868,6 +873,8 @@ static void update_pci_byte(struct pci_dev *pci, unsigned int reg,
static void azx_init_pci(struct azx *chip)
{
+ unsigned short snoop;
+
/* Clear bits 0-2 of PCI register TCSEL (at offset 0x44)
* TCSEL == Traffic Class Select Register, which sets PCI express QOS
* Ensuring these bits are 0 clears playback static on some HD Audio
@@ -888,6 +895,19 @@ static void azx_init_pci(struct azx *chip)
NVIDIA_HDA_TRANSREG_ADDR,
0x0f, NVIDIA_HDA_ENABLE_COHBITS);
break;
+ case AZX_DRIVER_SCH:
+ pci_read_config_word(chip->pci, INTEL_SCH_HDA_DEVC, &snoop);
+ if (snoop & INTEL_SCH_HDA_DEVC_NOSNOOP) {
+ pci_write_config_word(chip->pci, INTEL_SCH_HDA_DEVC, \
+ snoop & (~INTEL_SCH_HDA_DEVC_NOSNOOP));
+ pci_read_config_word(chip->pci,
+ INTEL_SCH_HDA_DEVC, &snoop);
+ snd_printdd("HDA snoop disabled, enabling ... %s\n",\
+ (snoop & INTEL_SCH_HDA_DEVC_NOSNOOP) \
+ ? "Failed" : "OK");
+ }
+ break;
+
}
}
@@ -1040,6 +1060,7 @@ static int azx_setup_controller(struct azx *chip, struct azx_dev *azx_dev)
static unsigned int azx_max_codecs[] __devinitdata = {
[AZX_DRIVER_ICH] = 3,
+ [AZX_DRIVER_SCH] = 3,
[AZX_DRIVER_ATI] = 4,
[AZX_DRIVER_ATIHDMI] = 4,
[AZX_DRIVER_VIA] = 3, /* FIXME: correct? */
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 06/16] [ALSA] hda-codec - Fix SPDIF output on Conexant 5045 codec
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
` (4 preceding siblings ...)
2008-02-22 17:36 ` [PATCH 05/16] [ALSA] HDA - enable snoop on SCH Takashi Iwai
@ 2008-02-22 17:36 ` Takashi Iwai
2008-02-22 17:40 ` [PATCH 07/16] [ALSA] oxygen: fix line-in recording selection Takashi Iwai
` (9 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:36 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
Fixed the SPDIF output on Conexant Cx5045 codec. Added the missing
pin output setting and fixed the wrong NID for digital audio-out widget.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/patch_conexant.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index f6dd51c..f7cd3a8 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -488,7 +488,7 @@ static int conexant_ch_mode_put(struct snd_kcontrol *kcontrol,
static hda_nid_t cxt5045_dac_nids[1] = { 0x19 };
static hda_nid_t cxt5045_adc_nids[1] = { 0x1a };
static hda_nid_t cxt5045_capsrc_nids[1] = { 0x1a };
-#define CXT5045_SPDIF_OUT 0x13
+#define CXT5045_SPDIF_OUT 0x18
static struct hda_channel_mode cxt5045_modes[1] = {
{ 2, NULL },
@@ -658,6 +658,7 @@ static struct hda_verb cxt5045_init_verbs[] = {
{0x1a, AC_VERB_SET_AMP_GAIN_MUTE,
AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17},
/* SPDIF route: PCM */
+ {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{ 0x13, AC_VERB_SET_CONNECT_SEL, 0x0 },
/* EAPD */
{0x10, AC_VERB_SET_EAPD_BTLENABLE, 0x2 }, /* default on */
@@ -683,6 +684,7 @@ static struct hda_verb cxt5045_benq_init_verbs[] = {
{0x1a, AC_VERB_SET_AMP_GAIN_MUTE,
AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17},
/* SPDIF route: PCM */
+ {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{0x13, AC_VERB_SET_CONNECT_SEL, 0x0},
/* EAPD */
{0x10, AC_VERB_SET_EAPD_BTLENABLE, 0x2}, /* default on */
@@ -781,7 +783,8 @@ static struct hda_verb cxt5045_test_init_verbs[] = {
* PCM format, copyright asserted, no pre-emphasis and no validity
* control.
*/
- {0x13, AC_VERB_SET_DIGI_CONVERT_1, 0},
+ {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+ {0x18, AC_VERB_SET_DIGI_CONVERT_1, 0},
/* Start with output sum widgets muted and their output gains at min */
{0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 07/16] [ALSA] oxygen: fix line-in recording selection
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
` (5 preceding siblings ...)
2008-02-22 17:36 ` [PATCH 06/16] [ALSA] hda-codec - Fix SPDIF output on Conexant 5045 codec Takashi Iwai
@ 2008-02-22 17:40 ` Takashi Iwai
2008-02-22 17:41 ` [PATCH 08/16] [ALSA] soc - duplicate strcasecmp test for "rj-master" in mpc8610_hpcd_probe() Takashi Iwai
` (8 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:40 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
The GPIO pin 0 of the CM9780 must be set when muting the line input even
on non-Xonar cards.
From: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/oxygen/oxygen.c | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c
index f31a0eb..9a9941b 100644
--- a/sound/pci/oxygen/oxygen.c
+++ b/sound/pci/oxygen/oxygen.c
@@ -28,7 +28,9 @@
* GPIO 1 -> DFS1 of AK5385
*/
+#include <linux/mutex.h>
#include <linux/pci.h>
+#include <sound/ac97_codec.h>
#include <sound/control.h>
#include <sound/core.h>
#include <sound/initval.h>
@@ -37,6 +39,7 @@
#include <sound/tlv.h>
#include "oxygen.h"
#include "ak4396.h"
+#include "cm9780.h"
MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
MODULE_DESCRIPTION("C-Media CMI8788 driver");
@@ -75,6 +78,8 @@ MODULE_DEVICE_TABLE(pci, oxygen_ids);
#define GPIO_AK5385_DFS_DOUBLE 0x0001
#define GPIO_AK5385_DFS_QUAD 0x0002
+#define GPIO_LINE_MUTE CM9780_GPO0
+
#define WM8785_R0 0
#define WM8785_R1 1
#define WM8785_R2 2
@@ -180,16 +185,23 @@ static void wm8785_init(struct oxygen *chip)
snd_component_add(chip->card, "WM8785");
}
+static void cmi9780_init(struct oxygen *chip)
+{
+ oxygen_ac97_clear_bits(chip, 0, CM9780_GPIO_STATUS, GPIO_LINE_MUTE);
+}
+
static void generic_init(struct oxygen *chip)
{
ak4396_init(chip);
wm8785_init(chip);
+ cmi9780_init(chip);
}
static void meridian_init(struct oxygen *chip)
{
ak4396_init(chip);
ak5385_init(chip);
+ cmi9780_init(chip);
}
static void generic_cleanup(struct oxygen *chip)
@@ -285,6 +297,27 @@ static void set_ak5385_params(struct oxygen *chip,
value, GPIO_AK5385_DFS_MASK);
}
+static void cmi9780_switch_hook(struct oxygen *chip, unsigned int codec,
+ unsigned int reg, int mute)
+{
+ if (codec != 0)
+ return;
+ switch (reg) {
+ case AC97_LINE:
+ oxygen_write_ac97_masked(chip, 0, CM9780_GPIO_STATUS,
+ mute ? GPIO_LINE_MUTE : 0,
+ GPIO_LINE_MUTE);
+ break;
+ case AC97_MIC:
+ case AC97_CD:
+ case AC97_AUX:
+ if (!mute)
+ oxygen_ac97_set_bits(chip, 0, CM9780_GPIO_STATUS,
+ GPIO_LINE_MUTE);
+ break;
+ }
+}
+
static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0);
static int ak4396_control_filter(struct snd_kcontrol_new *template)
@@ -308,6 +341,7 @@ static const struct oxygen_model model_generic = {
.set_adc_params = set_wm8785_params,
.update_dac_volume = update_ak4396_volume,
.update_dac_mute = update_ak4396_mute,
+ .ac97_switch_hook = cmi9780_switch_hook,
.model_data_size = sizeof(struct generic_data),
.dac_channels = 8,
.used_channels = OXYGEN_CHANNEL_A |
@@ -331,6 +365,7 @@ static const struct oxygen_model model_meridian = {
.set_adc_params = set_ak5385_params,
.update_dac_volume = update_ak4396_volume,
.update_dac_mute = update_ak4396_mute,
+ .ac97_switch_hook = cmi9780_switch_hook,
.model_data_size = sizeof(struct generic_data),
.dac_channels = 8,
.used_channels = OXYGEN_CHANNEL_B |
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 08/16] [ALSA] soc - duplicate strcasecmp test for "rj-master" in mpc8610_hpcd_probe()
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
` (6 preceding siblings ...)
2008-02-22 17:40 ` [PATCH 07/16] [ALSA] oxygen: fix line-in recording selection Takashi Iwai
@ 2008-02-22 17:41 ` Takashi Iwai
2008-02-22 17:43 ` [PATCH 09/16] [ALSA] hda-codec - Fix race condition in generic bound volume/swtich controls Takashi Iwai
` (7 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:41 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
In linus' git tree I found this problem. Is it also in the alsa tree?
please confirm it's the right fix. The patch was not yet tested.
From: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/soc/fsl/mpc8610_hpcd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c
index f26c4b2..a00aac7 100644
--- a/sound/soc/fsl/mpc8610_hpcd.c
+++ b/sound/soc/fsl/mpc8610_hpcd.c
@@ -315,7 +315,7 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev,
machine_data->dai_format = SND_SOC_DAIFMT_LEFT_J;
machine_data->codec_clk_direction = SND_SOC_CLOCK_IN;
machine_data->cpu_clk_direction = SND_SOC_CLOCK_OUT;
- } else if (strcasecmp(sprop, "rj-master") == 0) {
+ } else if (strcasecmp(sprop, "rj-slave") == 0) {
machine_data->dai_format = SND_SOC_DAIFMT_RIGHT_J;
machine_data->codec_clk_direction = SND_SOC_CLOCK_OUT;
machine_data->cpu_clk_direction = SND_SOC_CLOCK_IN;
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 09/16] [ALSA] hda-codec - Fix race condition in generic bound volume/swtich controls
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
` (7 preceding siblings ...)
2008-02-22 17:41 ` [PATCH 08/16] [ALSA] soc - duplicate strcasecmp test for "rj-master" in mpc8610_hpcd_probe() Takashi Iwai
@ 2008-02-22 17:43 ` Takashi Iwai
2008-02-22 17:43 ` [PATCH 10/16] [ALSA] hda-codec - Don't create vmaster if no slaves found Takashi Iwai
` (6 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:43 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
Attached patch fix race condition in hd_codec generic bound volume/swtich
controls
oops on this bug can be easy reproduced by two mixer apps on SMP system with
PREEMPT kernel
dmesg:
ALSA /home/ss/ALSA/alsa-driver-1.0.16/pci/hda/../../alsa-kernel/pci/hda/hda_intel.c:596:
hda_intel: azx_get_response timeout, switching to polling mode: las
t cmd=0x014f0900
BUG: unable to handle kernel paging request at virtual address 00070006
printing eip: f8f43e95 *pde = 00000000
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: i915 drm snd_seq_dummy snd_seq_oss snd_seq_midi_event
snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss bnep rfcomm hidp l2cap
bluetooth w
lan_wep acpi_cpufreq coretemp hwmon mmc_block pcspkr psmouse wlan_scan_sta
ath_rate_sample snd_hda_intel ath_pci serio_raw wlan tg3 sdhci snd_pcm
firewire_o
hci mmc_core i2c_i801 snd_timer firewire_core snd_page_alloc ath_hal(P)
snd_hwdep snd iTCO_wdt crc_itu_t iTCO_vendor_support shpchp video output
acer_acpi b
acklight led_class wmi_acer
Pid: 3969, comm: gkrellm Tainted: P (2.6.24-jm #4)
EIP: 0060:[<f8f43e95>] EFLAGS: 00010292 CPU: 0
EIP is at snd_hda_mixer_bind_ctls_info+0x20/0x43 [snd_hda_intel]
EAX: 00000000 EBX: f7478e00 ECX: f763e000 EDX: f764f788
ESI: 00070002 EDI: edce5e00 EBP: edc3fe64 ESP: edc3fe54
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process gkrellm (pid: 3969, ti=edc3e000 task=f1e4e000 task.ti=edc3e000)
Stack: f764f77c f7478e00 edce5e00 f6dd6000 edc3fe84 f8e590e8 edc7a239 f6d14034
f764f34c f6c0f7e0 edc3ff30 f6d14034 edc3fea8 f8e591b7 edc3ff30 edc3ff2c
00000000 f70aa668 f6d14034 f8e59165 bfbfadb0 edc3ff40 f8e587aa edc3ff2c
Call Trace:
[<c0104fbb>] show_trace_log_lvl+0x1a/0x2f
[<c010506d>] show_stack_log_lvl+0x9d/0xa5
[<c0105119>] show_registers+0xa4/0x1bd
[<c0105354>] die+0x122/0x206
[<c03daccc>] do_page_fault+0x535/0x623
[<c03d940a>] error_code+0x72/0x78
[<f8e590e8>] snd_mixer_oss_get_volume1_vol+0x74/0xf1 [snd_mixer_oss]
[<f8e591b7>] snd_mixer_oss_get_volume1+0x52/0xa5 [snd_mixer_oss]
[<f8e587aa>] snd_mixer_oss_ioctl1+0x673/0x71e [snd_mixer_oss]
[<f8e588af>] snd_mixer_oss_ioctl+0xb/0xd [snd_mixer_oss]
[<c017af0a>] do_ioctl+0x22/0x67
[<c017b186>] vfs_ioctl+0x237/0x24a
[<c017b1ca>] sys_ioctl+0x31/0x4b
[<c010402e>] syscall_call+0x7/0xb
=======================
Code: 3f 49 c7 89 f8 59 5b 5e 5f 5d c3 55 89 e5 57 89 d7 56 53 89 c3 83 ec 04
8b 70 5c 8b 40 60 05 7c 01 00 00 89 45 f0 e8 c0 3f 49 c7 <8b> 46 04 89 fa 89
4
3 5c 89 d8 8b 0e ff 11 89 73 5c 89 c7 8b 45
EIP: [<f8f43e95>] snd_hda_mixer_bind_ctls_info+0x20/0x43 [snd_hda_intel]
SS:ESP 0068:edc3fe54
---[ end trace 0a20bc209e9397cc ]---
similar issue report present in ALSA bugtracking system
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3652
From: Serge A. Suchkov <Serge.A.S@tochka.ru>
Signed-off-by: Serge A. Suchkov <Serge.A.S@tochka.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/hda_codec.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 26812dc..5c6419e 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1197,8 +1197,8 @@ int snd_hda_mixer_bind_ctls_info(struct snd_kcontrol *kcontrol,
struct hda_bind_ctls *c;
int err;
- c = (struct hda_bind_ctls *)kcontrol->private_value;
mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */
+ c = (struct hda_bind_ctls *)kcontrol->private_value;
kcontrol->private_value = *c->values;
err = c->ops->info(kcontrol, uinfo);
kcontrol->private_value = (long)c;
@@ -1213,8 +1213,8 @@ int snd_hda_mixer_bind_ctls_get(struct snd_kcontrol *kcontrol,
struct hda_bind_ctls *c;
int err;
- c = (struct hda_bind_ctls *)kcontrol->private_value;
mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */
+ c = (struct hda_bind_ctls *)kcontrol->private_value;
kcontrol->private_value = *c->values;
err = c->ops->get(kcontrol, ucontrol);
kcontrol->private_value = (long)c;
@@ -1230,8 +1230,8 @@ int snd_hda_mixer_bind_ctls_put(struct snd_kcontrol *kcontrol,
unsigned long *vals;
int err = 0, change = 0;
- c = (struct hda_bind_ctls *)kcontrol->private_value;
mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */
+ c = (struct hda_bind_ctls *)kcontrol->private_value;
for (vals = c->values; *vals; vals++) {
kcontrol->private_value = *vals;
err = c->ops->put(kcontrol, ucontrol);
@@ -1251,8 +1251,8 @@ int snd_hda_mixer_bind_tlv(struct snd_kcontrol *kcontrol, int op_flag,
struct hda_bind_ctls *c;
int err;
- c = (struct hda_bind_ctls *)kcontrol->private_value;
mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */
+ c = (struct hda_bind_ctls *)kcontrol->private_value;
kcontrol->private_value = *c->values;
err = c->ops->tlv(kcontrol, op_flag, size, tlv);
kcontrol->private_value = (long)c;
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 10/16] [ALSA] hda-codec - Don't create vmaster if no slaves found
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
` (8 preceding siblings ...)
2008-02-22 17:43 ` [PATCH 09/16] [ALSA] hda-codec - Fix race condition in generic bound volume/swtich controls Takashi Iwai
@ 2008-02-22 17:43 ` Takashi Iwai
2008-02-22 17:44 ` [PATCH 11/16] [ALSA] hda-codec - Fix wrong capture source selection for ALC883 codec Takashi Iwai
` (5 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:43 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
Don't create vmaster controls if no slaves are found in the given list.
This prevents the error due to an empty vmaster control.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/hda_codec.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 5c6419e..37c4139 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1055,6 +1055,12 @@ int snd_hda_add_vmaster(struct hda_codec *codec, char *name,
const char **s;
int err;
+ for (s = slaves; *s && !snd_hda_find_mixer_ctl(codec, *s); s++)
+ ;
+ if (!*s) {
+ snd_printdd("No slave found for %s\n", name);
+ return 0;
+ }
kctl = snd_ctl_make_virtual_master(name, tlv);
if (!kctl)
return -ENOMEM;
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 11/16] [ALSA] hda-codec - Fix wrong capture source selection for ALC883 codec
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
` (9 preceding siblings ...)
2008-02-22 17:43 ` [PATCH 10/16] [ALSA] hda-codec - Don't create vmaster if no slaves found Takashi Iwai
@ 2008-02-22 17:44 ` Takashi Iwai
2008-02-22 17:45 ` [PATCH 12/16] [ALSA] hda-codec - Fix ALC882 capture source selection Takashi Iwai
` (4 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:44 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
The widget list of capture source selection for ALC883 contains the
wrong NIDs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/patch_realtek.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 586d98f..2a463c9 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6457,7 +6457,7 @@ static int alc883_mux_enum_put(struct snd_kcontrol *kcontrol,
struct alc_spec *spec = codec->spec;
const struct hda_input_mux *imux = spec->input_mux;
unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
- static hda_nid_t capture_mixers[3] = { 0x24, 0x23, 0x22 };
+ static hda_nid_t capture_mixers[2] = { 0x23, 0x22 };
hda_nid_t nid = capture_mixers[adc_idx];
unsigned int *cur_val = &spec->cur_mux[adc_idx];
unsigned int i, idx;
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 12/16] [ALSA] hda-codec - Fix ALC882 capture source selection
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
` (10 preceding siblings ...)
2008-02-22 17:44 ` [PATCH 11/16] [ALSA] hda-codec - Fix wrong capture source selection for ALC883 codec Takashi Iwai
@ 2008-02-22 17:45 ` Takashi Iwai
2008-02-22 17:46 ` [PATCH 13/16] [ALSA] hda-codec - Fix amp-in values for pin widgets Takashi Iwai
` (3 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:45 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
The capture source selection for ADC list with two elements is buggy
becaues of a wrong capture mux list. This patch fixes the starting
index based on spec->num_adc_nids.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/patch_realtek.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 2a463c9..777f8c0 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5227,10 +5227,14 @@ static int alc882_mux_enum_put(struct snd_kcontrol *kcontrol,
const struct hda_input_mux *imux = spec->input_mux;
unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
static hda_nid_t capture_mixers[3] = { 0x24, 0x23, 0x22 };
- hda_nid_t nid = capture_mixers[adc_idx];
+ hda_nid_t nid;
unsigned int *cur_val = &spec->cur_mux[adc_idx];
unsigned int i, idx;
+ if (spec->num_adc_nids < 3)
+ nid = capture_mixers[adc_idx + 1];
+ else
+ nid = capture_mixers[adc_idx];
idx = ucontrol->value.enumerated.item[0];
if (idx >= imux->num_items)
idx = imux->num_items - 1;
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 13/16] [ALSA] hda-codec - Fix amp-in values for pin widgets
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
` (11 preceding siblings ...)
2008-02-22 17:45 ` [PATCH 12/16] [ALSA] hda-codec - Fix ALC882 capture source selection Takashi Iwai
@ 2008-02-22 17:46 ` Takashi Iwai
2008-02-22 17:46 ` [PATCH 14/16] [ALSA] caiaq - fix section mismatch warning Takashi Iwai
` (2 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:46 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
Pin widgets have always one amp-input value regardless of number of
connections. The proc file showed values wrongly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/hda_proc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index 35a630d..5633f77 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -584,7 +584,8 @@ static void print_codec_info(struct snd_info_entry *entry,
print_amp_caps(buffer, codec, nid, HDA_INPUT);
snd_iprintf(buffer, " Amp-In vals: ");
print_amp_vals(buffer, codec, nid, HDA_INPUT,
- wid_caps & AC_WCAP_STEREO, conn_len);
+ wid_caps & AC_WCAP_STEREO,
+ wid_type == AC_WID_PIN ? 1 : conn_len);
}
if (wid_caps & AC_WCAP_OUT_AMP) {
snd_iprintf(buffer, " Amp-Out caps: ");
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 14/16] [ALSA] caiaq - fix section mismatch warning
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
` (12 preceding siblings ...)
2008-02-22 17:46 ` [PATCH 13/16] [ALSA] hda-codec - Fix amp-in values for pin widgets Takashi Iwai
@ 2008-02-22 17:46 ` Takashi Iwai
2008-02-22 18:31 ` Sam Ravnborg
2008-02-22 17:47 ` [PATCH 15/16] [ALSA] hda-intel - Fix Oops with ATI HDMI devices Takashi Iwai
2008-02-22 17:47 ` [PATCH 16/16] [ALSA] bt87X: fix freeing of shared interrupt Takashi Iwai
15 siblings, 1 reply; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:46 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
Fix following warning:
WARNING: vmlinux.o(.text+0x11ec01a): Section mismatch in reference from the function setup_card() to the function .devinit.text:snd_usb_caiaq_control_init()
setup_card() are only used by init_card().
init_card() are only used by snd_probe()
snd_probe() are used for the .probe parameter in usb_driver.probe
Annotate them all __devinit to fix the warning.
From: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/usb/caiaq/caiaq-device.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/usb/caiaq/caiaq-device.c b/sound/usb/caiaq/caiaq-device.c
index 58d25e4..7c44a2c 100644
--- a/sound/usb/caiaq/caiaq-device.c
+++ b/sound/usb/caiaq/caiaq-device.c
@@ -245,7 +245,7 @@ int snd_usb_caiaq_set_auto_msg (struct snd_usb_caiaqdev *dev,
tmp, sizeof(tmp));
}
-static void setup_card(struct snd_usb_caiaqdev *dev)
+static void __devinit setup_card(struct snd_usb_caiaqdev *dev)
{
int ret;
char val[4];
@@ -359,7 +359,7 @@ static struct snd_card* create_card(struct usb_device* usb_dev)
return card;
}
-static int init_card(struct snd_usb_caiaqdev *dev)
+static int __devinit init_card(struct snd_usb_caiaqdev *dev)
{
char *c;
struct usb_device *usb_dev = dev->chip.dev;
@@ -428,7 +428,7 @@ static int init_card(struct snd_usb_caiaqdev *dev)
return 0;
}
-static int snd_probe(struct usb_interface *intf,
+static int __devinit snd_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
int ret;
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 15/16] [ALSA] hda-intel - Fix Oops with ATI HDMI devices
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
` (13 preceding siblings ...)
2008-02-22 17:46 ` [PATCH 14/16] [ALSA] caiaq - fix section mismatch warning Takashi Iwai
@ 2008-02-22 17:47 ` Takashi Iwai
2008-02-22 17:47 ` [PATCH 16/16] [ALSA] bt87X: fix freeing of shared interrupt Takashi Iwai
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:47 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
The driver gets Oops with ATI HDMI devices due to the wrong calculation
of index for playback streams. This patch fixes it. Reference:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3746
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/hda_intel.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index a1098bb..4be36c8 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1818,7 +1818,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
*/
chip->playback_streams = (gcap & (0xF << 12)) >> 12;
chip->capture_streams = (gcap & (0xF << 8)) >> 8;
- chip->playback_index_offset = (gcap & (0xF << 12)) >> 12;
+ chip->playback_index_offset = chip->capture_streams;
chip->capture_index_offset = 0;
} else {
/* gcap didn't give any info, switching to old method */
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 16/16] [ALSA] bt87X: fix freeing of shared interrupt
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
` (14 preceding siblings ...)
2008-02-22 17:47 ` [PATCH 15/16] [ALSA] hda-intel - Fix Oops with ATI HDMI devices Takashi Iwai
@ 2008-02-22 17:47 ` Takashi Iwai
15 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-22 17:47 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm
Call free_irq() after iounmap() because other devices could trigger our
shared interrupt handler.
From: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/bt87x.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index c9a2421..4ecdd63 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -681,15 +681,12 @@ static struct snd_kcontrol_new snd_bt87x_capture_source = {
static int snd_bt87x_free(struct snd_bt87x *chip)
{
- if (chip->mmio) {
+ if (chip->mmio)
snd_bt87x_stop(chip);
- if (chip->irq >= 0)
- synchronize_irq(chip->irq);
-
- iounmap(chip->mmio);
- }
if (chip->irq >= 0)
free_irq(chip->irq, chip);
+ if (chip->mmio)
+ iounmap(chip->mmio);
pci_release_regions(chip->pci);
pci_disable_device(chip->pci);
kfree(chip);
--
1.5.3.8
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 14/16] [ALSA] caiaq - fix section mismatch warning
2008-02-22 17:46 ` [PATCH 14/16] [ALSA] caiaq - fix section mismatch warning Takashi Iwai
@ 2008-02-22 18:31 ` Sam Ravnborg
2008-02-23 10:23 ` Takashi Iwai
0 siblings, 1 reply; 19+ messages in thread
From: Sam Ravnborg @ 2008-02-22 18:31 UTC (permalink / raw)
To: Takashi Iwai; +Cc: torvalds, linux-kernel, akpm
Hi Takashi.
On Fri, Feb 22, 2008 at 06:46:47PM +0100, Takashi Iwai wrote:
> Fix following warning:
> WARNING: vmlinux.o(.text+0x11ec01a): Section mismatch in reference from the function setup_card() to the function .devinit.text:snd_usb_caiaq_control_init()
>
> setup_card() are only used by init_card().
> init_card() are only used by snd_probe()
> snd_probe() are used for the .probe parameter in usb_driver.probe
>
> Annotate them all __devinit to fix the warning.
>
> From: Sam Ravnborg <sam@ravnborg.org>
git will not pick up me as author for this patch unless
you place the From: at the _first_ line in the commmit.
Nothing to worry for this simple patch - just so you know in the future.
Sam
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 14/16] [ALSA] caiaq - fix section mismatch warning
2008-02-22 18:31 ` Sam Ravnborg
@ 2008-02-23 10:23 ` Takashi Iwai
0 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2008-02-23 10:23 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: torvalds, linux-kernel, akpm
At Fri, 22 Feb 2008 19:31:56 +0100,
Sam Ravnborg wrote:
>
> Hi Takashi.
>
>
> On Fri, Feb 22, 2008 at 06:46:47PM +0100, Takashi Iwai wrote:
> > Fix following warning:
> > WARNING: vmlinux.o(.text+0x11ec01a): Section mismatch in reference from the function setup_card() to the function .devinit.text:snd_usb_caiaq_control_init()
> >
> > setup_card() are only used by init_card().
> > init_card() are only used by snd_probe()
> > snd_probe() are used for the .probe parameter in usb_driver.probe
> >
> > Annotate them all __devinit to fix the warning.
> >
> > From: Sam Ravnborg <sam@ravnborg.org>
>
> git will not pick up me as author for this patch unless
> you place the From: at the _first_ line in the commmit.
Oops, thanks for hints.
> Nothing to worry for this simple patch - just so you know in the future.
I'll set up git at the next time, so this won't happen, I hope :)
Takashi
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2008-02-23 10:23 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-22 17:33 [PATCH 0/16] ALSA fixes for 2.6.25-rc2 Takashi Iwai
2008-02-22 17:34 ` [PATCH 01/16] [ALSA] opl3 - Fix compilation without sequencer support Takashi Iwai
2008-02-22 17:34 ` [PATCH 02/16] [ALSA] race between disconnect and error handling in usbmidi Takashi Iwai
2008-02-22 17:35 ` [PATCH 03/16] [ALSA] oxygen - Fix section mismatch Takashi Iwai
2008-02-22 17:35 ` [PATCH 04/16] [ALSA] hdsp " Takashi Iwai
2008-02-22 17:36 ` [PATCH 05/16] [ALSA] HDA - enable snoop on SCH Takashi Iwai
2008-02-22 17:36 ` [PATCH 06/16] [ALSA] hda-codec - Fix SPDIF output on Conexant 5045 codec Takashi Iwai
2008-02-22 17:40 ` [PATCH 07/16] [ALSA] oxygen: fix line-in recording selection Takashi Iwai
2008-02-22 17:41 ` [PATCH 08/16] [ALSA] soc - duplicate strcasecmp test for "rj-master" in mpc8610_hpcd_probe() Takashi Iwai
2008-02-22 17:43 ` [PATCH 09/16] [ALSA] hda-codec - Fix race condition in generic bound volume/swtich controls Takashi Iwai
2008-02-22 17:43 ` [PATCH 10/16] [ALSA] hda-codec - Don't create vmaster if no slaves found Takashi Iwai
2008-02-22 17:44 ` [PATCH 11/16] [ALSA] hda-codec - Fix wrong capture source selection for ALC883 codec Takashi Iwai
2008-02-22 17:45 ` [PATCH 12/16] [ALSA] hda-codec - Fix ALC882 capture source selection Takashi Iwai
2008-02-22 17:46 ` [PATCH 13/16] [ALSA] hda-codec - Fix amp-in values for pin widgets Takashi Iwai
2008-02-22 17:46 ` [PATCH 14/16] [ALSA] caiaq - fix section mismatch warning Takashi Iwai
2008-02-22 18:31 ` Sam Ravnborg
2008-02-23 10:23 ` Takashi Iwai
2008-02-22 17:47 ` [PATCH 15/16] [ALSA] hda-intel - Fix Oops with ATI HDMI devices Takashi Iwai
2008-02-22 17:47 ` [PATCH 16/16] [ALSA] bt87X: fix freeing of shared interrupt Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).