Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353221
b: refs/heads/master
c: 86b2723
h: refs/heads/master
i:
  353219: 9110982
v: v3
  • Loading branch information
Takashi Iwai committed Jan 25, 2013
1 parent 23717e0 commit 4de7118
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f4f678d22219f5821f46bb78eb4da7f76f1899bc
refs/heads/master: 86b2723725a2e186f5699d97cb20014fa893931f
12 changes: 9 additions & 3 deletions trunk/include/sound/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,11 @@ void __snd_printk(unsigned int level, const char *file, int line,

#else /* !CONFIG_SND_DEBUG */

#define snd_printd(fmt, args...) do { } while (0)
#define _snd_printd(level, fmt, args...) do { } while (0)
__printf(1, 2)
static inline void snd_printd(const char *format, ...) {}
__printf(2, 3)
static inline void _snd_printd(int level, const char *format, ...) {}

#define snd_BUG() do { } while (0)
static inline int __snd_bug_on(int cond)
{
Expand All @@ -416,7 +419,8 @@ static inline int __snd_bug_on(int cond)
#define snd_printdd(format, args...) \
__snd_printk(2, __FILE__, __LINE__, format, ##args)
#else
#define snd_printdd(format, args...) do { } while (0)
__printf(1, 2)
static inline void snd_printdd(const char *format, ...) {}
#endif


Expand Down Expand Up @@ -454,13 +458,15 @@ struct snd_pci_quirk {
#define SND_PCI_QUIRK_MASK(vend, mask, dev, xname, val) \
{_SND_PCI_QUIRK_ID_MASK(vend, mask, dev), \
.value = (val), .name = (xname)}
#define snd_pci_quirk_name(q) ((q)->name)
#else
#define SND_PCI_QUIRK(vend,dev,xname,val) \
{_SND_PCI_QUIRK_ID(vend, dev), .value = (val)}
#define SND_PCI_QUIRK_MASK(vend, mask, dev, xname, val) \
{_SND_PCI_QUIRK_ID_MASK(vend, mask, dev), .value = (val)}
#define SND_PCI_QUIRK_VENDOR(vend, xname, val) \
{_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val)}
#define snd_pci_quirk_name(q) ""
#endif

const struct snd_pci_quirk *
Expand Down
3 changes: 1 addition & 2 deletions trunk/sound/drivers/vx/vx_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,14 @@ MODULE_LICENSE("GPL");
int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time)
{
unsigned long end_time = jiffies + (time * HZ + 999) / 1000;
#ifdef CONFIG_SND_DEBUG
static char *reg_names[VX_REG_MAX] = {
"ICR", "CVR", "ISR", "IVR", "RXH", "RXM", "RXL",
"DMA", "CDSP", "RFREQ", "RUER/V2", "DATA", "MEMIRQ",
"ACQ", "BIT0", "BIT1", "MIC0", "MIC1", "MIC2",
"MIC3", "INTCSR", "CNTRL", "GPIOC",
"LOFREQ", "HIFREQ", "CSUER", "RUER"
};
#endif

do {
if ((snd_vx_inb(chip, reg) & mask) == bit)
return 0;
Expand Down
5 changes: 3 additions & 2 deletions trunk/sound/pci/atiixp.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,9 @@ static int ac97_probing_bugs(struct pci_dev *pci)

q = snd_pci_quirk_lookup(pci, atiixp_quirks);
if (q) {
snd_printdd(KERN_INFO "Atiixp quirk for %s. "
"Forcing codec %d\n", q->name, q->value);
snd_printdd(KERN_INFO
"Atiixp quirk for %s. Forcing codec %d\n",
snd_pci_quirk_name(q), q->value);
return q->value;
}
/* this hardware doesn't need workarounds. Probe for codec */
Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/pci/hda/hda_auto_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,9 +698,7 @@ static void set_pin_targets(struct hda_codec *codec,

static void apply_fixup(struct hda_codec *codec, int id, int action, int depth)
{
#ifdef CONFIG_SND_DEBUG_VERBOSE
const char *modelname = codec->fixup_name;
#endif

while (id >= 0) {
const struct hda_fixup *fix = codec->fixup_list + id;
Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1579,9 +1579,7 @@ static void debug_show_configs(struct hda_codec *codec,
struct auto_pin_cfg *cfg)
{
struct hda_gen_spec *spec = codec->spec;
#ifdef CONFIG_SND_DEBUG_VERBOSE
static const char * const lo_type[3] = { "LO", "SP", "HP" };
#endif
int i;

debug_badness("multi_outs = %x/%x/%x/%x : %x/%x/%x/%x (type %s)\n",
Expand Down
10 changes: 6 additions & 4 deletions trunk/sound/pci/intel8x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -3266,11 +3266,13 @@ static int check_default_spdif_aclink(struct pci_dev *pci)
w = snd_pci_quirk_lookup(pci, spdif_aclink_defaults);
if (w) {
if (w->value)
snd_printdd(KERN_INFO "intel8x0: Using SPDIF over "
"AC-Link for %s\n", w->name);
snd_printdd(KERN_INFO
"intel8x0: Using SPDIF over AC-Link for %s\n",
snd_pci_quirk_name(w));
else
snd_printdd(KERN_INFO "intel8x0: Using integrated "
"SPDIF DMA for %s\n", w->name);
snd_printdd(KERN_INFO
"intel8x0: Using integrated SPDIF DMA for %s\n",
snd_pci_quirk_name(w));
return w->value;
}
return 0;
Expand Down
10 changes: 6 additions & 4 deletions trunk/sound/pci/maestro3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2586,8 +2586,9 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
else {
quirk = snd_pci_quirk_lookup(pci, m3_amp_quirk_list);
if (quirk) {
snd_printdd(KERN_INFO "maestro3: set amp-gpio "
"for '%s'\n", quirk->name);
snd_printdd(KERN_INFO
"maestro3: set amp-gpio for '%s'\n",
snd_pci_quirk_name(quirk));
chip->amp_gpio = quirk->value;
} else if (chip->allegro_flag)
chip->amp_gpio = GPO_EXT_AMP_ALLEGRO;
Expand All @@ -2597,8 +2598,9 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,

quirk = snd_pci_quirk_lookup(pci, m3_irda_quirk_list);
if (quirk) {
snd_printdd(KERN_INFO "maestro3: enabled irda workaround "
"for '%s'\n", quirk->name);
snd_printdd(KERN_INFO
"maestro3: enabled irda workaround for '%s'\n",
snd_pci_quirk_name(quirk));
chip->irda_workaround = 1;
}
quirk = snd_pci_quirk_lookup(pci, m3_hv_quirk_list);
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/pci/nm256/nm256.c
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,8 @@ static int snd_nm256_probe(struct pci_dev *pci,

q = snd_pci_quirk_lookup(pci, nm256_quirks);
if (q) {
snd_printdd(KERN_INFO "nm256: Enabled quirk for %s.\n", q->name);
snd_printdd(KERN_INFO "nm256: Enabled quirk for %s.\n",
snd_pci_quirk_name(q));
switch (q->value) {
case NM_BLACKLISTED:
printk(KERN_INFO "nm256: The device is blacklisted. "
Expand Down
3 changes: 1 addition & 2 deletions trunk/sound/pci/pcxhr/pcxhr_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,13 +1012,12 @@ static int pcxhr_handle_async_err(struct pcxhr_mgr *mgr, u32 err,
enum pcxhr_async_err_src err_src, int pipe,
int is_capture)
{
#ifdef CONFIG_SND_DEBUG_VERBOSE
static char* err_src_name[] = {
[PCXHR_ERR_PIPE] = "Pipe",
[PCXHR_ERR_STREAM] = "Stream",
[PCXHR_ERR_AUDIO] = "Audio"
};
#endif

if (err & 0xfff)
err &= 0xfff;
else
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/pci/via82xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2517,7 +2517,7 @@ static int check_dxs_list(struct pci_dev *pci, int revision)
w = snd_pci_quirk_lookup(pci, dxs_whitelist);
if (w) {
snd_printdd(KERN_INFO "via82xx: DXS white list for %s found\n",
w->name);
snd_pci_quirk_name(w));
return w->value;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/usb/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,9 +1179,7 @@ static void retire_capture_urb(struct snd_usb_substream *subs,
if (!subs->txfr_quirk)
bytes = frames * stride;
if (bytes % (runtime->sample_bits >> 3) != 0) {
#ifdef CONFIG_SND_DEBUG_VERBOSE
int oldbytes = bytes;
#endif
bytes = frames * stride;
snd_printdd(KERN_ERR "Corrected urb data len. %d->%d\n",
oldbytes, bytes);
Expand Down

0 comments on commit 4de7118

Please sign in to comment.