aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen_pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/oxygen/oxygen_pcm.c')
-rw-r--r--sound/pci/oxygen/oxygen_pcm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/oxygen/oxygen_pcm.c b/sound/pci/oxygen/oxygen_pcm.c
index ef2345d82b86..1e98333366df 100644
--- a/sound/pci/oxygen/oxygen_pcm.c
+++ b/sound/pci/oxygen/oxygen_pcm.c
@@ -435,6 +435,7 @@ static int oxygen_spdif_hw_params(struct snd_pcm_substream *substream,
435 if (err < 0) 435 if (err < 0)
436 return err; 436 return err;
437 437
438 mutex_lock(&chip->mutex);
438 spin_lock_irq(&chip->reg_lock); 439 spin_lock_irq(&chip->reg_lock);
439 oxygen_clear_bits32(chip, OXYGEN_SPDIF_CONTROL, 440 oxygen_clear_bits32(chip, OXYGEN_SPDIF_CONTROL,
440 OXYGEN_SPDIF_OUT_ENABLE); 441 OXYGEN_SPDIF_OUT_ENABLE);
@@ -446,6 +447,7 @@ static int oxygen_spdif_hw_params(struct snd_pcm_substream *substream,
446 OXYGEN_SPDIF_OUT_RATE_MASK); 447 OXYGEN_SPDIF_OUT_RATE_MASK);
447 oxygen_update_spdif_source(chip); 448 oxygen_update_spdif_source(chip);
448 spin_unlock_irq(&chip->reg_lock); 449 spin_unlock_irq(&chip->reg_lock);
450 mutex_unlock(&chip->mutex);
449 return 0; 451 return 0;
450} 452}
451 453
@@ -459,6 +461,7 @@ static int oxygen_multich_hw_params(struct snd_pcm_substream *substream,
459 if (err < 0) 461 if (err < 0)
460 return err; 462 return err;
461 463
464 mutex_lock(&chip->mutex);
462 spin_lock_irq(&chip->reg_lock); 465 spin_lock_irq(&chip->reg_lock);
463 oxygen_write8_masked(chip, OXYGEN_PLAY_CHANNELS, 466 oxygen_write8_masked(chip, OXYGEN_PLAY_CHANNELS,
464 oxygen_play_channels(hw_params), 467 oxygen_play_channels(hw_params),
@@ -475,12 +478,11 @@ static int oxygen_multich_hw_params(struct snd_pcm_substream *substream,
475 OXYGEN_I2S_FORMAT_MASK | 478 OXYGEN_I2S_FORMAT_MASK |
476 OXYGEN_I2S_MCLK_MASK | 479 OXYGEN_I2S_MCLK_MASK |
477 OXYGEN_I2S_BITS_MASK); 480 OXYGEN_I2S_BITS_MASK);
478 oxygen_update_dac_routing(chip);
479 oxygen_update_spdif_source(chip); 481 oxygen_update_spdif_source(chip);
480 spin_unlock_irq(&chip->reg_lock); 482 spin_unlock_irq(&chip->reg_lock);
481 483
482 mutex_lock(&chip->mutex);
483 chip->model.set_dac_params(chip, hw_params); 484 chip->model.set_dac_params(chip, hw_params);
485 oxygen_update_dac_routing(chip);
484 mutex_unlock(&chip->mutex); 486 mutex_unlock(&chip->mutex);
485 return 0; 487 return 0;
486} 488}