Skip to content

Commit

Permalink
Merge branch 'fix/hda' into topic/hda
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Iwai committed Oct 6, 2011
2 parents 0650367 + 798cb7e commit 97999e2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
9 changes: 5 additions & 4 deletions sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2032,7 +2032,8 @@ static unsigned int azx_via_get_position(struct azx *chip,
}

static unsigned int azx_get_position(struct azx *chip,
struct azx_dev *azx_dev)
struct azx_dev *azx_dev,
bool with_check)
{
unsigned int pos;
int stream = azx_dev->substream->stream;
Expand All @@ -2048,7 +2049,7 @@ static unsigned int azx_get_position(struct azx *chip,
default:
/* use the position buffer */
pos = le32_to_cpu(*azx_dev->posbuf);
if (chip->position_fix[stream] == POS_FIX_AUTO) {
if (with_check && chip->position_fix[stream] == POS_FIX_AUTO) {
if (!pos || pos == (u32)-1) {
printk(KERN_WARNING
"hda-intel: Invalid position buffer, "
Expand All @@ -2072,7 +2073,7 @@ static snd_pcm_uframes_t azx_pcm_pointer(struct snd_pcm_substream *substream)
struct azx *chip = apcm->chip;
struct azx_dev *azx_dev = get_azx_dev(substream);
return bytes_to_frames(substream->runtime,
azx_get_position(chip, azx_dev));
azx_get_position(chip, azx_dev, false));
}

/*
Expand All @@ -2095,7 +2096,7 @@ static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev)
return -1; /* bogus (too early) interrupt */

stream = azx_dev->substream->stream;
pos = azx_get_position(chip, azx_dev);
pos = azx_get_position(chip, azx_dev, true);

if (WARN_ONCE(!azx_dev->period_bytes,
"hda-intel: zero azx_dev->period_bytes"))
Expand Down
3 changes: 2 additions & 1 deletion sound/soc/codecs/ssm2602.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,8 @@ static int ssm2602_set_dai_fmt(struct snd_soc_dai *codec_dai,
static int ssm2602_set_bias_level(struct snd_soc_codec *codec,
enum snd_soc_bias_level level)
{
u16 reg = snd_soc_read(codec, SSM2602_PWR) & 0xff7f;
u16 reg = snd_soc_read(codec, SSM2602_PWR);
reg &= ~(PWR_POWER_OFF | PWR_OSC_PDN);

switch (level) {
case SND_SOC_BIAS_ON:
Expand Down
6 changes: 6 additions & 0 deletions sound/soc/omap/omap-mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,12 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs;
int err = 0;

if (mcbsp_data->active)
if (freq == mcbsp_data->in_freq)
return 0;
else
return -EBUSY;

/* The McBSP signal muxing functions are only available on McBSP1 */
if (clk_id == OMAP_MCBSP_CLKR_SRC_CLKR ||
clk_id == OMAP_MCBSP_CLKR_SRC_CLKX ||
Expand Down
8 changes: 5 additions & 3 deletions sound/usb/card.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,11 @@ snd_usb_audio_probe(struct usb_device *dev,
return chip;

__error:
if (chip && !chip->num_interfaces)
snd_card_free(chip->card);
chip->probing = 0;
if (chip) {
if (!chip->num_interfaces)
snd_card_free(chip->card);
chip->probing = 0;
}
mutex_unlock(&register_mutex);
__err_val:
return NULL;
Expand Down

0 comments on commit 97999e2

Please sign in to comment.