Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232905
b: refs/heads/master
c: 02b6b5b
h: refs/heads/master
i:
  232903: ea17190
v: v3
  • Loading branch information
David Henningsson authored and Takashi Iwai committed Jan 22, 2011
1 parent b71d895 commit a91915b
Show file tree
Hide file tree
Showing 24 changed files with 81 additions and 154 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: efbeb0718126d277c9d7e902eec8da956acf4bd6
refs/heads/master: 02b6b5b640e773eb4d4d0685fa6c1fbc660b2834
5 changes: 1 addition & 4 deletions trunk/sound/atmel/ac97c.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@
#include <linux/dw_dmac.h>

#include <mach/cpu.h>
#include <mach/gpio.h>

#ifdef CONFIG_ARCH_AT91
#include <mach/hardware.h>
#endif
#include <mach/gpio.h>

#include "ac97c.h"

Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/oss/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ifeq ($(CONFIG_PSS_HAVE_BOOT),y)
$(obj)/bin2hex pss_synth < $< > $@
else
$(obj)/pss_boot.h:
$(Q)( \
( \
echo 'static unsigned char * pss_synth = NULL;'; \
echo 'static int pss_synthLen = 0;'; \
) > $@
Expand All @@ -102,7 +102,7 @@ ifeq ($(CONFIG_TRIX_HAVE_BOOT),y)
$(obj)/hex2hex -i trix_boot < $< > $@
else
$(obj)/trix_boot.h:
$(Q)( \
( \
echo 'static unsigned char * trix_boot = NULL;'; \
echo 'static int trix_boot_len = 0;'; \
) > $@
Expand Down
38 changes: 22 additions & 16 deletions trunk/sound/pci/azt3328.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,25 +979,31 @@ snd_azf3328_codec_setfmt(struct snd_azf3328_codec_data *codec,

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;
case AZF_FREQ_5512:
/* the AZF3328 names it "5510" for some strange reason */
freq = SOUNDFORMAT_FREQ_5510; break;
case AZF_FREQ_6620: freq = SOUNDFORMAT_FREQ_6620; break;
case AZF_FREQ_8000: freq = SOUNDFORMAT_FREQ_8000; break;
case AZF_FREQ_9600: freq = SOUNDFORMAT_FREQ_9600; break;
case AZF_FREQ_11025: freq = SOUNDFORMAT_FREQ_11025; break;
case AZF_FREQ_13240: freq = SOUNDFORMAT_FREQ_SUSPECTED_13240; break;
case AZF_FREQ_16000: freq = SOUNDFORMAT_FREQ_16000; break;
case AZF_FREQ_22050: freq = SOUNDFORMAT_FREQ_22050; break;
case AZF_FREQ_32000: freq = SOUNDFORMAT_FREQ_32000; break;
#define AZF_FMT_XLATE(in_freq, out_bits) \
do { \
case AZF_FREQ_ ## in_freq: \
freq = SOUNDFORMAT_FREQ_ ## out_bits; \
break; \
} while (0);
AZF_FMT_XLATE(4000, SUSPECTED_4000)
AZF_FMT_XLATE(4800, SUSPECTED_4800)
/* the AZF3328 names it "5510" for some strange reason: */
AZF_FMT_XLATE(5512, 5510)
AZF_FMT_XLATE(6620, 6620)
AZF_FMT_XLATE(8000, 8000)
AZF_FMT_XLATE(9600, 9600)
AZF_FMT_XLATE(11025, 11025)
AZF_FMT_XLATE(13240, SUSPECTED_13240)
AZF_FMT_XLATE(16000, 16000)
AZF_FMT_XLATE(22050, 22050)
AZF_FMT_XLATE(32000, 32000)
default:
snd_printk(KERN_WARNING "unknown bitrate %d, assuming 44.1kHz!\n", bitrate);
/* fall-through */
case AZF_FREQ_44100: freq = SOUNDFORMAT_FREQ_44100; break;
case AZF_FREQ_48000: freq = SOUNDFORMAT_FREQ_48000; break;
case AZF_FREQ_66200: freq = SOUNDFORMAT_FREQ_SUSPECTED_66200; break;
AZF_FMT_XLATE(44100, 44100)
AZF_FMT_XLATE(48000, 48000)
AZF_FMT_XLATE(66200, SUSPECTED_66200)
#undef AZF_FMT_XLATE
}
/* val = 0xff07; 3m27.993s (65301Hz; -> 64000Hz???) hmm, 66120, 65967, 66123 */
/* val = 0xff09; 17m15.098s (13123,478Hz; -> 12000Hz???) hmm, 13237.2Hz? */
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/pci/hda/hda_eld.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ static void hdmi_show_short_audio_desc(struct cea_sad *a)
snd_print_pcm_rates(a->rates, buf, sizeof(buf));

if (a->format == AUDIO_CODING_TYPE_LPCM)
snd_print_pcm_bits(a->sample_bits, buf2 + 8, sizeof(buf2) - 8);
snd_print_pcm_bits(a->sample_bits, buf2 + 8, sizeof(buf2 - 8));
else if (a->max_bitrate)
snprintf(buf2, sizeof(buf2),
", max bitrate = %d", a->max_bitrate);
Expand Down
81 changes: 23 additions & 58 deletions trunk/sound/pci/hda/patch_conexant.c
Original file line number Diff line number Diff line change
Expand Up @@ -2387,79 +2387,53 @@ static void cxt5066_hp_automute(struct hda_codec *codec)
cxt5066_update_speaker(codec);
}

/* unsolicited event for jack sensing */
static void cxt5066_olpc_unsol_event(struct hda_codec *codec, unsigned int res)
/* Dispatch the right mic autoswitch function */
static void cxt5066_automic(struct hda_codec *codec)
{
struct conexant_spec *spec = codec->spec;
snd_printdd("CXT5066: unsol event %x (%x)\n", res, res >> 26);
switch (res >> 26) {
case CONEXANT_HP_EVENT:
cxt5066_hp_automute(codec);
break;
case CONEXANT_MIC_EVENT:
/* ignore mic events in DC mode; we're always using the jack */
if (!spec->dc_enable)
cxt5066_olpc_automic(codec);
break;
}
}

/* unsolicited event for jack sensing */
static void cxt5066_vostro_event(struct hda_codec *codec, unsigned int res)
{
snd_printdd("CXT5066_vostro: unsol event %x (%x)\n", res, res >> 26);
switch (res >> 26) {
case CONEXANT_HP_EVENT:
cxt5066_hp_automute(codec);
break;
case CONEXANT_MIC_EVENT:
if (spec->dell_vostro)
cxt5066_vostro_automic(codec);
break;
}
}

/* unsolicited event for jack sensing */
static void cxt5066_ideapad_event(struct hda_codec *codec, unsigned int res)
{
snd_printdd("CXT5066_ideapad: unsol event %x (%x)\n", res, res >> 26);
switch (res >> 26) {
case CONEXANT_HP_EVENT:
cxt5066_hp_automute(codec);
break;
case CONEXANT_MIC_EVENT:
else if (spec->ideapad)
cxt5066_ideapad_automic(codec);
break;
}
else if (spec->thinkpad)
cxt5066_thinkpad_automic(codec);
else if (spec->hp_laptop)
cxt5066_hp_laptop_automic(codec);
}

/* unsolicited event for jack sensing */
static void cxt5066_hp_laptop_event(struct hda_codec *codec, unsigned int res)
static void cxt5066_olpc_unsol_event(struct hda_codec *codec, unsigned int res)
{
snd_printdd("CXT5066_hp_laptop: unsol event %x (%x)\n", res, res >> 26);
struct conexant_spec *spec = codec->spec;
snd_printdd("CXT5066: unsol event %x (%x)\n", res, res >> 26);
switch (res >> 26) {
case CONEXANT_HP_EVENT:
cxt5066_hp_automute(codec);
break;
case CONEXANT_MIC_EVENT:
cxt5066_hp_laptop_automic(codec);
/* ignore mic events in DC mode; we're always using the jack */
if (!spec->dc_enable)
cxt5066_olpc_automic(codec);
break;
}
}

/* unsolicited event for jack sensing */
static void cxt5066_thinkpad_event(struct hda_codec *codec, unsigned int res)
static void cxt5066_unsol_event(struct hda_codec *codec, unsigned int res)
{
snd_printdd("CXT5066_thinkpad: unsol event %x (%x)\n", res, res >> 26);
snd_printdd("CXT5066: unsol event %x (%x)\n", res, res >> 26);
switch (res >> 26) {
case CONEXANT_HP_EVENT:
cxt5066_hp_automute(codec);
break;
case CONEXANT_MIC_EVENT:
cxt5066_thinkpad_automic(codec);
cxt5066_automic(codec);
break;
}
}


static const struct hda_input_mux cxt5066_analog_mic_boost = {
.num_items = 5,
.items = {
Expand Down Expand Up @@ -3039,20 +3013,11 @@ static struct hda_verb cxt5066_init_verbs_hp_laptop[] = {
/* initialize jack-sensing, too */
static int cxt5066_init(struct hda_codec *codec)
{
struct conexant_spec *spec = codec->spec;

snd_printdd("CXT5066: init\n");
conexant_init(codec);
if (codec->patch_ops.unsol_event) {
cxt5066_hp_automute(codec);
if (spec->dell_vostro)
cxt5066_vostro_automic(codec);
else if (spec->ideapad)
cxt5066_ideapad_automic(codec);
else if (spec->thinkpad)
cxt5066_thinkpad_automic(codec);
else if (spec->hp_laptop)
cxt5066_hp_laptop_automic(codec);
cxt5066_automic(codec);
}
cxt5066_set_mic_boost(codec);
return 0;
Expand Down Expand Up @@ -3169,7 +3134,7 @@ static int patch_cxt5066(struct hda_codec *codec)
break;
case CXT5066_HP_LAPTOP:
codec->patch_ops.init = cxt5066_init;
codec->patch_ops.unsol_event = cxt5066_hp_laptop_event;
codec->patch_ops.unsol_event = cxt5066_unsol_event;
spec->init_verbs[spec->num_init_verbs] =
cxt5066_init_verbs_hp_laptop;
spec->num_init_verbs++;
Expand Down Expand Up @@ -3207,7 +3172,7 @@ static int patch_cxt5066(struct hda_codec *codec)
break;
case CXT5066_DELL_VOSTRO:
codec->patch_ops.init = cxt5066_init;
codec->patch_ops.unsol_event = cxt5066_vostro_event;
codec->patch_ops.unsol_event = cxt5066_unsol_event;
spec->init_verbs[0] = cxt5066_init_verbs_vostro;
spec->mixers[spec->num_mixers++] = cxt5066_mixer_master_olpc;
spec->mixers[spec->num_mixers++] = cxt5066_mixers;
Expand All @@ -3224,7 +3189,7 @@ static int patch_cxt5066(struct hda_codec *codec)
break;
case CXT5066_IDEAPAD:
codec->patch_ops.init = cxt5066_init;
codec->patch_ops.unsol_event = cxt5066_ideapad_event;
codec->patch_ops.unsol_event = cxt5066_unsol_event;
spec->mixers[spec->num_mixers++] = cxt5066_mixer_master;
spec->mixers[spec->num_mixers++] = cxt5066_mixers;
spec->init_verbs[0] = cxt5066_init_verbs_ideapad;
Expand All @@ -3240,7 +3205,7 @@ static int patch_cxt5066(struct hda_codec *codec)
break;
case CXT5066_THINKPAD:
codec->patch_ops.init = cxt5066_init;
codec->patch_ops.unsol_event = cxt5066_thinkpad_event;
codec->patch_ops.unsol_event = cxt5066_unsol_event;
spec->mixers[spec->num_mixers++] = cxt5066_mixer_master;
spec->mixers[spec->num_mixers++] = cxt5066_mixers;
spec->init_verbs[0] = cxt5066_init_verbs_thinkpad;
Expand Down
6 changes: 2 additions & 4 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -14954,11 +14954,9 @@ static struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE),
SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE),
SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
{}
Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/pci/oxygen/oxygen.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ struct oxygen_model {
void (*update_dac_volume)(struct oxygen *chip);
void (*update_dac_mute)(struct oxygen *chip);
void (*update_center_lfe_mix)(struct oxygen *chip, bool mixed);
unsigned int (*adjust_dac_routing)(struct oxygen *chip,
unsigned int play_routing);
void (*gpio_changed)(struct oxygen *chip);
void (*uart_input)(struct oxygen *chip);
void (*ac97_switch)(struct oxygen *chip,
Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/pci/oxygen/oxygen_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ void oxygen_update_dac_routing(struct oxygen *chip)
(1 << OXYGEN_PLAY_DAC1_SOURCE_SHIFT) |
(2 << OXYGEN_PLAY_DAC2_SOURCE_SHIFT) |
(3 << OXYGEN_PLAY_DAC3_SOURCE_SHIFT);
if (chip->model.adjust_dac_routing)
reg_value = chip->model.adjust_dac_routing(chip, reg_value);
oxygen_write16_masked(chip, OXYGEN_PLAY_ROUTING, reg_value,
OXYGEN_PLAY_DAC0_SOURCE_MASK |
OXYGEN_PLAY_DAC1_SOURCE_MASK |
Expand Down
36 changes: 0 additions & 36 deletions trunk/sound/pci/oxygen/xonar_dg.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
*
* SPI 0 -> CS4245
*
* I²S 1 -> CS4245
* I²S 2 -> CS4361 (center/LFE)
* I²S 3 -> CS4361 (surround)
* I²S 4 -> CS4361 (front)
*
* GPIO 3 <- ?
* GPIO 4 <- headphone detect
* GPIO 5 -> route input jack to line-in (0) or mic-in (1)
Expand All @@ -41,7 +36,6 @@
* input 1 <- aux
* input 2 <- front mic
* input 4 <- line/mic
* DAC out -> headphones
* aux out -> front panel headphones
*/

Expand Down Expand Up @@ -213,35 +207,6 @@ static void set_cs4245_adc_params(struct oxygen *chip,
cs4245_write_cached(chip, CS4245_ADC_CTRL, value);
}

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;
}

static unsigned int adjust_dg_dac_routing(struct oxygen *chip,
unsigned int play_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);
}

static int output_switch_info(struct snd_kcontrol *ctl,
struct snd_ctl_elem_info *info)
{
Expand Down Expand Up @@ -592,7 +557,6 @@ struct oxygen_model model_xonar_dg = {
.resume = dg_resume,
.set_dac_params = set_cs4245_dac_params,
.set_adc_params = set_cs4245_adc_params,
.adjust_dac_routing = adjust_dg_dac_routing,
.dump_registers = dump_cs4245_registers,
.model_data_size = sizeof(struct dg),
.device_config = PLAYBACK_0_TO_I2S |
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/atmel/snd-soc-afeb9260.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static struct snd_soc_dai_link afeb9260_dai = {
.cpu_dai_name = "atmel-ssc-dai.0",
.codec_dai_name = "tlv320aic23-hifi",
.platform_name = "atmel_pcm-audio",
.codec_name = "tlv320aic23-codec.0-001a",
.codec_name = "tlv320aic23-codec.0-0x1a",
.init = afeb9260_tlv320aic23_init,
.ops = &afeb9260_ops,
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/blackfin/bf5xx-ssm2602.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static struct snd_soc_dai_link bf5xx_ssm2602_dai = {
.cpu_dai_name = "bf5xx-i2s",
.codec_dai_name = "ssm2602-hifi",
.platform_name = "bf5xx-pcm-audio",
.codec_name = "ssm2602-codec.0-001b",
.codec_name = "ssm2602-codec.0-0x1b",
.ops = &bf5xx_ssm2602_ops,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -2386,7 +2386,7 @@ static int wm8994_set_tristate(struct snd_soc_dai *codec_dai, int tristate)
else
val = 0;

return snd_soc_update_bits(codec, reg, mask, val);
return snd_soc_update_bits(codec, reg, mask, reg);
}

#define WM8994_RATES SNDRV_PCM_RATE_8000_96000
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/codecs/wm8995.c
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ static int wm8995_set_tristate(struct snd_soc_dai *codec_dai, int tristate)
else
val = 0;

return snd_soc_update_bits(codec, reg, mask, val);
return snd_soc_update_bits(codec, reg, mask, reg);
}

/* The size in bits of the FLL divide multiplied by 10
Expand Down
Loading

0 comments on commit a91915b

Please sign in to comment.