From c9280d681c4093405fc896dc25f81d5ff9de8183 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 15 Jan 2009 17:31:00 +0100 Subject: ALSA: hda - Fix (yet more) STAC925x issues The codec-parsing of STAC925x was utterly broken due to its unique design unlike other STAC codecs. It has a volume control only in NID 0x0e (similar as STAC9200), but the parser assumes that the amp is available on each DAC widget. The patch fixes the whole wrong stories: fix the initial volume, assign the fixed "Master" volume, and avoid to create wrong volume controls. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'sound') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index c39deebb588..faef1ca8660 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -885,8 +885,8 @@ static struct hda_verb stac92hd71bxx_analog_core_init[] = { static struct hda_verb stac925x_core_init[] = { /* set dac0mux for dac converter */ { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00}, - /* unmute and set max the selector */ - { 0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0xb01f }, + /* mute the master volume */ + { 0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, {} }; @@ -1138,6 +1138,8 @@ static struct snd_kcontrol_new stac92hd71bxx_mixer[] = { }; static struct snd_kcontrol_new stac925x_mixer[] = { + HDA_CODEC_VOLUME("Master Playback Volume", 0x0e, 0, HDA_OUTPUT), + HDA_CODEC_MUTE("Master Playback Switch", 0x0e, 0, HDA_OUTPUT), STAC_INPUT_SOURCE(1), HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT), @@ -3573,13 +3575,12 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out err = stac92xx_auto_fill_dac_nids(codec); if (err < 0) return err; + err = stac92xx_auto_create_multi_out_ctls(codec, + &spec->autocfg); + if (err < 0) + return err; } - err = stac92xx_auto_create_multi_out_ctls(codec, &spec->autocfg); - - if (err < 0) - return err; - /* setup analog beep controls */ if (spec->anabeep_nid > 0) { err = stac92xx_auto_create_beep_ctls(codec, -- cgit v1.2.3 From 2de686d227e8869547683de659d5419061c2c518 Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Fri, 16 Jan 2009 15:08:02 +1100 Subject: ALSA: hda - add quirks for some 82801H variants to use ALC883_MITAC Add the 82801H variants 1071:8227 and 8086:2503 to use ALC883_MITAC Reference: Ubuntu bug 210865 https://bugs.launchpad.net/bugs/210865 Signed-off-by: Luke Yelavich Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 82dd0843197..5d249a547fb 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -8478,6 +8478,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), + SND_PCI_QUIRK(0x1071, 0x8227, "Mitac 82801H", ALC883_MITAC), SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL), @@ -8526,6 +8527,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL), SND_PCI_QUIRK(0x8086, 0x0002, "DG33FBC", ALC883_3ST_6ch_INTEL), + SND_PCI_QUIRK(0x8086, 0x2503, "82801H", ALC883_MITAC), SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC883_3ST_6ch_INTEL), SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), {} -- cgit v1.2.3 From 591046cfc5f1b452db0a4557850ad7f394e38231 Mon Sep 17 00:00:00 2001 From: Ben Nizette Date: Fri, 16 Jan 2009 08:45:45 +1100 Subject: ASoC: atmel_pcm: Remove non-existant header doesn't exist on AVR32 and therefore this driver won't build on that arch. AFAICT this driver doesn't actually use the content of that header so easiest just to remove it. Signed-off-by: Ben Nizette Signed-off-by: Mark Brown --- sound/soc/atmel/atmel-pcm.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/atmel/atmel-pcm.c b/sound/soc/atmel/atmel-pcm.c index 1fac5efd285..3dcdc4e3cfa 100644 --- a/sound/soc/atmel/atmel-pcm.c +++ b/sound/soc/atmel/atmel-pcm.c @@ -44,8 +44,6 @@ #include #include -#include - #include "atmel-pcm.h" -- cgit v1.2.3 From 989738c4f82126207b9e04c9395b78e544f3d33c Mon Sep 17 00:00:00 2001 From: Matthew Ranostay Date: Sat, 17 Jan 2009 18:47:27 -0500 Subject: ALSA: hda: fix invalid power mapping masks Fixed invalid power mappings for ports 0xd and 0xe on 93hd83xxx codecs. They were shifted right one too many bits. Signed-off-by: Matthew Ranostay Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index faef1ca8660..a4d4afe6b4f 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -334,7 +334,7 @@ static hda_nid_t stac92hd83xxx_slave_dig_outs[2] = { }; static unsigned int stac92hd83xxx_pwr_mapping[4] = { - 0x03, 0x0c, 0x10, 0x40, + 0x03, 0x0c, 0x20, 0x80, }; static hda_nid_t stac92hd83xxx_amp_nids[1] = { -- cgit v1.2.3 From 22c733788bbd4b75c00279119a83da5cd74b987a Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 19 Jan 2009 10:07:21 +0100 Subject: sound: virtuoso: enable UART on Xonar HDAV1.3 This hardware has a better chance of working correctly if we don't forget to enable it. Signed-off-by: Clemens Ladisch Cc: Signed-off-by: Takashi Iwai --- sound/pci/oxygen/virtuoso.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c index e9e829e83d7..a9621664305 100644 --- a/sound/pci/oxygen/virtuoso.c +++ b/sound/pci/oxygen/virtuoso.c @@ -908,6 +908,7 @@ static const struct oxygen_model model_xonar_hdav = { .dac_channels = 8, .dac_volume_min = 0x0f, .dac_volume_max = 0xff, + .misc_flags = OXYGEN_MISC_MIDI, .function_flags = OXYGEN_FUNCTION_2WIRE, .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, -- cgit v1.2.3 From 45bf81011312958777f33088ac0911f241ada297 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 19 Jan 2009 10:07:58 +0100 Subject: sound: virtuoso: add newline Add a missing newline. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai --- sound/pci/oxygen/virtuoso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c index a9621664305..18c7c91786b 100644 --- a/sound/pci/oxygen/virtuoso.c +++ b/sound/pci/oxygen/virtuoso.c @@ -683,7 +683,7 @@ static void xonar_hdav_uart_input(struct oxygen *chip) if (chip->uart_input_count >= 2 && chip->uart_input[chip->uart_input_count - 2] == 'O' && chip->uart_input[chip->uart_input_count - 1] == 'K') { - printk(KERN_DEBUG "message from Xonar HDAV HDMI chip received:"); + printk(KERN_DEBUG "message from Xonar HDAV HDMI chip received:\n"); print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, chip->uart_input, chip->uart_input_count); chip->uart_input_count = 0; -- cgit v1.2.3 From 3288a66243c8d34c299dd6b8a336a34321ccff52 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 19 Jan 2009 10:08:38 +0100 Subject: sound: virtuoso: document HDAV1.3 driver status Mention in the Kconfig help text that the HDAV1.3 code is rather experimental. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai --- sound/pci/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig index 6e3a1848447..82b9bddcdcd 100644 --- a/sound/pci/Kconfig +++ b/sound/pci/Kconfig @@ -744,8 +744,8 @@ config SND_VIRTUOSO select SND_OXYGEN_LIB help Say Y here to include support for sound cards based on the - Asus AV100/AV200 chips, i.e., Xonar D1, DX, D2, D2X and - HDAV1.3 (Deluxe). + Asus AV100/AV200 chips, i.e., Xonar D1, DX, D2 and D2X. + Support for the HDAV1.3 (Deluxe) is very experimental. To compile this driver as a module, choose M here: the module will be called snd-virtuoso. -- cgit v1.2.3 From 8a9dee59a345f96757dd45699de1c4182d8bf9a9 Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Mon, 19 Jan 2009 17:14:24 -0600 Subject: ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers The Freescale MPC8610 driver was defining two SOC card (snd_soc_card) structures, partially initializing each one, but registering only one of them with ASoC. Signed-off-by: Timur Tabi Signed-off-by: Mark Brown --- sound/soc/fsl/mpc8610_hpcd.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'sound') diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index bcec3f60bad..acf39a646b2 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c @@ -182,16 +182,6 @@ static struct snd_soc_ops mpc8610_hpcd_ops = { .startup = mpc8610_hpcd_startup, }; -/** - * mpc8610_hpcd_machine: ASoC machine data - */ -static struct snd_soc_card mpc8610_hpcd_machine = { - .probe = mpc8610_hpcd_machine_probe, - .remove = mpc8610_hpcd_machine_remove, - .name = "MPC8610 HPCD", - .num_links = 1, -}; - /** * mpc8610_hpcd_probe: OF probe function for the fabric driver * @@ -455,7 +445,11 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev, machine_data->dai.codec_dai = &cs4270_dai; /* The codec_dai we want */ machine_data->dai.ops = &mpc8610_hpcd_ops; - mpc8610_hpcd_machine.dai_link = &machine_data->dai; + machine_data->machine.probe = mpc8610_hpcd_machine_probe; + machine_data->machine.remove = mpc8610_hpcd_machine_remove; + machine_data->machine.name = "MPC8610 HPCD"; + machine_data->machine.num_links = 1; + machine_data->machine.dai_link = &machine_data->dai; /* Allocate a new audio platform device structure */ sound_device = platform_device_alloc("soc-audio", -1); @@ -465,7 +459,7 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev, goto error; } - machine_data->sound_devdata.card = &mpc8610_hpcd_machine; + machine_data->sound_devdata.card = &machine_data->machine; machine_data->sound_devdata.codec_dev = &soc_codec_device_cs4270; machine_data->machine.platform = &fsl_soc_platform; -- cgit v1.2.3 From 65557f350749e11d51d15dee759d6e04f290e256 Mon Sep 17 00:00:00 2001 From: Matthew Ranostay Date: Tue, 20 Jan 2009 16:50:25 -0500 Subject: ALSA: hda: 83xxx port 0xe DAC selection On the 92hd8xxx codecs port 0xe needs the connection selected to be the last DAC in the list. Signed-off-by: Matthew Ranostay Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'sound') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index a4d4afe6b4f..3b97d1eff92 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -841,10 +841,6 @@ static struct hda_verb stac92hd73xx_10ch_core_init[] = { }; static struct hda_verb stac92hd83xxx_core_init[] = { - /* start of config #1 */ - { 0xe, AC_VERB_SET_CONNECT_SEL, 0x3}, - - /* start of config #2 */ { 0xa, AC_VERB_SET_CONNECT_SEL, 0x0}, { 0xb, AC_VERB_SET_CONNECT_SEL, 0x0}, { 0xd, AC_VERB_SET_CONNECT_SEL, 0x1}, @@ -4754,7 +4750,9 @@ static struct hda_input_mux stac92hd83xxx_dmux = { static int patch_stac92hd83xxx(struct hda_codec *codec) { struct sigmatel_spec *spec; + hda_nid_t conn[STAC92HD83_DAC_COUNT + 1]; int err; + int num_dacs; spec = kzalloc(sizeof(*spec), GFP_KERNEL); if (spec == NULL) @@ -4773,13 +4771,21 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids); spec->multiout.dac_nids = spec->dac_nids; + + /* set port 0xe to select the last DAC + */ + num_dacs = snd_hda_get_connections(codec, 0x0e, + conn, STAC92HD83_DAC_COUNT + 1) - 1; + + snd_hda_codec_write_cache(codec, 0xe, 0, + AC_VERB_SET_CONNECT_SEL, num_dacs); + spec->init = stac92hd83xxx_core_init; switch (codec->vendor_id) { case 0x111d7605: break; default: spec->num_pwrs--; - spec->init++; /* switch to config #2 */ } spec->mixer = stac92hd83xxx_mixer; -- cgit v1.2.3 From e0c0e943af71c0f840a1f6a32a8cf0b61ebc61e5 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 22 Jan 2009 12:58:11 +0100 Subject: ALSA: hda - Add model entry for HP dv4 Added model=hp-dv5 for HP dv4 (103c:30f7). Reference: kernel bug #12440 http://bugzilla.kernel.org/show_bug.cgi?id=12440 Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 3b97d1eff92..c1635a188f4 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -1797,6 +1797,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { "HP dv5", STAC_HP_M4), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4, "HP dv7", STAC_HP_M4), + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f7, + "HP dv4", STAC_HP_DV5), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc, "HP dv7", STAC_HP_M4), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3603, -- cgit v1.2.3 From 87e88a746d6d93242c15e380dc8cd2579b524974 Mon Sep 17 00:00:00 2001 From: Matthew Ranostay Date: Thu, 22 Jan 2009 20:38:42 -0500 Subject: ALSA: hda: revert change to 92hd83xxx power mapping Port 0xe power mapping was incorrect set to 0x80 changed to the correct value 0x40. Signed-off-by: Matthew Ranostay Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index c1635a188f4..c553fdb2b14 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -334,7 +334,7 @@ static hda_nid_t stac92hd83xxx_slave_dig_outs[2] = { }; static unsigned int stac92hd83xxx_pwr_mapping[4] = { - 0x03, 0x0c, 0x20, 0x80, + 0x03, 0x0c, 0x20, 0x40, }; static hda_nid_t stac92hd83xxx_amp_nids[1] = { -- cgit v1.2.3 From 32ed3f4640631ab7a4c0bc0f1463cf019d510341 Mon Sep 17 00:00:00 2001 From: Matthew Ranostay Date: Thu, 22 Jan 2009 20:53:29 -0500 Subject: ALSA: hda: Add STAC92HD83XXX_PWR_REF quirk Some revisions of the 92hd8xxx codec's not supporting port power downs in which the using of it causes capture and also randomly playback streams to not function at all. Thus by disabling it by default and adding a option to enable it manually will fix all issue on current and future revisions. Signed-off-by: Matthew Ranostay Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'sound') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index c553fdb2b14..3dd4eee70b7 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -81,6 +81,7 @@ enum { enum { STAC_92HD83XXX_REF, + STAC_92HD83XXX_PWR_REF, STAC_92HD83XXX_MODELS }; @@ -1734,10 +1735,12 @@ static unsigned int ref92hd83xxx_pin_configs[14] = { static unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = { [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs, + [STAC_92HD83XXX_PWR_REF] = ref92hd83xxx_pin_configs, }; static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { [STAC_92HD83XXX_REF] = "ref", + [STAC_92HD83XXX_PWR_REF] = "mic-ref", }; static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { @@ -4783,13 +4786,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) AC_VERB_SET_CONNECT_SEL, num_dacs); spec->init = stac92hd83xxx_core_init; - switch (codec->vendor_id) { - case 0x111d7605: - break; - default: - spec->num_pwrs--; - } - spec->mixer = stac92hd83xxx_mixer; spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids); spec->num_dmuxes = ARRAY_SIZE(stac92hd83xxx_dmux_nids); @@ -4815,6 +4811,15 @@ again: return err; } + switch (codec->vendor_id) { + case 0x111d7604: + case 0x111d7605: + if (spec->board_config == STAC_92HD83XXX_PWR_REF) + break; + spec->num_pwrs = 0; + break; + } + err = stac92xx_parse_auto_config(codec, 0x1d, 0); if (!err) { if (spec->board_config < 0) { -- cgit v1.2.3 From 00a602db1ce9d61319d6f769dee206ec85f19bda Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 23 Jan 2009 11:55:42 +0100 Subject: ALSA: hda - Fix PCM reference NID for STAC/IDT analog outputs The reference NID for the analog outputs of STAC/IDT codecs is set to a fixed number 0x02. But this isn't always correct and in many codecs it points to a non-existing NID. This patch fixes the initialization of the PCM reference NID taken from the actually probed DAC list. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 3dd4eee70b7..b787b3cc096 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -2539,6 +2539,8 @@ static int stac92xx_build_pcms(struct hda_codec *codec) info->name = "STAC92xx Analog"; info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_playback; + info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = + spec->multiout.dac_nids[0]; info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture; info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0]; info->stream[SNDRV_PCM_STREAM_CAPTURE].substreams = spec->num_adcs; -- cgit v1.2.3 From aa9d823bb347fb66cb07f98c686be8bb85cb6a74 Mon Sep 17 00:00:00 2001 From: Joerg Schirottke Date: Tue, 27 Jan 2009 11:01:34 +0100 Subject: ALSA: hda - Add quirk for HP DV6700 laptop Added the matching model=laptop for HP DV6700 laptop. Signed-off-by: Joerg Schirottke Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_conexant.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 75de40aaab0..9ae72b803f2 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -1566,6 +1566,7 @@ static struct snd_pci_quirk cxt5047_cfg_tbl[] = { SND_PCI_QUIRK(0x103c, 0x30a5, "HP DV5200T/DV8000T", CXT5047_LAPTOP_HP), SND_PCI_QUIRK(0x103c, 0x30b2, "HP DV2000T/DV3000T", CXT5047_LAPTOP), SND_PCI_QUIRK(0x103c, 0x30b5, "HP DV2000Z", CXT5047_LAPTOP), + SND_PCI_QUIRK(0x103c, 0x30cf, "HP DV6700", CXT5047_LAPTOP), SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P100", CXT5047_LAPTOP_EAPD), {} }; -- cgit v1.2.3 From 5801f992276366cd6a4f1f9939a4c9da33d499ee Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 27 Jan 2009 12:53:22 +0100 Subject: ALSA: hda - Fix compile warning with CONFIG_SND_JACK=n sound/pci/hda/patch_conexant.c:352: warning: 'conexant_add_jack' defined but not used Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_conexant.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 9ae72b803f2..0177ef8f4c9 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -347,6 +347,7 @@ static int conexant_mux_enum_put(struct snd_kcontrol *kcontrol, &spec->cur_mux[adc_idx]); } +#ifdef CONFIG_SND_JACK static int conexant_add_jack(struct hda_codec *codec, hda_nid_t nid, int type) { @@ -394,7 +395,6 @@ static void conexant_report_jack(struct hda_codec *codec, hda_nid_t nid) static int conexant_init_jacks(struct hda_codec *codec) { -#ifdef CONFIG_SND_JACK struct conexant_spec *spec = codec->spec; int i; @@ -422,10 +422,19 @@ static int conexant_init_jacks(struct hda_codec *codec) ++hv; } } -#endif return 0; } +#else +static inline void conexant_report_jack(struct hda_codec *codec, hda_nid_t nid) +{ +} + +static inline int conexant_init_jacks(struct hda_codec *codec) +{ + return 0; +} +#endif static int conexant_init(struct hda_codec *codec) { -- cgit v1.2.3 From 2a88464ceb1bda2571f88902fd8068a6168e3f7b Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Wed, 28 Jan 2009 15:58:38 +1100 Subject: ALSA: hda - add another MacBook Pro 4, 1 subsystem ID Add another MacBook Pro 4,1 SSID (106b:3800). It seems that latter revisions, (at least mine), have different IDs to earlier revisions. Signed-off-by: Luke Yelavich Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 5d249a547fb..7884a4e0706 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7018,6 +7018,7 @@ static int patch_alc882(struct hda_codec *codec) case 0x106b00a4: /* MacbookPro4,1 */ case 0x106b2c00: /* Macbook Pro rev3 */ case 0x106b3600: /* Macbook 3.1 */ + case 0x106b3800: /* MacbookPro4,1 - latter revision */ board_config = ALC885_MBP3; break; default: -- cgit v1.2.3 From 9e70c1f099c6977d3928879e64fa6af7f903b7b0 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 29 Jan 2009 13:08:20 +0000 Subject: ASoC: Fix null string usage with WM8753 DAIs The WM8753 driver multiplexes the DAI structures it exposes to the outside world, leaving them uninitialised until the codec probes. Since the DAI name is used during the registration and setup process provide a dummy name. Signed-off-by: Mark Brown --- sound/soc/codecs/wm8753.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index 6c21b50c937..77620ab9875 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c @@ -1451,7 +1451,14 @@ static const struct snd_soc_dai wm8753_all_dai[] = { }, }; -struct snd_soc_dai wm8753_dai[2]; +struct snd_soc_dai wm8753_dai[] = { + { + .name = "WM8753 DAI 0", + }, + { + .name = "WM8753 DAI 1", + }, +}; EXPORT_SYMBOL_GPL(wm8753_dai); static void wm8753_set_dai_mode(struct snd_soc_codec *codec, unsigned int mode) -- cgit v1.2.3 From ef390c0b6e3f4d2d2d43f53f4bd35e1884571a14 Mon Sep 17 00:00:00 2001 From: Misael Lopez Cruz Date: Thu, 29 Jan 2009 13:29:46 +0200 Subject: ASoC: OMAP: Initialize XCCR and RCCR registers in McBSP DAI driver This patch explicitly initializes McBSP Transmit Configuration Control Register (XCCR) and Receive Configuration Control Register (RCCR) to their reset values. Reset values are 26 ns of DX delay and Transmit DMA disabled for XCCR register; receive full cycle mode enabled and Receive DMA disabled for RCCR register. This patch requires a counterpart in OMAP McBSP driver before to apply it. The required changes in McBSP were sent and approved in linux-omap mailing list and patch is going upstream (commit 3127f8f8595a064b3f1a1837fea2177902589ac3 from linux-omap-2.6 tree). Signed-off-by: Misael Lopez Cruz [ jarkko.nikula@nokia.com: Commit id for counterpart patch corrected ] Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown --- sound/soc/omap/omap-mcbsp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sound') diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index ec5e18a7875..05dd5abcddf 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -302,6 +302,10 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, regs->spcr1 |= RINTM(3); regs->rcr2 |= RFIG; regs->xcr2 |= XFIG; + if (cpu_is_omap2430() || cpu_is_omap34xx()) { + regs->xccr = DXENDLY(1) | XDMAEN; + regs->rccr = RFULL_CYCLE | RDMAEN; + } switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { case SND_SOC_DAIFMT_I2S: -- cgit v1.2.3 From 42de55cb3b332e1430509a343b082731d7972b50 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 30 Jan 2009 15:49:58 +0100 Subject: ALSA: hda - Add quirk for another HP dv5 model Added model=hp-dv5 for another HP dv5 model with AMD chip (103c:3600) Reference: kernel bug#12440 http://bugzilla.kernel.org/show_bug.cgi?id=12440 Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index b787b3cc096..38428e22428 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -1804,6 +1804,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { "HP dv4", STAC_HP_DV5), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc, "HP dv7", STAC_HP_M4), + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3600, + "HP dv5", STAC_HP_DV5), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3603, "HP dv5", STAC_HP_DV5), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361a, -- cgit v1.2.3 From 67d8a3c1221bc883c821e7695ba6d327a5d6f2af Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Sat, 31 Jan 2009 12:17:28 +0100 Subject: ALSA: alsa: time reaches -1, tested 0 With a postfix decrement time will reach -1 rather than 0, so the warning will not be issued. Signed-off-by: Roel Kluin Signed-off-by: Takashi Iwai --- sound/pci/intel8x0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 19d3391e229..e900cdc8484 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c @@ -617,7 +617,7 @@ static int snd_intel8x0_ali_codec_semaphore(struct intel8x0 *chip) int time = 100; if (chip->buggy_semaphore) return 0; /* just ignore ... */ - while (time-- && (igetdword(chip, ICHREG(ALI_CAS)) & ALI_CAS_SEM_BUSY)) + while (--time && (igetdword(chip, ICHREG(ALI_CAS)) & ALI_CAS_SEM_BUSY)) udelay(1); if (! time && ! chip->in_ac97_init) snd_printk(KERN_WARNING "ali_codec_semaphore timeout\n"); -- cgit v1.2.3 From 3077e44c48242bb5867b41586f23aa8f6921073a Mon Sep 17 00:00:00 2001 From: Mark Eggleston Date: Sat, 31 Jan 2009 17:57:54 +0100 Subject: ALSA: hda - Add support of iMac 24 Aluminium Added the support for 24" Aluminium iMac (106b:3e00) Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 7884a4e0706..0040101f615 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7012,6 +7012,7 @@ static int patch_alc882(struct hda_codec *codec) break; case 0x106b1000: /* iMac 24 */ case 0x106b2800: /* AppleTV */ + case 0x106b3e00: /* iMac 24 Aluminium */ board_config = ALC885_IMAC24; break; case 0x106b00a1: /* Macbook (might be wrong - PCI SSID?) */ -- cgit v1.2.3 From 516a1ced456a6d118db738f0f09fce0cb0f42794 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 2 Feb 2009 11:37:03 +0100 Subject: ALSA: hda - No widget selection for volume knob widgets in proc output Volume-knob widgets have no widget selection although they have widget connections. Thus, the connection list in the proc output shouldn't contain the selection (*). Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 7ca66d65414..144b85276d5 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c @@ -399,7 +399,8 @@ static void print_conn_list(struct snd_info_buffer *buffer, { int c, curr = -1; - if (conn_len > 1 && wid_type != AC_WID_AUD_MIX) + if (conn_len > 1 && wid_type != AC_WID_AUD_MIX && + wid_type != AC_WID_VOL_KNB) curr = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONNECT_SEL, 0); snd_iprintf(buffer, " Connection: %d\n", conn_len); -- cgit v1.2.3 From 21dff4345697ad129b0efeed1b4d0aa53dfd47fe Mon Sep 17 00:00:00 2001 From: Eero Nurkkala Date: Mon, 2 Feb 2009 14:20:46 +0200 Subject: OMAP: ASoC: Fix spinlock misuse in omap-pcm.c omap_pcm_trigger is called also in interrupt context so CPU flags must be restored when returning. Signed-off-by: Eero Nurkkala Acked-by: Jarkko Nikula Signed-off-by: Mark Brown --- sound/soc/omap/omap-pcm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index b0362dfd5b7..dd3bb293376 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -175,9 +175,10 @@ static int omap_pcm_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_pcm_runtime *runtime = substream->runtime; struct omap_runtime_data *prtd = runtime->private_data; + unsigned long flags; int ret = 0; - spin_lock_irq(&prtd->lock); + spin_lock_irqsave(&prtd->lock, flags); switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: @@ -195,7 +196,7 @@ static int omap_pcm_trigger(struct snd_pcm_substream *substream, int cmd) default: ret = -EINVAL; } - spin_unlock_irq(&prtd->lock); + spin_unlock_irqrestore(&prtd->lock, flags); return ret; } -- cgit v1.2.3 From 64ca0404eed57f6c92290d55e949a7f46cbe4bf4 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Mon, 2 Feb 2009 22:23:22 +0000 Subject: ALSA: ASoC: email - update email addresses. This just updates my email address on some drivers I'd forgotten in a previous patch. Signed-off-by: Liam Girdwood Signed-off-by: Takashi Iwai --- sound/soc/atmel/atmel_ssc_dai.c | 2 +- sound/soc/atmel/atmel_ssc_dai.h | 2 +- sound/soc/codecs/wm8350.c | 2 +- sound/soc/codecs/wm8990.c | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) (limited to 'sound') diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index c5d67900d66..ff0054b7650 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c @@ -10,7 +10,7 @@ * Based on at91-ssc.c by * Frank Mandarino * Based on pxa2xx Platform drivers by - * Liam Girdwood + * Liam Girdwood * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/sound/soc/atmel/atmel_ssc_dai.h b/sound/soc/atmel/atmel_ssc_dai.h index a828746e8a2..391135f9c6c 100644 --- a/sound/soc/atmel/atmel_ssc_dai.h +++ b/sound/soc/atmel/atmel_ssc_dai.h @@ -10,7 +10,7 @@ * Based on at91-ssc.c by * Frank Mandarino * Based on pxa2xx Platform drivers by - * Liam Girdwood + * Liam Girdwood * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index e3989d406f5..35d99750c38 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c @@ -3,7 +3,7 @@ * * Copyright (C) 2007, 2008 Wolfson Microelectronics PLC. * - * Author: Liam Girdwood + * Author: Liam Girdwood * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index 5b5afc14447..1cbb7b9b51c 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c @@ -2,8 +2,7 @@ * wm8990.c -- WM8990 ALSA Soc Audio driver * * Copyright 2008 Wolfson Microelectronics PLC. - * Author: Liam Girdwood - * lg@opensource.wolfsonmicro.com or linux@wolfsonmicro.com + * Author: Liam Girdwood * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the -- cgit v1.2.3 From 7924f0cadcf52cb316d6eca60a6ae3fc9e42b465 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Wed, 4 Feb 2009 18:14:55 +0100 Subject: ALSA: pcm_oss: AFMT_S24_LE is set twice in return value AFMT_S24_LE is set twice in return value vi sound/core/oss/pcm_oss.c +640 #define AFMT_S24_LE 0x00008000 #define AFMT_S24_BE 0x00010000 Signed-off-by: Roel Kluin Signed-off-by: Takashi Iwai --- sound/core/oss/pcm_oss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index e17836680f4..0a1798eafb0 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -1767,7 +1767,7 @@ static int snd_pcm_oss_get_formats(struct snd_pcm_oss_file *pcm_oss_file) AFMT_S8 | AFMT_U16_LE | AFMT_U16_BE | AFMT_S32_LE | AFMT_S32_BE | - AFMT_S24_LE | AFMT_S24_LE | + AFMT_S24_LE | AFMT_S24_BE | AFMT_S24_PACKED; params = kmalloc(sizeof(*params), GFP_KERNEL); if (!params) -- cgit v1.2.3 From f67d8176ba9a3dbc33454cd67057184b2ef5ee31 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 4 Feb 2009 23:30:19 +0100 Subject: ALSA: hda - Add quirk for FSC Amilo Xi2550 Added model=fujisu-pi2515 for FSC Amilo Xi2550 with ALC883 codec. Refernece: Novell bnc#450979 https://bugzilla.novell.com/show_bug.cgi?id=450979 Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0040101f615..a3baa33aedf 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -8515,6 +8515,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { SND_PCI_QUIRK(0x1558, 0, "Clevo laptop", ALC883_LAPTOP_EAPD), SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch), SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), + SND_PCI_QUIRK(0x1734, 0x1107, "FSC AMILO Xi2550", + ALC883_FUJITSU_PI2515), SND_PCI_QUIRK(0x1734, 0x1108, "Fujitsu AMILO Pi2515", ALC883_FUJITSU_PI2515), SND_PCI_QUIRK(0x1734, 0x113d, "Fujitsu AMILO Xa3530", ALC888_FUJITSU_XA3530), -- cgit v1.2.3 From e8c0ee5d77ec0f144c753a622c67dd96fa195d50 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 5 Feb 2009 07:34:28 +0100 Subject: ALSA: hda - Fix misc workqueue issues Some fixes regarding snd-hda-intel workqueue: - Use create_singlethread_workqueue() instead of create_workqueue() as per-CPU work isn't required. - Allocate workq name string properly - Renamed the workq name to "hd-audio*" to be more obvious. Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_codec.c | 9 +++++---- sound/pci/hda/hda_codec.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'sound') diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index b7bba7dc7cf..0b708134d12 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -487,7 +487,6 @@ int /*__devinit*/ snd_hda_bus_new(struct snd_card *card, { struct hda_bus *bus; int err; - char qname[8]; static struct snd_device_ops dev_ops = { .dev_register = snd_hda_bus_dev_register, .dev_free = snd_hda_bus_dev_free, @@ -517,10 +516,12 @@ int /*__devinit*/ snd_hda_bus_new(struct snd_card *card, mutex_init(&bus->cmd_mutex); INIT_LIST_HEAD(&bus->codec_list); - snprintf(qname, sizeof(qname), "hda%d", card->number); - bus->workq = create_workqueue(qname); + snprintf(bus->workq_name, sizeof(bus->workq_name), + "hd-audio%d", card->number); + bus->workq = create_singlethread_workqueue(bus->workq_name); if (!bus->workq) { - snd_printk(KERN_ERR "cannot create workqueue %s\n", qname); + snd_printk(KERN_ERR "cannot create workqueue %s\n", + bus->workq_name); kfree(bus); return -ENOMEM; } diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 5810ef58840..09a332ada0c 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h @@ -614,6 +614,7 @@ struct hda_bus { /* unsolicited event queue */ struct hda_bus_unsolicited *unsol; + char workq_name[16]; struct workqueue_struct *workq; /* common workqueue for codecs */ /* assigned PCMs */ -- cgit v1.2.3 From 894dcd78782842924527598b0b764c9b4e679e21 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Fri, 6 Feb 2009 08:13:07 +0100 Subject: sound: usb-audio: handle wMaxPacketSize for FIXED_ENDPOINT devices For audio devices that do not have proper audio descriptors (e.g., Edirol UA-20), we use hardcoded parameters from our quirks list. However, we must still read the maximum packet size from the standard endpoint descriptor; otherwise, we might use packets that are too big and therefore rejected by the USB core. Signed-off-by: Clemens Ladisch Cc: Signed-off-by: Takashi Iwai --- sound/usb/usbaudio.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index c709b956322..2ab83129d9b 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -2966,6 +2966,7 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip, return -EINVAL; } alts = &iface->altsetting[fp->altset_idx]; + fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize); usb_set_interface(chip->dev, fp->iface, 0); init_usb_pitch(chip->dev, fp->iface, alts, fp); init_usb_sample_rate(chip->dev, fp->iface, alts, fp, fp->rate_max); -- cgit v1.2.3 From 4453dba54de7e517b0cd6f5e4a3f4af3b34f9e79 Mon Sep 17 00:00:00 2001 From: Eero Nurkkala Date: Fri, 6 Feb 2009 12:01:04 +0200 Subject: ASoC: TLV320AIC3X: Fix kcontrol's private value use in put callback Function snd_soc_dapm_put_volsw_aic3x misuses the kcontrol's private value by still accessing it as bitfields even SOC_SINGLE_VALUE constructs it as a pointer into struct soc_mixer_control after the commit 4eaa9819dc08d7bfd1065ce530e31b18a119dcaf. This was causing arbitrary register writes when touching the controls defined with SOC_DAPM_SINGLE_AIC3X. Signed-off-by: Eero Nurkkala Acked-by: Jarkko Nikula Signed-off-by: Mark Brown --- sound/soc/codecs/tlv320aic3x.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index b47a749c5ea..aea0cb72d80 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -165,10 +165,13 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); - int reg = kcontrol->private_value & 0xff; - int shift = (kcontrol->private_value >> 8) & 0x0f; - int mask = (kcontrol->private_value >> 16) & 0xff; - int invert = (kcontrol->private_value >> 24) & 0x01; + struct soc_mixer_control *mc = + (struct soc_mixer_control *)kcontrol->private_value; + unsigned int reg = mc->reg; + unsigned int shift = mc->shift; + int max = mc->max; + unsigned int mask = (1 << fls(max)) - 1; + unsigned int invert = mc->invert; unsigned short val, val_mask; int ret; struct snd_soc_dapm_path *path; -- cgit v1.2.3 From 397d5aeeb5a2c9ca6108899a04b35a51cd904503 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Fri, 6 Feb 2009 12:01:05 +0200 Subject: ASoC: WM8990: Fix kcontrol's private value use in put callback Function wm899x_outpga_put_volsw_vu misuses the kcontrol's private value by still accessing it as bitfields even SOC_SINGLE_VALUE constructs it as a pointer into struct soc_mixer_control after the commit 4eaa9819dc08d7bfd1065ce530e31b18a119dcaf. This is very similar fix than fix to TLV320AIC3X codec made by Eero Nurkkala . This fix is compile tested only. Signed-off-by: Jarkko Nikula Cc: Liam Girdwood Signed-off-by: Mark Brown --- sound/soc/codecs/wm8990.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index 1cbb7b9b51c..a5731faa150 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c @@ -176,7 +176,9 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); - int reg = kcontrol->private_value & 0xff; + struct soc_mixer_control *mc = + (struct soc_mixer_control *)kcontrol->private_value; + int reg = mc->reg; int ret; u16 val; -- cgit v1.2.3 From c6e8f2daadc6d61a32b7486a1058c8f1f9baa499 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 6 Feb 2009 12:45:52 +0100 Subject: ALSA: hda - Add missing initialization for ALC272 ALC272 needs EAPD for speaker outputs as well as other similar ALC codecs. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index a3baa33aedf..ac1a6e72843 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1037,6 +1037,7 @@ do_sku: case 0x10ec0267: case 0x10ec0268: case 0x10ec0269: + case 0x10ec0272: case 0x10ec0660: case 0x10ec0662: case 0x10ec0663: -- cgit v1.2.3 From 4a5a4c56b443a213fa9c2ad27984a8681a3d7087 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 6 Feb 2009 12:46:59 +0100 Subject: ALSA: hda - Add missing COEF initialization for ALC887 Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index ac1a6e72843..ae5c8a0d147 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1066,6 +1066,7 @@ do_sku: case 0x10ec0882: case 0x10ec0883: case 0x10ec0885: + case 0x10ec0887: case 0x10ec0889: snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 7); -- cgit v1.2.3 From f6f35bbe7c6494e66590cf519e21da2dd8d59e01 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Sun, 8 Feb 2009 15:22:25 +0100 Subject: [ARM] AACI: timeout will reach -1 With a postfix decrement the timeout will reach -1 rather than 0, so the warning will not be issued. Signed-off-by: Roel Kluin Signed-off-by: Russell King --- sound/arm/aaci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound') diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 89096e811a4..772901e41ec 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -90,7 +90,7 @@ static void aaci_ac97_write(struct snd_ac97 *ac97, unsigned short reg, */ do { v = readl(aaci->base + AACI_SLFR); - } while ((v & (SLFR_1TXB|SLFR_2TXB)) && timeout--); + } while ((v & (SLFR_1TXB|SLFR_2TXB)) && --timeout); if (!timeout) dev_err(&aaci->dev->dev, @@ -126,7 +126,7 @@ static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg) */ do { v = readl(aaci->base + AACI_SLFR); - } while ((v & SLFR_1TXB) && timeout--); + } while ((v & SLFR_1TXB) && --timeout); if (!timeout) { dev_err(&aaci->dev->dev, "timeout on slot 1 TX busy\n"); @@ -147,7 +147,7 @@ static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg) do { cond_resched(); v = readl(aaci->base + AACI_SLFR) & (SLFR_1RXV|SLFR_2RXV); - } while ((v != (SLFR_1RXV|SLFR_2RXV)) && timeout--); + } while ((v != (SLFR_1RXV|SLFR_2RXV)) && --timeout); if (!timeout) { dev_err(&aaci->dev->dev, "timeout on RX valid\n"); -- cgit v1.2.3 From 44a678d04babaa751c0ee98e006ede9576fa9e00 Mon Sep 17 00:00:00 2001 From: Mackenzie Morgan Date: Tue, 10 Feb 2009 17:13:43 +0100 Subject: ALSA: hda - Add quirk for Asus z37e (1043:8284) Added a quirk for Asus Z37E for fixing suspend/hibernation problem. Reference: https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/25896 http://launchpadlibrarian.net/17053575/0001-Add-quirk-for-ASUS-Z37E-to-make-sound-audible-afte.patch https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=4282 Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index ae5c8a0d147..ed8fcbd6000 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -8478,6 +8478,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { SND_PCI_QUIRK(0x103c, 0x2a66, "HP Acacia", ALC888_3ST_HP), SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V), SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), + SND_PCI_QUIRK(0x1043, 0x8284, "Asus Z37E", ALC883_6ST_DIG), SND_PCI_QUIRK(0x1043, 0x82fe, "Asus P5Q-EM HDMI", ALC1200_ASUS_P5Q), SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), -- cgit v1.2.3 From 272edb00493af32c609f43bdf1d75141756fd999 Mon Sep 17 00:00:00 2001 From: "Lopez Cruz, Misael" Date: Tue, 10 Feb 2009 02:05:07 -0600 Subject: ASoC: Update SDP3430 machine driver for snd_soc_card This patch replaces "snd_soc_machine" structure by "snd_soc_card" in SP3430 driver. This change is needed in SDP3430 driver to reflect changes introduced by "ASoC: Rename snd_soc_card to snd_soc_machine" patch (875065491fba8eb13219f16c36e79a6fb4e15c68). Signed-off-by: Misael Lopez Cruz Acked-by: Jarkko Nikula Signed-off-by: Mark Brown --- sound/soc/omap/sdp3430.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c index ad97836818b..e226fa75669 100644 --- a/sound/soc/omap/sdp3430.c +++ b/sound/soc/omap/sdp3430.c @@ -91,7 +91,7 @@ static struct snd_soc_dai_link sdp3430_dai = { }; /* Audio machine driver */ -static struct snd_soc_machine snd_soc_machine_sdp3430 = { +static struct snd_soc_card snd_soc_sdp3430 = { .name = "SDP3430", .platform = &omap_soc_platform, .dai_link = &sdp3430_dai, @@ -100,7 +100,7 @@ static struct snd_soc_machine snd_soc_machine_sdp3430 = { /* Audio subsystem */ static struct snd_soc_device sdp3430_snd_devdata = { - .machine = &snd_soc_machine_sdp3430, + .card = &snd_soc_sdp3430, .codec_dev = &soc_codec_dev_twl4030, }; -- cgit v1.2.3 From a1667e4eea0a7085815d1532d7630bb4611271d0 Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Wed, 11 Feb 2009 15:22:28 +0800 Subject: ALSA: hda - allow multi-channel HDMI audio playback when ELD is not present The YAMAHA AV-X1800 requires audio infoframe to include speaker-channel mapping to play >2 channel HDMI audio. In theory that mapping should be derived from its speaker configurations contained in its ELD. However we currently cannot get ELD in console before the KMS functionalities are ready. This is a more or less general issue at least in the near future. As a workaround, we propose to allow playback of mult-channel audio when ELD is not available. Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_intelhdmi.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'sound') diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c index 3564f4e4b74..a8643509e2a 100644 --- a/sound/pci/hda/patch_intelhdmi.c +++ b/sound/pci/hda/patch_intelhdmi.c @@ -419,13 +419,17 @@ static int hdmi_setup_channel_allocation(struct hda_codec *codec, /* * CA defaults to 0 for basic stereo audio */ - if (!eld->eld_ver) - return 0; - if (!eld->spk_alloc) - return 0; if (channels <= 2) return 0; + /* + * HDMI sink's ELD info cannot always be retrieved for now, e.g. + * in console or for audio devices. Assume the highest speakers + * configuration, to _not_ prohibit multi-channel audio playback. + */ + if (!eld->spk_alloc) + eld->spk_alloc = 0xffff; + /* * expand ELD's speaker allocation mask * -- cgit v1.2.3 From 606c0cee695bbd0c2bf32132999e35cff5a6dd9e Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Wed, 11 Feb 2009 15:22:29 +0800 Subject: ALSA: hda - enable HDMI audio pin out at module loading time We found that enabling/disabling HDMI audio pin out at stream start/stop time will kill the leading 500ms or so sound samples. Avoid this by enabling pin out once and for ever at module loading time. The leading ~500ms audio samples will still be lost when switching from X-channel playback to Y-channel playback where X != Y. However there's no much we can do about it: the audio infoframe has to change and it looks like either G45 or YAMAHA requires some time to switch the configuration. Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_intelhdmi.c | 42 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 23 deletions(-) (limited to 'sound') diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c index a8643509e2a..f2610d67e18 100644 --- a/sound/pci/hda/patch_intelhdmi.c +++ b/sound/pci/hda/patch_intelhdmi.c @@ -49,11 +49,6 @@ static struct hda_verb pinout_enable_verb[] = { {} /* terminator */ }; -static struct hda_verb pinout_disable_verb[] = { - {PIN_NID, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00}, - {} -}; - static struct hda_verb unsolicited_response_verb[] = { {PIN_NID, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | INTEL_HDMI_EVENT_TAG}, @@ -248,10 +243,6 @@ static void hdmi_write_dip_byte(struct hda_codec *codec, hda_nid_t nid, static void hdmi_enable_output(struct hda_codec *codec) { - /* Enable Audio InfoFrame Transmission */ - hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0); - snd_hda_codec_write(codec, PIN_NID, 0, AC_VERB_SET_HDMI_DIP_XMIT, - AC_DIPXMIT_BEST); /* Unmute */ if (get_wcaps(codec, PIN_NID) & AC_WCAP_OUT_AMP) snd_hda_codec_write(codec, PIN_NID, 0, @@ -260,17 +251,24 @@ static void hdmi_enable_output(struct hda_codec *codec) snd_hda_sequence_write(codec, pinout_enable_verb); } -static void hdmi_disable_output(struct hda_codec *codec) +/* + * Enable Audio InfoFrame Transmission + */ +static void hdmi_start_infoframe_trans(struct hda_codec *codec) { - snd_hda_sequence_write(codec, pinout_disable_verb); - if (get_wcaps(codec, PIN_NID) & AC_WCAP_OUT_AMP) - snd_hda_codec_write(codec, PIN_NID, 0, - AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); + hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0); + snd_hda_codec_write(codec, PIN_NID, 0, AC_VERB_SET_HDMI_DIP_XMIT, + AC_DIPXMIT_BEST); +} - /* - * FIXME: noises may arise when playing music after reloading the - * kernel module, until the next X restart or monitor repower. - */ +/* + * Disable Audio InfoFrame Transmission + */ +static void hdmi_stop_infoframe_trans(struct hda_codec *codec) +{ + hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0); + snd_hda_codec_write(codec, PIN_NID, 0, AC_VERB_SET_HDMI_DIP_XMIT, + AC_DIPXMIT_DISABLE); } static int hdmi_get_channel_count(struct hda_codec *codec) @@ -489,6 +487,7 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, hdmi_setup_channel_mapping(codec, &ai); hdmi_fill_audio_infoframe(codec, &ai); + hdmi_start_infoframe_trans(codec); } @@ -566,7 +565,7 @@ static int intel_hdmi_playback_pcm_close(struct hda_pcm_stream *hinfo, { struct intel_hdmi_spec *spec = codec->spec; - hdmi_disable_output(codec); + hdmi_stop_infoframe_trans(codec); return snd_hda_multi_out_dig_close(codec, &spec->multiout); } @@ -586,8 +585,6 @@ static int intel_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, hdmi_setup_audio_infoframe(codec, substream); - hdmi_enable_output(codec); - return 0; } @@ -632,8 +629,7 @@ static int intel_hdmi_build_controls(struct hda_codec *codec) static int intel_hdmi_init(struct hda_codec *codec) { - /* disable audio output as early as possible */ - hdmi_disable_output(codec); + hdmi_enable_output(codec); snd_hda_sequence_write(codec, unsolicited_response_verb); -- cgit v1.2.3 From 9a957a24e3b4008d84e204cdf25849ae4d5592a2 Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Wed, 11 Feb 2009 15:22:30 +0800 Subject: ALSA: hda - compute checksum in HDMI audio infoframe Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_intelhdmi.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c index f2610d67e18..90b11374a0a 100644 --- a/sound/pci/hda/patch_intelhdmi.c +++ b/sound/pci/hda/patch_intelhdmi.c @@ -366,11 +366,16 @@ static void hdmi_fill_audio_infoframe(struct hda_codec *codec, struct hdmi_audio_infoframe *ai) { u8 *params = (u8 *)ai; + u8 sum = 0; int i; hdmi_debug_dip_size(codec); hdmi_clear_dip_buffers(codec); /* be paranoid */ + for (i = 0; i < sizeof(ai); i++) + sum += params[i]; + ai->checksum = - sum; + hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0); for (i = 0; i < sizeof(ai); i++) hdmi_write_dip_byte(codec, PIN_NID, params[i]); -- cgit v1.2.3 From a57c0eb65576c810c408f0a086afac179242a21c Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Wed, 11 Feb 2009 15:22:31 +0800 Subject: ALSA: hda - add id for Intel IbexPeak integrated HDMI codec Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_intelhdmi.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c index 90b11374a0a..fcc77fec448 100644 --- a/sound/pci/hda/patch_intelhdmi.c +++ b/sound/pci/hda/patch_intelhdmi.c @@ -684,6 +684,7 @@ static struct hda_codec_preset snd_hda_preset_intelhdmi[] = { { .id = 0x80862801, .name = "G45 DEVBLC", .patch = patch_intel_hdmi }, { .id = 0x80862802, .name = "G45 DEVCTG", .patch = patch_intel_hdmi }, { .id = 0x80862803, .name = "G45 DEVELK", .patch = patch_intel_hdmi }, + { .id = 0x80862804, .name = "G45 DEVIBX", .patch = patch_intel_hdmi }, { .id = 0x10951392, .name = "SiI1392 HDMI", .patch = patch_intel_hdmi }, {} /* terminator */ }; @@ -692,6 +693,7 @@ MODULE_ALIAS("snd-hda-codec-id:808629fb"); MODULE_ALIAS("snd-hda-codec-id:80862801"); MODULE_ALIAS("snd-hda-codec-id:80862802"); MODULE_ALIAS("snd-hda-codec-id:80862803"); +MODULE_ALIAS("snd-hda-codec-id:80862804"); MODULE_ALIAS("snd-hda-codec-id:10951392"); MODULE_LICENSE("GPL"); -- cgit v1.2.3 From 32cf9a16f4af01573ddec1eb073111fc20a9d7d4 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 12 Feb 2009 00:06:42 +0100 Subject: ALSA: mtpav - Fix initial value for input hwport Fix the initial value for input hwport. The old value (-1) may cause Oops when an realtime MIDI byte is received before the input port is explicitly given. Instead, now it's set to the broadcasting as default. Tested-by: Holger Dehnhardt Cc: Signed-off-by: Takashi Iwai --- sound/drivers/mtpav.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c index 5b89c0883d6..48b64e6b267 100644 --- a/sound/drivers/mtpav.c +++ b/sound/drivers/mtpav.c @@ -706,7 +706,6 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev) mtp_card->card = card; mtp_card->irq = -1; mtp_card->share_irq = 0; - mtp_card->inmidiport = 0xffffffff; mtp_card->inmidistate = 0; mtp_card->outmidihwport = 0xffffffff; init_timer(&mtp_card->timer); @@ -719,6 +718,8 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev) if (err < 0) goto __error; + mtp_card->inmidiport = mtp_card->num_ports + MTPAV_PIDX_BROADCAST; + err = snd_mtpav_get_ISA(mtp_card); if (err < 0) goto __error; -- cgit v1.2.3 From 26a74f1f61c5bba1c0b46e67e91e921e941f76d7 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 12 Feb 2009 00:13:19 +0100 Subject: ALSA: hda - Register (new) devices at reconfig The devices that have been newly added during reconfig must be registered. Otherwise they won't be visible to user-space. Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_hwdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index 300ab407cf4..482fb0304ca 100644 --- a/sound/pci/hda/hda_hwdep.c +++ b/sound/pci/hda/hda_hwdep.c @@ -175,7 +175,7 @@ static int reconfig_codec(struct hda_codec *codec) err = snd_hda_codec_build_controls(codec); if (err < 0) return err; - return 0; + return snd_card_register(codec->bus->card); } /* -- cgit v1.2.3 From 92258a3ed2f583c8720ef570f5c62b28e6c58d71 Mon Sep 17 00:00:00 2001 From: Herton Ronaldo Krzesinski Date: Thu, 12 Feb 2009 17:27:27 -0200 Subject: ALSA: hda - Change HP dv7 (103c:30f4) quirk from hp-m4 to hp-dv5 model Change HP dv7 quirk: although reported to work with hp-m4 model (https://bugzilla.novell.com/show_bug.cgi?id=445321), the original report doesn't contain info about testing of internal microphone. Recently I received a report about internal mic not working (https://qa.mandriva.com/show_bug.cgi?id=44855#c193), this must be related with the forced line in on pin 0x0e done with hp-m4 model. Thus change the current quirk from STAC_HP_M4 to STAC_HP_DV5, later reported to be fixed on a provided kernel with this change (https://qa.mandriva.com/show_bug.cgi?id=44855#c196). Signed-off-by: Herton Ronaldo Krzesinski Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 38428e22428..aa814a3c2d8 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -1799,7 +1799,7 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f2, "HP dv5", STAC_HP_M4), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4, - "HP dv7", STAC_HP_M4), + "HP dv7", STAC_HP_DV5), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f7, "HP dv4", STAC_HP_DV5), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc, -- cgit v1.2.3 From 3a08e30de2facffe8e1a25bf4fa62cbc920fbaf6 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 13 Feb 2009 11:37:08 +0100 Subject: ALSA: hda - Add missing terminator in slave dig-out array Added the missing terminator for ad1989b_slave_dig_outs[]. Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_analog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 2e7371ec2e2..7006d62ca6c 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -1885,8 +1885,8 @@ static hda_nid_t ad1988_capsrc_nids[3] = { #define AD1988_SPDIF_OUT_HDMI 0x0b #define AD1988_SPDIF_IN 0x07 -static hda_nid_t ad1989b_slave_dig_outs[2] = { - AD1988_SPDIF_OUT, AD1988_SPDIF_OUT_HDMI +static hda_nid_t ad1989b_slave_dig_outs[] = { + AD1988_SPDIF_OUT, AD1988_SPDIF_OUT_HDMI, 0 }; static struct hda_input_mux ad1988_6stack_capture_source = { -- cgit v1.2.3 From 9411e21cd0cc4fd046b4f448417b0e103e80951c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 13 Feb 2009 11:32:28 +0100 Subject: ALSA: hda - Add snd_hda_multi_out_dig_cleanup() Added the helper function snd_hda_multi_out_dig_cleanup() to clean up the digital outputs with multi setup. This call is needed in cases the codec supports multiple digital outputs as slaves. Otherwise the slave widgets aren't properly cleaned up. For a single digital output (e.g. in patch_conexant.c), this call isn't needed. Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_codec.c | 10 ++++++++++ sound/pci/hda/hda_local.h | 2 ++ sound/pci/hda/patch_analog.c | 11 ++++++++++- sound/pci/hda/patch_sigmatel.c | 11 ++++++++++- 4 files changed, 32 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 0b708134d12..d03f99298be 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -3088,6 +3088,16 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec, } EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_prepare); +int snd_hda_multi_out_dig_cleanup(struct hda_codec *codec, + struct hda_multi_out *mout) +{ + mutex_lock(&codec->spdif_mutex); + cleanup_dig_out_stream(codec, mout->dig_out_nid); + mutex_unlock(&codec->spdif_mutex); + return 0; +} +EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_cleanup); + /* * release the digital out */ diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 1dd8716c387..44f189cb97a 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -251,6 +251,8 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec, unsigned int stream_tag, unsigned int format, struct snd_pcm_substream *substream); +int snd_hda_multi_out_dig_cleanup(struct hda_codec *codec, + struct hda_multi_out *mout); int snd_hda_multi_out_analog_open(struct hda_codec *codec, struct hda_multi_out *mout, struct snd_pcm_substream *substream, diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 7006d62ca6c..e48612323aa 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -275,6 +275,14 @@ static int ad198x_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo, format, substream); } +static int ad198x_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, + struct hda_codec *codec, + struct snd_pcm_substream *substream) +{ + struct ad198x_spec *spec = codec->spec; + return snd_hda_multi_out_dig_cleanup(codec, &spec->multiout); +} + /* * Analog capture */ @@ -333,7 +341,8 @@ static struct hda_pcm_stream ad198x_pcm_digital_playback = { .ops = { .open = ad198x_dig_playback_pcm_open, .close = ad198x_dig_playback_pcm_close, - .prepare = ad198x_dig_playback_pcm_prepare + .prepare = ad198x_dig_playback_pcm_prepare, + .cleanup = ad198x_dig_playback_pcm_cleanup }, }; diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index aa814a3c2d8..8027edf3c8f 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -2442,6 +2442,14 @@ static int stac92xx_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo, stream_tag, format, substream); } +static int stac92xx_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, + struct hda_codec *codec, + struct snd_pcm_substream *substream) +{ + struct sigmatel_spec *spec = codec->spec; + return snd_hda_multi_out_dig_cleanup(codec, &spec->multiout); +} + /* * Analog capture callbacks @@ -2486,7 +2494,8 @@ static struct hda_pcm_stream stac92xx_pcm_digital_playback = { .ops = { .open = stac92xx_dig_playback_pcm_open, .close = stac92xx_dig_playback_pcm_close, - .prepare = stac92xx_dig_playback_pcm_prepare + .prepare = stac92xx_dig_playback_pcm_prepare, + .cleanup = stac92xx_dig_playback_pcm_cleanup }, }; -- cgit v1.2.3 From 14fa43f53ff3a9c3d8b9662574b7369812a31a97 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 12 Feb 2009 19:33:19 +0000 Subject: ASoC: Only register AC97 bus if it's not done already ASoC supports both explicit codec drivers for AC97 devices and a simple driver which uses the standard ALSA AC97 framework for codec support. When used with the generic AC97 codec support that will provide the ad hoc AC97 device for drivers like touchscreens to attach to so the core shouldn't do so. Reported-by: Manuel Lauss Signed-off-by: Mark Brown --- sound/soc/soc-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 55fdb4abb17..ec3f8bb4b51 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1385,7 +1385,10 @@ int snd_soc_init_card(struct snd_soc_device *socdev) mutex_lock(&codec->mutex); #ifdef CONFIG_SND_SOC_AC97_BUS - if (ac97) { + /* Only instantiate AC97 if not already done by the adaptor + * for the generic AC97 subsystem. + */ + if (ac97 && strcmp(codec->name, "AC97") != 0) { ret = soc_ac97_dev_register(codec); if (ret < 0) { printk(KERN_ERR "asoc: AC97 device register failed\n"); -- cgit v1.2.3 From d14a7e0bfc4aed6452a436c9836903fbd1a5d6ad Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 16 Feb 2009 10:13:03 +0100 Subject: Revert "Sound: hda - Restore PCI configuration space with interrupts off" This reverts commit 32e176c14d7a425b681ef003c9061001ddb7fc7b. That commit caused a regression with suspend on Thinkpad SL300. Reference: kernel bug#12711 http://bugzilla.kernel.org/show_bug.cgi?id=12711 Tested-by: Alexandre Rostovtsev Acked-by: Rafael J. Wysocki Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_intel.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sound') diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 11e791b965f..c8d9178f47e 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1947,16 +1947,13 @@ static int azx_suspend(struct pci_dev *pci, pm_message_t state) return 0; } -static int azx_resume_early(struct pci_dev *pci) -{ - return pci_restore_state(pci); -} - static int azx_resume(struct pci_dev *pci) { struct snd_card *card = pci_get_drvdata(pci); struct azx *chip = card->private_data; + pci_set_power_state(pci, PCI_D0); + pci_restore_state(pci); if (pci_enable_device(pci) < 0) { printk(KERN_ERR "hda-intel: pci_enable_device failed, " "disabling device\n"); @@ -2468,7 +2465,6 @@ static struct pci_driver driver = { .remove = __devexit_p(azx_remove), #ifdef CONFIG_PM .suspend = azx_suspend, - .resume_early = azx_resume_early, .resume = azx_resume, #endif }; -- cgit v1.2.3 From e156ac4c571e3be741bc411e58820b74a9295c72 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 16 Feb 2009 15:22:39 +0100 Subject: sound: usb-audio: fix uninitialized variable with M-Audio MIDI interfaces Fix the snd_usbmidi_create_endpoints_midiman() function, which forgot to set the out_interval member of the endpoint info structure for Midiman/ M-Audio devices. Since kernel 2.6.24, any non-zero value makes the driver use interrupt transfers instead of bulk transfers. With EHCI controllers, these random interval values result in unbearably large latencies for output MIDI transfers. Signed-off-by: Clemens Ladisch Reported-by: David Tested-by: David Cc: Signed-off-by: Takashi Iwai --- sound/usb/usbmidi.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index 320641ab5be..26bad373fe6 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c @@ -1625,6 +1625,7 @@ static int snd_usbmidi_create_endpoints_midiman(struct snd_usb_midi* umidi, } ep_info.out_ep = get_endpoint(hostif, 2)->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; + ep_info.out_interval = 0; ep_info.out_cables = endpoint->out_cables & 0x5555; err = snd_usbmidi_out_endpoint_create(umidi, &ep_info, &umidi->endpoints[0]); if (err < 0) -- cgit v1.2.3 From 0412558c873f716efe902b397af0653a550f7341 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 16 Feb 2009 22:48:12 +0100 Subject: ALSA: usb-audio - Fix non-continuous rate detection The detection of non-continuous rates (given via rate tables) isn't processed properly (e.g. for type II). This patch fixes and simplifies the detection code. Tested-by: Joris van Rantwijk Cc: Signed-off-by: Takashi Iwai --- sound/usb/usbaudio.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'sound') diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 2ab83129d9b..80863093d2c 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -2524,7 +2524,6 @@ static int parse_audio_format_rates(struct snd_usb_audio *chip, struct audioform * build the rate table and bitmap flags */ int r, idx; - unsigned int nonzero_rates = 0; fp->rate_table = kmalloc(sizeof(int) * nr_rates, GFP_KERNEL); if (fp->rate_table == NULL) { @@ -2532,24 +2531,26 @@ static int parse_audio_format_rates(struct snd_usb_audio *chip, struct audioform return -1; } - fp->nr_rates = nr_rates; - fp->rate_min = fp->rate_max = combine_triple(&fmt[8]); + fp->nr_rates = 0; + fp->rate_min = fp->rate_max = 0; for (r = 0, idx = offset + 1; r < nr_rates; r++, idx += 3) { unsigned int rate = combine_triple(&fmt[idx]); + if (!rate) + continue; /* C-Media CM6501 mislabels its 96 kHz altsetting */ if (rate == 48000 && nr_rates == 1 && chip->usb_id == USB_ID(0x0d8c, 0x0201) && fp->altsetting == 5 && fp->maxpacksize == 392) rate = 96000; - fp->rate_table[r] = rate; - nonzero_rates |= rate; - if (rate < fp->rate_min) + fp->rate_table[fp->nr_rates] = rate; + if (!fp->rate_min || rate < fp->rate_min) fp->rate_min = rate; - else if (rate > fp->rate_max) + if (!fp->rate_max || rate > fp->rate_max) fp->rate_max = rate; fp->rates |= snd_pcm_rate_to_rate_bit(rate); + fp->nr_rates++; } - if (!nonzero_rates) { + if (!fp->nr_rates) { hwc_debug("All rates were zero. Skipping format!\n"); return -1; } -- cgit v1.2.3 From 3b03cc5b86e2052295b9b484f37226ee15c87924 Mon Sep 17 00:00:00 2001 From: Joris van Rantwijk Date: Mon, 16 Feb 2009 22:58:23 +0100 Subject: ALSA: usb-audio - Workaround for misdetected sample rate with CM6207 The CM6207 incorrectly advertises its 96 kHz playback setting as 48 kHz in its USB device descriptor. This patch extends an existing workaround in usbaudio.c to also cover the CM6207. This resolves issue 0004249 in the ALSA bug tracker. Signed-off-by: Joris van Rantwijk Cc: Signed-off-by: Takashi Iwai --- sound/usb/usbaudio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 80863093d2c..19e37451c21 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -2539,7 +2539,8 @@ static int parse_audio_format_rates(struct snd_usb_audio *chip, struct audioform continue; /* C-Media CM6501 mislabels its 96 kHz altsetting */ if (rate == 48000 && nr_rates == 1 && - chip->usb_id == USB_ID(0x0d8c, 0x0201) && + (chip->usb_id == USB_ID(0x0d8c, 0x0201) || + chip->usb_id == USB_ID(0x0d8c, 0x0102)) && fp->altsetting == 5 && fp->maxpacksize == 392) rate = 96000; fp->rate_table[fp->nr_rates] = rate; -- cgit v1.2.3 From 2678f60d2bc05a12580b93eb36f089f0e55693e0 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 18 Feb 2009 16:46:27 +0100 Subject: ALSA: jack - Use card->shortname for input name Currently the jack layer refers to card->longname as a part of its input device name string. However, longname is often really long and way too ugly as an identifier, such as, "HDA Intel at 0xf8400000 irq 21". This patch changes the code to use card->shortname instead. The shortname string contains usually the h/w vendor and product names but without messy I/O port or IRQ numbers. Signed-off-by: Takashi Iwai --- sound/core/jack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/core/jack.c b/sound/core/jack.c index dd4a12dc09a..077a85262c1 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c @@ -47,7 +47,7 @@ static int snd_jack_dev_register(struct snd_device *device) int err; snprintf(jack->name, sizeof(jack->name), "%s %s", - card->longname, jack->id); + card->shortname, jack->id); jack->input_dev->name = jack->name; /* Default to the sound card device. */ -- cgit v1.2.3 From 6ce6c473a7fd742fdb0db95841e2c4c6b37337c5 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Tue, 17 Feb 2009 09:50:30 +0100 Subject: sound: virtuoso: revert "do not overwrite EEPROM on Xonar D2/D2X" This reverts commit 7e86c0e6850504ec9516b953f316a47277825e33 ("do not overwrite EEPROM on Xonar D2/D2X") because it did not actually help with the problem. More user reports show that the overwriting of the EEPROM is not triggered by using this driver but by installing Linux, and that the installation of any other operating system (even one without any CMI8788 driver) has the same effect. In other words, the presence of this driver does not have any effect on the occurrence of the error. (So far, the available evidence seems to point to a BIOS bug.) Furthermore, it turns out that the EEPROM chip is protected against stray write commands by the command format and by requiring a separate write-enable command, so the error scenario in the previous commit (that SPI writes can be misinterpreted as an EEPROM write command) is not even theoretically possible. The mixer control that was removed as a consequence of the previous commit can only be partially emulated in userspace, which also means it cannot be seen be the in-kernel OSS API emulation, so it is better to revert that change. Signed-off-by: Clemens Ladisch Cc: Signed-off-by: Takashi Iwai --- sound/pci/oxygen/virtuoso.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'sound') diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c index 18c7c91786b..6c870c12a17 100644 --- a/sound/pci/oxygen/virtuoso.c +++ b/sound/pci/oxygen/virtuoso.c @@ -26,7 +26,7 @@ * SPI 0 -> 1st PCM1796 (front) * SPI 1 -> 2nd PCM1796 (surround) * SPI 2 -> 3rd PCM1796 (center/LFE) - * SPI 4 -> 4th PCM1796 (back) and EEPROM self-destruct (do not use!) + * SPI 4 -> 4th PCM1796 (back) * * GPIO 2 -> M0 of CS5381 * GPIO 3 -> M1 of CS5381 @@ -207,12 +207,6 @@ static void xonar_gpio_changed(struct oxygen *chip); static inline void pcm1796_write_spi(struct oxygen *chip, unsigned int codec, u8 reg, u8 value) { - /* - * We don't want to do writes on SPI 4 because the EEPROM, which shares - * the same pin, might get confused and broken. We'd better take care - * that the driver works with the default register values ... - */ -#if 0 /* maps ALSA channel pair number to SPI output */ static const u8 codec_map[4] = { 0, 1, 2, 4 @@ -223,7 +217,6 @@ static inline void pcm1796_write_spi(struct oxygen *chip, unsigned int codec, (codec_map[codec] << OXYGEN_SPI_CODEC_SHIFT) | OXYGEN_SPI_CEN_LATCH_CLOCK_HI, (reg << 8) | value); -#endif } static inline void pcm1796_write_i2c(struct oxygen *chip, unsigned int codec, @@ -757,9 +750,6 @@ static const DECLARE_TLV_DB_SCALE(cs4362a_db_scale, -12700, 100, 0); static int xonar_d2_control_filter(struct snd_kcontrol_new *template) { - if (!strncmp(template->name, "Master Playback ", 16)) - /* disable volume/mute because they would require SPI writes */ - return 1; if (!strncmp(template->name, "CD Capture ", 11)) /* CD in is actually connected to the video in pin */ template->private_value ^= AC97_CD ^ AC97_VIDEO; @@ -850,8 +840,9 @@ static const struct oxygen_model model_xonar_d2 = { .dac_volume_min = 0x0f, .dac_volume_max = 0xff, .misc_flags = OXYGEN_MISC_MIDI, - .function_flags = OXYGEN_FUNCTION_SPI, - .dac_i2s_format = OXYGEN_I2S_FORMAT_I2S, + .function_flags = OXYGEN_FUNCTION_SPI | + OXYGEN_FUNCTION_ENABLE_SPI_4_5, + .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, }; -- cgit v1.2.3 From e32740d9786b8a6c54f6e3d670567d9ef57b3b8c Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Thu, 19 Feb 2009 11:58:37 -0800 Subject: ALSA: pcxhr.h replace signed one-bit bitfields The usage and comments make it clear values of 1/0 were intended rather than -1/0 Noticed by sparse: sound/pci/pcxhr/pcxhr.h:100:20: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:101:22: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:102:24: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:103:21: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:104:25: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:105:20: error: dubious one-bit signed bitfield Signed-off-by: Harvey Harrison Signed-off-by: Takashi Iwai --- sound/pci/pcxhr/pcxhr.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sound') diff --git a/sound/pci/pcxhr/pcxhr.h b/sound/pci/pcxhr/pcxhr.h index 84131a916c9..69d87dee699 100644 --- a/sound/pci/pcxhr/pcxhr.h +++ b/sound/pci/pcxhr/pcxhr.h @@ -97,12 +97,12 @@ struct pcxhr_mgr { int capture_chips; int fw_file_set; int firmware_num; - int is_hr_stereo:1; - int board_has_aes1:1; /* if 1 board has AES1 plug and SRC */ - int board_has_analog:1; /* if 0 the board is digital only */ - int board_has_mic:1; /* if 1 the board has microphone input */ - int board_aes_in_192k:1;/* if 1 the aes input plugs do support 192kHz */ - int mono_capture:1; /* if 1 the board does mono capture */ + unsigned int is_hr_stereo:1; + unsigned int board_has_aes1:1; /* if 1 board has AES1 plug and SRC */ + unsigned int board_has_analog:1; /* if 0 the board is digital only */ + unsigned int board_has_mic:1; /* if 1 the board has microphone input */ + unsigned int board_aes_in_192k:1;/* if 1 the aes input plugs do support 192kHz */ + unsigned int mono_capture:1; /* if 1 the board does mono capture */ struct snd_dma_buffer hostport; -- cgit v1.2.3 From 55290e1932102f57ea17e7cff895914c2dbdb4c4 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 20 Feb 2009 15:59:01 +0100 Subject: ALSA: hda - Fix parse of init_verbs sysfs entry Fixed the parse of init_verbs hwdep sysfs entry. Simplieied using sscanf. Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_hwdep.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'sound') diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index 482fb0304ca..4ae51dcb81a 100644 --- a/sound/pci/hda/hda_hwdep.c +++ b/sound/pci/hda/hda_hwdep.c @@ -277,18 +277,19 @@ static ssize_t init_verbs_store(struct device *dev, { struct snd_hwdep *hwdep = dev_get_drvdata(dev); struct hda_codec *codec = hwdep->private_data; - char *p; - struct hda_verb verb, *v; + struct hda_verb *v; + int nid, verb, param; - verb.nid = simple_strtoul(buf, &p, 0); - verb.verb = simple_strtoul(p, &p, 0); - verb.param = simple_strtoul(p, &p, 0); - if (!verb.nid || !verb.verb || !verb.param) + if (sscanf(buf, "%i %i %i", &nid, &verb, ¶m) != 3) + return -EINVAL; + if (!nid || !verb) return -EINVAL; v = snd_array_new(&codec->init_verbs); if (!v) return -ENOMEM; - *v = verb; + v->nid = nid; + v->verb = verb; + v->param = param; return count; } -- cgit v1.2.3 From 3d92e8f3ae9ba21cac30370eb254ed9dc20df043 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Sun, 22 Feb 2009 09:38:47 +0100 Subject: m68k: atari - Rename "mfp" to "st_mfp" http://kisskb.ellerman.id.au/kisskb/buildresult/72115/: | net/mac80211/ieee80211_i.h:327: error: syntax error before 'volatile' | net/mac80211/ieee80211_i.h:350: error: syntax error before '}' token | net/mac80211/ieee80211_i.h:455: error: field 'sta' has incomplete type | distcc[19430] ERROR: compile net/mac80211/main.c on sprygo/32 failed This is caused by | # define mfp ((*(volatile struct MFP*)MFP_BAS)) in arch/m68k/include/asm/atarihw.h, which conflicts with the new "mfp" enum in net/mac80211/ieee80211_i.h. Rename "mfp" to "st_mfp", as it's a way too generic name for a global #define. Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds --- sound/oss/dmasound/dmasound_atari.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sound') diff --git a/sound/oss/dmasound/dmasound_atari.c b/sound/oss/dmasound/dmasound_atari.c index 57d9f154c88..38931f2f696 100644 --- a/sound/oss/dmasound/dmasound_atari.c +++ b/sound/oss/dmasound/dmasound_atari.c @@ -847,23 +847,23 @@ static int __init AtaIrqInit(void) of events. So all we need to keep the music playing is to provide the sound hardware with new data upon an interrupt from timer A. */ - mfp.tim_ct_a = 0; /* ++roman: Stop timer before programming! */ - mfp.tim_dt_a = 1; /* Cause interrupt after first event. */ - mfp.tim_ct_a = 8; /* Turn on event counting. */ + st_mfp.tim_ct_a = 0; /* ++roman: Stop timer before programming! */ + st_mfp.tim_dt_a = 1; /* Cause interrupt after first event. */ + st_mfp.tim_ct_a = 8; /* Turn on event counting. */ /* Register interrupt handler. */ if (request_irq(IRQ_MFP_TIMA, AtaInterrupt, IRQ_TYPE_SLOW, "DMA sound", AtaInterrupt)) return 0; - mfp.int_en_a |= 0x20; /* Turn interrupt on. */ - mfp.int_mk_a |= 0x20; + st_mfp.int_en_a |= 0x20; /* Turn interrupt on. */ + st_mfp.int_mk_a |= 0x20; return 1; } #ifdef MODULE static void AtaIrqCleanUp(void) { - mfp.tim_ct_a = 0; /* stop timer */ - mfp.int_en_a &= ~0x20; /* turn interrupt off */ + st_mfp.tim_ct_a = 0; /* stop timer */ + st_mfp.int_en_a &= ~0x20; /* turn interrupt off */ free_irq(IRQ_MFP_TIMA, AtaInterrupt); } #endif /* MODULE */ @@ -1599,7 +1599,7 @@ static int __init dmasound_atari_init(void) is_falcon = 0; } else return -ENODEV; - if ((mfp.int_en_a & mfp.int_mk_a & 0x20) == 0) + if ((st_mfp.int_en_a & st_mfp.int_mk_a & 0x20) == 0) return dmasound_init(); else { printk("DMA sound driver: Timer A interrupt already in use\n"); -- cgit v1.2.3 From e8bf069c419c1dc0657e02636441fe1179a9db14 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Sun, 22 Feb 2009 14:42:54 +0200 Subject: ALSA: aw2: do not grab every saa7146 based device Audiowerk2 driver snd-aw2 is bound to any saa7146 device as it does not check subsystem ids. Many DVB devices are saa7146 based, so aw2 driver grabs them as well. According to http://lkml.org/lkml/2008/10/15/311 aw2 devices have the subsystem ids set to 0, the saa7146 default. Fix conflicts with DVB devices by checking for subsystem ids = 0 specifically. Signed-off-by: Anssi Hannula Signed-off-by: Takashi Iwai --- sound/pci/aw2/aw2-alsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c index 3f00ddf450f..c7c54e7748e 100644 --- a/sound/pci/aw2/aw2-alsa.c +++ b/sound/pci/aw2/aw2-alsa.c @@ -165,7 +165,7 @@ module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable Audiowerk2 soundcard."); static struct pci_device_id snd_aw2_ids[] = { - {PCI_VENDOR_ID_SAA7146, PCI_DEVICE_ID_SAA7146, PCI_ANY_ID, PCI_ANY_ID, + {PCI_VENDOR_ID_SAA7146, PCI_DEVICE_ID_SAA7146, 0, 0, 0, 0, 0}, {0} }; -- cgit v1.2.3 From 5370d96f85962769ea3df3a81cc885f257c51589 Mon Sep 17 00:00:00 2001 From: Steve Chen Date: Sat, 21 Feb 2009 08:05:04 -0600 Subject: ALSA: fix excessive background noise introduced by OSS emulation rate shrink Incorrect variable was used to get the next sample which caused S2 to be stuck with the same value resulting in loud background noise. Signed-off-by: Steve Chen Cc: Signed-off-by: Takashi Iwai --- sound/core/oss/rate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/core/oss/rate.c b/sound/core/oss/rate.c index a466443c4a2..2fa9299a440 100644 --- a/sound/core/oss/rate.c +++ b/sound/core/oss/rate.c @@ -157,7 +157,7 @@ static void resample_shrink(struct snd_pcm_plugin *plugin, while (dst_frames1 > 0) { S1 = S2; if (src_frames1-- > 0) { - S1 = *src; + S2 = *src; src += src_step; } if (pos & ~R_MASK) { -- cgit v1.2.3 From 2d4663816064fabb68935f920bbd7ccdc7f9392d Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Mon, 23 Feb 2009 13:00:33 +1100 Subject: ALSA: hda - add another MacBook Pro 3,1 SSID Reference: Ubuntu bug #33245 https://bugs.launchpad.net/bugs/332456 Signed-off-by: Luke Yelavich Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index ed8fcbd6000..f6571224b34 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7017,6 +7017,7 @@ static int patch_alc882(struct hda_codec *codec) case 0x106b3e00: /* iMac 24 Aluminium */ board_config = ALC885_IMAC24; break; + case 0x106b00a0: /* MacBookPro3,1 - Another revision */ case 0x106b00a1: /* Macbook (might be wrong - PCI SSID?) */ case 0x106b00a4: /* MacbookPro4,1 */ case 0x106b2c00: /* Macbook Pro rev3 */ -- cgit v1.2.3 From cc374c477c9bf95f409fed16426856d86a97394f Mon Sep 17 00:00:00 2001 From: Juan Jesus Garcia de Soria Date: Mon, 23 Feb 2009 08:11:59 +0100 Subject: ALSA: hda - Quirk for Acer Aspire 6530G The Acer Aspire 6530G needs the 4930G "model" for the front mic to work properly. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f6571224b34..a680be0d453 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -8470,6 +8470,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { ALC888_ACER_ASPIRE_4930G), SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", ALC888_ACER_ASPIRE_4930G), + SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G", + ALC888_ACER_ASPIRE_4930G), SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), /* default Acer */ SND_PCI_QUIRK(0x1028, 0x020d, "Dell Inspiron 530", ALC888_6ST_DELL), SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavillion", ALC883_6ST_DIG), -- cgit v1.2.3 From 1f9da5544073d38e05139f8ce9da24e78653c73e Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 24 Feb 2009 15:31:02 +0100 Subject: ALSA: emu10k1 - Fix digital/analog switch on audigy2 ZS Fix the inverted logic of shared spdif switch. Reference: Novell bnc#478496 https://bugzilla.novell.com/show_bug.cgi?id=478496 Signed-off-by: Takashi Iwai --- sound/pci/emu10k1/emu10k1_main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index 7958006a1d6..101a1c13a20 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c @@ -1528,6 +1528,7 @@ static struct snd_emu_chip_details emu_chip_details[] = { .ca0151_chip = 1, .spk71 = 1, .spdif_bug = 1, + .invert_shared_spdif = 1, /* digital/analog switch swapped */ .ac97_chip = 1} , {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10021102, .driver = "Audigy2", .name = "SB Audigy 2 Platinum [SB0240P]", -- cgit v1.2.3 From ea18aa464452c3e6550320d247c0306aaa2d156f Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 27 Feb 2009 17:36:33 +0100 Subject: ALSA: hda - Fix digital mic on dell-m4-1 and dell-m4-3 Fix num_dmuxes initialization for dell-m4-1 and dell-m4-3 models of IDT 92HD71bxx codec, which was wrongly set to zero. Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 8027edf3c8f..3bc427645da 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4989,7 +4989,7 @@ again: case STAC_DELL_M4_3: spec->num_dmics = 1; spec->num_smuxes = 0; - spec->num_dmuxes = 0; + spec->num_dmuxes = 1; break; default: spec->num_dmics = STAC92HD71BXX_NUM_DMICS; -- cgit v1.2.3 From bb543c969467f33c3a1a0ccfcfcd9a508cd81c54 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 27 Feb 2009 17:44:07 +0100 Subject: ALSA: hda - Add quirk for new HP xw series Added model=hp-bpc for new HP xw series (103c:170b). Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index a680be0d453..6c26afcb826 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -10557,6 +10557,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = { SND_PCI_QUIRK(0x103c, 0x1309, "HP xw4*00", ALC262_HP_BPC), SND_PCI_QUIRK(0x103c, 0x130a, "HP xw6*00", ALC262_HP_BPC), SND_PCI_QUIRK(0x103c, 0x130b, "HP xw8*00", ALC262_HP_BPC), + SND_PCI_QUIRK(0x103c, 0x170b, "HP xw*", ALC262_HP_BPC), SND_PCI_QUIRK(0x103c, 0x2800, "HP D7000", ALC262_HP_BPC_D7000_WL), SND_PCI_QUIRK(0x103c, 0x2801, "HP D7000", ALC262_HP_BPC_D7000_WF), SND_PCI_QUIRK(0x103c, 0x2802, "HP D7000", ALC262_HP_BPC_D7000_WL), -- cgit v1.2.3 From 38f1df27e3191d76e983cb9c6b4392582fd32fda Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 1 Mar 2009 10:55:44 +0100 Subject: ALSA: hda - Add probe_mask default for Toshiba laptop with ALC268 Some Toshiba laptops have another ALC268 codec on slot#3 that conflicts with the primary codec. The codec#3 is for the digital I/O, and should be fixed by the driver, but it'd need a bunch of changes. So, let's fix the probe problem temporarily by setting the default probe_mask value. Reference: kernel bugzilla #12735 http://bugzilla.kernel.org/show_bug.cgi?id=12735 Tested-by: Alexey Dobriyan Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_intel.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound') diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index c8d9178f47e..5e909e0da04 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2095,6 +2095,8 @@ static struct snd_pci_quirk probe_mask_list[] __devinitdata = { SND_PCI_QUIRK(0x1028, 0x20ac, "Dell Studio Desktop", 0x01), /* including bogus ALC268 in slot#2 that conflicts with ALC888 */ SND_PCI_QUIRK(0x17c0, 0x4085, "Medion MD96630", 0x01), + /* conflict of ALC268 in slot#3 (digital I/O); a temporary fix */ + SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba laptop", 0x03), {} }; -- cgit v1.2.3 From 14b97595e0e1f47b6f809e180e5bcd8dcd995690 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 6 Mar 2009 09:42:07 +0100 Subject: ALSA: hda - Fix typos in slave controls in patch_sigmatel.c "Headphone Playback ..." appears twice in slave_vols[] and slave_sws[]. They should be "Headphone Playback2 ..." Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 3bc427645da..995b413078f 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -1207,7 +1207,7 @@ static const char *slave_vols[] = { "LFE Playback Volume", "Side Playback Volume", "Headphone Playback Volume", - "Headphone Playback Volume", + "Headphone2 Playback Volume", "Speaker Playback Volume", "External Speaker Playback Volume", "Speaker2 Playback Volume", @@ -1221,7 +1221,7 @@ static const char *slave_sws[] = { "LFE Playback Switch", "Side Playback Switch", "Headphone Playback Switch", - "Headphone Playback Switch", + "Headphone2 Playback Switch", "Speaker Playback Switch", "External Speaker Playback Switch", "Speaker2 Playback Switch", -- cgit v1.2.3 From c50ff7c04225c945b13d410d50fde6ff6c59d7ee Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 6 Mar 2009 09:43:58 +0100 Subject: ALSA: hda - Fix headphone-detect regression with multiple HP jacks The recent changes over the DAC detection mechanism in patch_sigmatel.c breaks the HP detection on the machines with multiple HP jacks. It's basically because of the workaround to support the multi-channel output. Since the HP detection is more important feature, disable the HP-swap workaroud temporarily. Reference: Novell bnc#482052 https://bugzilla.novell.com/show_bug.cgi?id=482052 Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 995b413078f..6094344fb22 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -3516,6 +3516,7 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out if (! spec->autocfg.line_outs) return 0; /* can't find valid pin config */ +#if 0 /* FIXME: temporarily disabled */ /* If we have no real line-out pin and multiple hp-outs, HPs should * be set up as multi-channel outputs. */ @@ -3535,6 +3536,7 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out spec->autocfg.line_out_type = AUTO_PIN_HP_OUT; spec->autocfg.hp_outs = 0; } +#endif /* FIXME: temporarily disabled */ if (spec->autocfg.mono_out_pin) { int dir = get_wcaps(codec, spec->autocfg.mono_out_pin) & (AC_WCAP_OUT_AMP | AC_WCAP_IN_AMP); -- cgit v1.2.3 From dde332b660cf0bc2baaba678b52768a0fb6e6da2 Mon Sep 17 00:00:00 2001 From: Krzysztof Helt Date: Mon, 16 Mar 2009 21:32:25 +0100 Subject: ALSA: opl3sa2 - Fix NULL dereference when suspending snd_opl3sa2 Fix the OOPS during a opl3sa2 card suspend and resume if the driver is loaded but the card is not found. Signed-off-by: Krzysztof Helt Cc: Signed-off-by: Takashi Iwai --- sound/isa/opl3sa2.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'sound') diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index 58c972b2af0..b848d100186 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c @@ -550,21 +550,27 @@ static int __devinit snd_opl3sa2_mixer(struct snd_card *card) #ifdef CONFIG_PM static int snd_opl3sa2_suspend(struct snd_card *card, pm_message_t state) { - struct snd_opl3sa2 *chip = card->private_data; + if (card) { + struct snd_opl3sa2 *chip = card->private_data; - snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); - chip->wss->suspend(chip->wss); - /* power down */ - snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3); + snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); + chip->wss->suspend(chip->wss); + /* power down */ + snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3); + } return 0; } static int snd_opl3sa2_resume(struct snd_card *card) { - struct snd_opl3sa2 *chip = card->private_data; + struct snd_opl3sa2 *chip; int i; + if (!card) + return 0; + + chip = card->private_data; /* power up */ snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D0); -- cgit v1.2.3