Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348747
b: refs/heads/master
c: 7110a28
h: refs/heads/master
i:
  348745: 2d300af
  348743: 19d145f
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Dec 24, 2012
1 parent 9e8b1cc commit dad85e5
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 113 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: 065380f0880dd651eb405430745926dc4747b759
refs/heads/master: 7110a287ff2b1f3780905d1686a1a4edccb95133
5 changes: 0 additions & 5 deletions trunk/sound/oss/pas2_card.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,6 @@ static void __init attach_pas_card(struct address_info *hw_config)
{
char temp[100];

if (pas_model < 0 ||
pas_model >= ARRAY_SIZE(pas_model_names)) {
printk(KERN_ERR "pas2 unrecognized model.\n");
return;
}
sprintf(temp,
"%s rev %d", pas_model_names[(int) pas_model],
pas_read(0x2789));
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/pci/au88x0/au88x0_synth.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static void vortex_wt_setdsout(vortex_t * vortex, u32 wt, int en)
if (en)
temp |= (1 << (wt & 0x1f));
else
temp &= ~(1 << (wt & 0x1f));
temp &= (1 << ~(wt & 0x1f));
hwwrite(vortex->mmio, WT_DSREG((wt >= 0x20) ? 1 : 0), temp);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2531,7 +2531,7 @@ static int vmaster_mute_mode_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
static const char * const texts[] = {
"On", "Off", "Follow Master"
"Off", "On", "Follow Master"
};
unsigned int index;

Expand Down
13 changes: 5 additions & 8 deletions trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,12 +573,9 @@ enum {
#define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */

/* quirks for Intel PCH */
#define AZX_DCAPS_INTEL_PCH_NOPM \
(AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_BUFSIZE | \
AZX_DCAPS_COUNT_LPIB_DELAY)

#define AZX_DCAPS_INTEL_PCH \
(AZX_DCAPS_INTEL_PCH_NOPM | AZX_DCAPS_PM_RUNTIME)
(AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_BUFSIZE | \
AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_PM_RUNTIME)

/* quirks for ATI SB / AMD Hudson */
#define AZX_DCAPS_PRESET_ATI_SB \
Expand Down Expand Up @@ -3589,13 +3586,13 @@ static void azx_remove(struct pci_dev *pci)
static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
/* CPT */
{ PCI_DEVICE(0x8086, 0x1c20),
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM },
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
/* PBG */
{ PCI_DEVICE(0x8086, 0x1d20),
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM },
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
/* Panther Point */
{ PCI_DEVICE(0x8086, 0x1e20),
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM },
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
/* Lynx Point */
{ PCI_DEVICE(0x8086, 0x8c20),
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
Expand Down
16 changes: 16 additions & 0 deletions trunk/sound/pci/hda/patch_conexant.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,12 +558,24 @@ static int conexant_build_controls(struct hda_codec *codec)
return 0;
}

#ifdef CONFIG_PM
static int conexant_suspend(struct hda_codec *codec)
{
snd_hda_shutup_pins(codec);
return 0;
}
#endif

static const struct hda_codec_ops conexant_patch_ops = {
.build_controls = conexant_build_controls,
.build_pcms = conexant_build_pcms,
.init = conexant_init,
.free = conexant_free,
.set_power_state = conexant_set_power,
#ifdef CONFIG_PM
.suspend = conexant_suspend,
#endif
.reboot_notify = snd_hda_shutup_pins,
};

#ifdef CONFIG_SND_HDA_INPUT_BEEP
Expand Down Expand Up @@ -4393,6 +4405,10 @@ static const struct hda_codec_ops cx_auto_patch_ops = {
.init = cx_auto_init,
.free = conexant_free,
.unsol_event = snd_hda_jack_unsol_event,
#ifdef CONFIG_PM
.suspend = conexant_suspend,
#endif
.reboot_notify = snd_hda_shutup_pins,
};

/*
Expand Down
54 changes: 1 addition & 53 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -5817,9 +5817,6 @@ enum {
ALC269_TYPE_ALC269VB,
ALC269_TYPE_ALC269VC,
ALC269_TYPE_ALC269VD,
ALC269_TYPE_ALC280,
ALC269_TYPE_ALC282,
ALC269_TYPE_ALC284,
};

/*
Expand All @@ -5836,13 +5833,10 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
switch (spec->codec_variant) {
case ALC269_TYPE_ALC269VA:
case ALC269_TYPE_ALC269VC:
case ALC269_TYPE_ALC280:
case ALC269_TYPE_ALC284:
ssids = alc269va_ssids;
break;
case ALC269_TYPE_ALC269VB:
case ALC269_TYPE_ALC269VD:
case ALC269_TYPE_ALC282:
ssids = alc269_ssids;
break;
default:
Expand Down Expand Up @@ -5998,30 +5992,6 @@ static void alc269_fixup_quanta_mute(struct hda_codec *codec,
spec->automute_hook = alc269_quanta_automute;
}

/* update mute-LED according to the speaker mute state via mic1 VREF pin */
static void alc269_fixup_mic1_mute_hook(void *private_data, int enabled)
{
struct hda_codec *codec = private_data;
unsigned int pinval = AC_PINCTL_IN_EN + (enabled ?
AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80);
snd_hda_set_pin_ctl_cache(codec, 0x18, pinval);
}

static void alc269_fixup_mic1_mute(struct hda_codec *codec,
const struct alc_fixup *fix, int action)
{
struct alc_spec *spec = codec->spec;
switch (action) {
case ALC_FIXUP_ACT_BUILD:
spec->vmaster_mute.hook = alc269_fixup_mic1_mute_hook;
snd_hda_add_vmaster_hook(codec, &spec->vmaster_mute, true);
/* fallthru */
case ALC_FIXUP_ACT_INIT:
snd_hda_sync_vmaster_hook(&spec->vmaster_mute);
break;
}
}

/* update mute-LED according to the speaker mute state via mic2 VREF pin */
static void alc269_fixup_mic2_mute_hook(void *private_data, int enabled)
{
Expand Down Expand Up @@ -6073,7 +6043,6 @@ enum {
ALC269_FIXUP_DMIC,
ALC269VB_FIXUP_AMIC,
ALC269VB_FIXUP_DMIC,
ALC269_FIXUP_MIC1_MUTE_LED,
ALC269_FIXUP_MIC2_MUTE_LED,
ALC269_FIXUP_INV_DMIC,
ALC269_FIXUP_LENOVO_DOCK,
Expand Down Expand Up @@ -6202,10 +6171,6 @@ static const struct alc_fixup alc269_fixups[] = {
{ }
},
},
[ALC269_FIXUP_MIC1_MUTE_LED] = {
.type = ALC_FIXUP_FUNC,
.v.func = alc269_fixup_mic1_mute,
},
[ALC269_FIXUP_MIC2_MUTE_LED] = {
.type = ALC_FIXUP_FUNC,
.v.func = alc269_fixup_mic2_mute,
Expand Down Expand Up @@ -6250,7 +6215,6 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC),
SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC),
SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_MIC2_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x1972, "HP Pavilion 17", ALC269_FIXUP_MIC1_MUTE_LED),
SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_DMIC),
SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_DMIC),
SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
Expand Down Expand Up @@ -6406,8 +6370,7 @@ static int patch_alc269(struct hda_codec *codec)

