mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-11 20:07:00 +00:00
sound fixes for 3.14
Just two minor bug fixes: a fix for a regression in oxygen driver that was introduced in 3.14-rc1, and a stable fix for the return value of compress offload open callback. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJTKsEsAAoJEGwxgFQ9KSmkOsoQAJ2pCJvX43ZhzO/HOaa7hbRs wTWgMReV46uW3+BfUYNkoI/EHpUx3/DgA7UOTkmQBc837KtoMB9p1/qBMojC33hN 47EeKPz+Ueojki5pENXq84UZeVmRxDADVHiTnKCT86MNtoXoqO3kDLXh9C66ooDb nFlBVEZWh0nJV/T7pw/r9kjxQH1LeJ2L7CclcmZEV+9kPj2WUIpOXimfQIg1JnvY QUmibLpIzY28RCFka3oWuWGWnkN9jhSKez0jdf9v8+LiHgr3LVsuzFQLjIHiGhYj /q+m0UFPxrSYc1ooq2FXjpk+SmqVqZtnBF0bYB10yq25WvzoU2cABX96+mdhM2DY OgTfX0Cfn3xHBwhB605NEf1bpQB27QHkmfeygBVKn/svXTEtXIR+6sF5hBc11hO4 TMdXxAdDYBIwTcu/Aes9YvdxFc+Z8tYXD/pm6OD2oMvB5uMMa4qx6s/enpnC7gvF iLbX/ZnNHzCUYyOX63HwxcLQlo4BrG4T3UHV7T9dG6s3hTzROZau4pWPEqO3h20e xaVVMQYl352YbcMuj7k6AzoqNX3nVh1qjwpXte5vuzNM1zz9XhEqt5wARDtzOPOt mpEZxW+pbx06s18OEb9ooPSy3pwNGluPQX0yPSS6qfG49stFj8LXB5oQbusP9fIP u6H7Sv9E/zLRoF0P2XTj =W9OP -----END PGP SIGNATURE----- Merge tag 'sound-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Just two minor bug fixes: a fix for a regression in oxygen driver that was introduced in 3.14-rc1, and a stable fix for the return value of compress offload open callback" * tag 'sound-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: compress: Pass through return value of open ops callback ALSA: oxygen: Xonar DG(X): fix Stereo Upmixing regression
This commit is contained in:
commit
92f99731e6
sound
@ -133,7 +133,7 @@ static int snd_compr_open(struct inode *inode, struct file *f)
|
||||
kfree(data);
|
||||
}
|
||||
snd_card_unref(compr->card);
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int snd_compr_free(struct inode *inode, struct file *f)
|
||||
|
@ -238,11 +238,21 @@ void set_cs4245_adc_params(struct oxygen *chip,
|
||||
cs4245_write_spi(chip, CS4245_MCLK_FREQ);
|
||||
}
|
||||
|
||||
static inline unsigned int shift_bits(unsigned int value,
|
||||
unsigned int shift_from,
|
||||
unsigned int shift_to,
|
||||
unsigned int mask)
|
||||
{
|
||||
if (shift_from < shift_to)
|
||||
return (value << (shift_to - shift_from)) & mask;
|
||||
else
|
||||
return (value >> (shift_from - shift_to)) & mask;
|
||||
}
|
||||
|
||||
unsigned int adjust_dg_dac_routing(struct oxygen *chip,
|
||||
unsigned int play_routing)
|
||||
{
|
||||
struct dg *data = chip->model_data;
|
||||
unsigned int routing = 0;
|
||||
|
||||
switch (data->output_sel) {
|
||||
case PLAYBACK_DST_HP:
|
||||
@ -252,15 +262,23 @@ unsigned int adjust_dg_dac_routing(struct oxygen *chip,
|
||||
OXYGEN_PLAY_MUTE67, OXYGEN_PLAY_MUTE_MASK);
|
||||
break;
|
||||
case PLAYBACK_DST_MULTICH:
|
||||
routing = (0 << OXYGEN_PLAY_DAC0_SOURCE_SHIFT) |
|
||||
(2 << OXYGEN_PLAY_DAC1_SOURCE_SHIFT) |
|
||||
(1 << OXYGEN_PLAY_DAC2_SOURCE_SHIFT) |
|
||||
(0 << OXYGEN_PLAY_DAC3_SOURCE_SHIFT);
|
||||
oxygen_write8_masked(chip, OXYGEN_PLAY_ROUTING,
|
||||
OXYGEN_PLAY_MUTE01, OXYGEN_PLAY_MUTE_MASK);
|
||||
break;
|
||||
}
|
||||
return routing;
|
||||
return (play_routing & OXYGEN_PLAY_DAC0_SOURCE_MASK) |
|
||||
shift_bits(play_routing,
|
||||
OXYGEN_PLAY_DAC2_SOURCE_SHIFT,
|
||||
OXYGEN_PLAY_DAC1_SOURCE_SHIFT,
|
||||
OXYGEN_PLAY_DAC1_SOURCE_MASK) |
|
||||
shift_bits(play_routing,
|
||||
OXYGEN_PLAY_DAC1_SOURCE_SHIFT,
|
||||
OXYGEN_PLAY_DAC2_SOURCE_SHIFT,
|
||||
OXYGEN_PLAY_DAC2_SOURCE_MASK) |
|
||||
shift_bits(play_routing,
|
||||
OXYGEN_PLAY_DAC0_SOURCE_SHIFT,
|
||||
OXYGEN_PLAY_DAC3_SOURCE_SHIFT,
|
||||
OXYGEN_PLAY_DAC3_SOURCE_MASK);
|
||||
}
|
||||
|
||||
void dump_cs4245_registers(struct oxygen *chip,
|
||||
|
Loading…
x
Reference in New Issue
Block a user