#define snd_azf3328_dbgmisc(format, args...)
#endif
-#if DEBUG_CALLS
-#define snd_azf3328_dbgcalls(format, args...) printk(format, ##args)
-#define snd_azf3328_dbgcallenter() printk(KERN_DEBUG "--> %s\n", __func__)
-#define snd_azf3328_dbgcallleave() printk(KERN_DEBUG "<-- %s\n", __func__)
-#else
-#define snd_azf3328_dbgcalls(format, args...)
-#define snd_azf3328_dbgcallenter()
-#define snd_azf3328_dbgcallleave()
-#endif
-
#if DEBUG_MIXER
#define snd_azf3328_dbgmixer(format, args...) printk(KERN_DEBUG format, ##args)
#else
unsigned char curr_vol_left = 0, curr_vol_right = 0;
int left_change = 0, right_change = 0;
- snd_azf3328_dbgcallenter();
-
if (chan_sel & SET_CHAN_LEFT) {
curr_vol_left = inb(portbase + 1);
if (delay)
mdelay(delay);
} while ((left_change) || (right_change));
- snd_azf3328_dbgcallleave();
}
/*
{
struct azf3328_mixer_reg reg;
- snd_azf3328_dbgcallenter();
snd_azf3328_mixer_reg_decode(®, kcontrol->private_value);
uinfo->type = reg.mask == 1 ?
SNDRV_CTL_ELEM_TYPE_BOOLEAN : SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = reg.stereo + 1;
uinfo->value.integer.min = 0;
uinfo->value.integer.max = reg.mask;
- snd_azf3328_dbgcallleave();
return 0;
}
struct azf3328_mixer_reg reg;
u16 oreg, val;
- snd_azf3328_dbgcallenter();
snd_azf3328_mixer_reg_decode(®, kcontrol->private_value);
oreg = snd_azf3328_mixer_inw(chip, reg.reg);
reg.reg, oreg,
ucontrol->value.integer.value[0], ucontrol->value.integer.value[1],
reg.lchan_shift, reg.rchan_shift, reg.mask, reg.invert, reg.stereo);
- snd_azf3328_dbgcallleave();
return 0;
}
struct azf3328_mixer_reg reg;
u16 oreg, nreg, val;
- snd_azf3328_dbgcallenter();
snd_azf3328_mixer_reg_decode(®, kcontrol->private_value);
oreg = snd_azf3328_mixer_inw(chip, reg.reg);
val = ucontrol->value.integer.value[0] & reg.mask;
reg.reg, ucontrol->value.integer.value[0], ucontrol->value.integer.value[1],
oreg, reg.lchan_shift, reg.rchan_shift,
nreg, snd_azf3328_mixer_inw(chip, reg.reg));
- snd_azf3328_dbgcallleave();
return (nreg != oreg);
}
unsigned int idx;
int err;
- snd_azf3328_dbgcallenter();
if (snd_BUG_ON(!chip || !chip->card))
return -EINVAL;
snd_component_add(card, "AZF3328 mixer");
strcpy(card->mixername, "AZF3328 mixer");
- snd_azf3328_dbgcallleave();
return 0;
}
#endif /* AZF_USE_AC97_LAYER */
snd_azf3328_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params)
{
- int res;
- snd_azf3328_dbgcallenter();
- res = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
- snd_azf3328_dbgcallleave();
- return res;
+ return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
}
static int
snd_azf3328_hw_free(struct snd_pcm_substream *substream)
{
- snd_azf3328_dbgcallenter();
snd_pcm_lib_free_pages(substream);
- snd_azf3328_dbgcallleave();
return 0;
}
u16 val = 0xff00;
u8 freq = 0;
- snd_azf3328_dbgcallenter();
switch (bitrate) {
case AZF_FREQ_4000: freq = SOUNDFORMAT_FREQ_SUSPECTED_4000; break;
case AZF_FREQ_4800: freq = SOUNDFORMAT_FREQ_SUSPECTED_4800; break;
);
spin_unlock_irqrestore(codec->lock, flags);
- snd_azf3328_dbgcallleave();
}
static inline void
unsigned int buffer_bytes
)
{
- snd_azf3328_dbgcallenter();
WARN_ONCE(period_bytes & 1, "odd period length!?\n");
WARN_ONCE(buffer_bytes != 2 * period_bytes,
"missed our input expectations! %u vs. %u\n",
);
spin_unlock_irqrestore(codec->lock, flags);
}
- snd_azf3328_dbgcallleave();
}
static int
unsigned int count = snd_pcm_lib_period_bytes(substream);
#endif
- snd_azf3328_dbgcallenter();
-
codec->dma_base = runtime->dma_addr;
#if 0
snd_azf3328_codec_setdmaa(codec,
runtime->dma_addr, count, size);
#endif
- snd_azf3328_dbgcallleave();
return 0;
}
bool previously_muted = false;
bool is_main_mixer_playback_codec = (AZF_CODEC_PLAYBACK == codec->type);
- snd_azf3328_dbgcalls("snd_azf3328_pcm_trigger cmd %d\n", cmd);
-
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
snd_azf3328_dbgcodec("START %s\n", codec->name);
return -EINVAL;
}
- snd_azf3328_dbgcallleave();
return result;
}
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_azf3328_codec_data *codec = &chip->codecs[codec_type];
- snd_azf3328_dbgcallenter();
codec->substream = substream;
/* same parameters for all our codecs - at least we think so... */
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
&snd_azf3328_hw_constraints_rates);
runtime->private_data = codec;
- snd_azf3328_dbgcallleave();
return 0;
}
struct snd_azf3328_codec_data *codec =
substream->runtime->private_data;
- snd_azf3328_dbgcallenter();
codec->substream = NULL;
- snd_azf3328_dbgcallleave();
return 0;
}
struct snd_pcm *pcm;
int err;
- snd_azf3328_dbgcallenter();
-
err = snd_pcm_new(chip->card, "AZF3328 DSP", AZF_PCMDEV_STD,
1, 1, &pcm);
if (err < 0)
snd_dma_pci_data(chip->pci),
64*1024, 64*1024);
- snd_azf3328_dbgcallleave();
return 0;
}
unsigned long flags;
unsigned int delay;
- snd_azf3328_dbgcallenter();
chip = snd_timer_chip(timer);
delay = ((timer->sticks * seqtimer_scaling) - 1) & TIMER_VALUE_MASK;
if (delay < 49) {
spin_lock_irqsave(&chip->reg_lock, flags);
snd_azf3328_ctrl_outl(chip, IDX_IO_TIMER_VALUE, delay);
spin_unlock_irqrestore(&chip->reg_lock, flags);
- snd_azf3328_dbgcallleave();
return 0;
}
struct snd_azf3328 *chip;
unsigned long flags;
- snd_azf3328_dbgcallenter();
chip = snd_timer_chip(timer);
spin_lock_irqsave(&chip->reg_lock, flags);
/* disable timer countdown and interrupt */
the hardware/ALSA interrupt activity. */
snd_azf3328_ctrl_outb(chip, IDX_IO_TIMER_VALUE + 3, 0x04);
spin_unlock_irqrestore(&chip->reg_lock, flags);
- snd_azf3328_dbgcallleave();
return 0;
}
snd_azf3328_timer_precise_resolution(struct snd_timer *timer,
unsigned long *num, unsigned long *den)
{
- snd_azf3328_dbgcallenter();
*num = 1;
*den = 1024000 / seqtimer_scaling;
- snd_azf3328_dbgcallleave();
return 0;
}
struct snd_timer_id tid;
int err;
- snd_azf3328_dbgcallenter();
tid.dev_class = SNDRV_TIMER_CLASS_CARD;
tid.dev_sclass = SNDRV_TIMER_SCLASS_NONE;
tid.card = chip->card->number;
err = 0;
out:
- snd_azf3328_dbgcallleave();
return err;
}
struct snd_opl3 *opl3;
int err;
- snd_azf3328_dbgcallenter();
if (dev >= SNDRV_CARDS) {
err = -ENODEV;
goto out;
snd_card_free(card);
out:
- snd_azf3328_dbgcallleave();
return err;
}
static void
snd_azf3328_remove(struct pci_dev *pci)
{
- snd_azf3328_dbgcallenter();
snd_card_free(pci_get_drvdata(pci));
- snd_azf3328_dbgcallleave();
}
#ifdef CONFIG_PM_SLEEP