alc_auto_parse_customize_define(codec);

switch (codec->vendor_id) {
case 0x10ec0269:
if (codec->vendor_id == 0x10ec0269) {
spec->codec_variant = ALC269_TYPE_ALC269VA;
switch (alc_get_coef0(codec) & 0x00f0) {
case 0x0010:
Expand All @@ -6432,20 +6395,6 @@ static int patch_alc269(struct hda_codec *codec)
goto error;
spec->init_hook = alc269_fill_coef;
alc269_fill_coef(codec);
break;

case 0x10ec0280:
case 0x10ec0290:
spec->codec_variant = ALC269_TYPE_ALC280;
break;
case 0x10ec0282:
case 0x10ec0283:
spec->codec_variant = ALC269_TYPE_ALC282;
break;
case 0x10ec0284:
case 0x10ec0292:
spec->codec_variant = ALC269_TYPE_ALC284;
break;
}

/* automatic parse from the BIOS config */
Expand Down Expand Up @@ -7150,7 +7099,6 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = {
{ .id = 0x10ec0280, .name = "ALC280", .patch = patch_alc269 },
{ .id = 0x10ec0282, .name = "ALC282", .patch = patch_alc269 },
{ .id = 0x10ec0283, .name = "ALC283", .patch = patch_alc269 },
{ .id = 0x10ec0284, .name = "ALC284", .patch = patch_alc269 },
{ .id = 0x10ec0290, .name = "ALC290", .patch = patch_alc269 },
{ .id = 0x10ec0292, .name = "ALC292", .patch = patch_alc269 },
{ .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660",
Expand Down
17 changes: 5 additions & 12 deletions trunk/sound/pci/rme9652/hdspm.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ MODULE_SUPPORTED_DEVICE("{{RME HDSPM-MADI}}");
*/
/* status */
#define HDSPM_AES32_wcLock 0x0200000
#define HDSPM_AES32_wcSync 0x0100000
#define HDSPM_AES32_wcFreq_bit 22
/* (status >> HDSPM_AES32_wcFreq_bit) & 0xF gives WC frequency (cf function
HDSPM_bit2freq */
Expand Down Expand Up @@ -3468,12 +3467,10 @@ static int hdspm_wc_sync_check(struct hdspm *hdspm)
switch (hdspm->io_type) {
case AES32:
status = hdspm_read(hdspm, HDSPM_statusRegister);
if (status & HDSPM_AES32_wcLock) {
if (status & HDSPM_AES32_wcSync)
return 2;
else
return 1;
}
if (status & HDSPM_wcSync)
return 2;
else if (status & HDSPM_wcLock)
return 1;
return 0;
break;

Expand Down Expand Up @@ -4661,7 +4658,6 @@ snd_hdspm_proc_read_aes32(struct snd_info_entry * entry,
unsigned int status;
unsigned int status2;
unsigned int timecode;
unsigned int wcLock, wcSync;
int pref_syncref;
char *autosync_ref;
int x;
Expand Down Expand Up @@ -4755,11 +4751,8 @@ snd_hdspm_proc_read_aes32(struct snd_info_entry * entry,

snd_iprintf(buffer, "--- Status:\n");

wcLock = status & HDSPM_AES32_wcLock;
wcSync = wcLock && (status & HDSPM_AES32_wcSync);

snd_iprintf(buffer, "Word: %s Frequency: %d\n",
(wcLock) ? (wcSync ? "Sync " : "Lock ") : "No Lock",
(status & HDSPM_AES32_wcLock) ? "Sync " : "No Lock",
HDSPM_bit2freq((status >> HDSPM_AES32_wcFreq_bit) & 0xF));

for (x = 0; x < 8; x++) {
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/soc/codecs/arizona.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,8 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
snd_soc_update_bits(codec, ARIZONA_ASYNC_SAMPLE_RATE_1,
ARIZONA_ASYNC_SAMPLE_RATE_MASK, sr_val);
snd_soc_update_bits(codec, base + ARIZONA_AIF_RATE_CTRL,
ARIZONA_AIF1_RATE_MASK, 8);
ARIZONA_AIF1_RATE_MASK,
8 << ARIZONA_AIF1_RATE_SHIFT);
break;
default:
arizona_aif_err(dai, "Invalid clock %d\n", dai_priv->clk);
Expand Down
4 changes: 4 additions & 0 deletions trunk/sound/usb/midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2181,6 +2181,10 @@ int snd_usbmidi_create(struct snd_card *card,
umidi->usb_protocol_ops = &snd_usbmidi_novation_ops;
err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
break;
case QUIRK_MIDI_MBOX2:
umidi->usb_protocol_ops = &snd_usbmidi_midiman_ops;
err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
break;
case QUIRK_MIDI_RAW_BYTES:
umidi->usb_protocol_ops = &snd_usbmidi_raw_ops;
/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/usb/mixer_quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ static int snd_c400_create_mixer(struct usb_mixer_interface *mixer)
* are valid they presents mono controls as L and R channels of
* stereo. So we provide a good mixer here.
*/
static struct std_mono_table ebox44_table[] = {
struct std_mono_table ebox44_table[] = {
{
.unitid = 4,
.control = 1,
Expand Down
24 changes: 1 addition & 23 deletions trunk/sound/usb/quirks-table.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,6 @@
}
},

{
/* Creative BT-D1 */
USB_DEVICE(0x041e, 0x0005),
.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
.ifnum = 1,
.type = QUIRK_AUDIO_FIXED_ENDPOINT,
.data = &(const struct audioformat) {
.formats = SNDRV_PCM_FMTBIT_S16_LE,
.channels = 2,
.iface = 1,
.altsetting = 1,
.altset_idx = 1,
.endpoint = 0x03,
.ep_attr = USB_ENDPOINT_XFER_ISOC,
.attributes = 0,
.rates = SNDRV_PCM_RATE_CONTINUOUS,
.rate_min = 48000,
.rate_max = 48000,
}
}
},

/* Creative/Toshiba Multimedia Center SB-0500 */
{
USB_DEVICE(0x041e, 0x3048),
Expand Down Expand Up @@ -3015,7 +2993,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
},
{
.ifnum = 6,
.type = QUIRK_MIDI_MIDIMAN,
.type = QUIRK_MIDI_MBOX2,
.data = &(const struct snd_usb_midi_endpoint_info) {
.out_ep = 0x02,
.out_cables = 0x0001,
Expand Down
16 changes: 9 additions & 7 deletions trunk/sound/usb/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ int snd_usb_create_quirk(struct snd_usb_audio *chip,
[QUIRK_MIDI_YAMAHA] = create_any_midi_quirk,
[QUIRK_MIDI_MIDIMAN] = create_any_midi_quirk,
[QUIRK_MIDI_NOVATION] = create_any_midi_quirk,
[QUIRK_MIDI_MBOX2] = create_any_midi_quirk,
[QUIRK_MIDI_RAW_BYTES] = create_any_midi_quirk,
[QUIRK_MIDI_EMAGIC] = create_any_midi_quirk,
[QUIRK_MIDI_CME] = create_any_midi_quirk,
Expand Down Expand Up @@ -527,11 +528,11 @@ static void mbox2_setup_48_24_magic(struct usb_device *dev)
#define MBOX2_BOOT_LOADING 0x01 /* Hard coded into the device */
#define MBOX2_BOOT_READY 0x02 /* Hard coded into the device */

static int snd_usb_mbox2_boot_quirk(struct usb_device *dev)
int snd_usb_mbox2_boot_quirk(struct usb_device *dev)
{
struct usb_host_config *config = dev->actconfig;
int err;
u8 bootresponse[12];
u8 bootresponse;
int fwsize;
int count;

Expand All @@ -545,20 +546,20 @@ static int snd_usb_mbox2_boot_quirk(struct usb_device *dev)
snd_printd("usb-audio: Sending Digidesign Mbox 2 boot sequence...\n");

count = 0;
bootresponse[0] = MBOX2_BOOT_LOADING;
while ((bootresponse[0] == MBOX2_BOOT_LOADING) && (count < 10)) {
bootresponse = MBOX2_BOOT_LOADING;
while ((bootresponse == MBOX2_BOOT_LOADING) && (count < 10)) {
msleep(500); /* 0.5 second delay */
snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0),
/* Control magic - load onboard firmware */
0x85, 0xc0, 0x0001, 0x0000, &bootresponse, 0x0012);
if (bootresponse[0] == MBOX2_BOOT_READY)
if (bootresponse == MBOX2_BOOT_READY)
break;
snd_printd("usb-audio: device not ready, resending boot sequence...\n");
count++;
}

if (bootresponse[0] != MBOX2_BOOT_READY) {
snd_printk(KERN_ERR "usb-audio: Unknown bootresponse=%d, or timed out, ignoring device.\n", bootresponse[0]);
if (bootresponse != MBOX2_BOOT_READY) {
snd_printk(KERN_ERR "usb-audio: Unknown bootresponse=%d, or timed out, ignoring device.\n", bootresponse);
return -ENODEV;
}

Expand Down Expand Up @@ -659,6 +660,7 @@ static int audiophile_skip_setting_quirk(struct snd_usb_audio *chip,
return 0; /* keep this altsetting */
}


static int fasttrackpro_skip_setting_quirk(struct snd_usb_audio *chip,
int iface, int altno)
{
Expand Down
Loading

0 comments on commit dad85e5

Please sign in to comment.