From 27346166a9b3b9eee586bce212502cddf9685a07 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 12 Jan 2006 18:28:44 +0100 Subject: [ALSA] hda-intel - Add single_cmd option for debugging Modules: Documentation,HDA Intel driver Added single_cmd module option for debugging in the case CORB/RIRB doesn't work well (e.g. due to wrong irq routings). Signed-off-by: Takashi Iwai --- Documentation/sound/alsa/ALSA-Configuration.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Documentation') diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 36b511c7cade..cc8a70187199 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -671,6 +671,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. model - force the model name position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size) + single_cmd - Use single immediate commands to communicate with + codecs (for debugging only) This module supports one card and autoprobe. @@ -723,6 +725,17 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. (Usually SD_LPLIB register is more accurate than the position buffer.) + NB: If you get many "azx_get_response timeout" messages at + loading, it's likely a problem of interrupts (e.g. ACPI irq + routing). Try to boot with options like "pci=noacpi". Also, you + can try "single_cmd=1" module option. This will switch the + communication method between HDA controller and codecs to the + single immediate commands instead of CORB/RIRB. Basically, the + single command mode is provided only for BIOS, and you won't get + unsolicited events, too. But, at least, this works independently + from the irq. Remember this is a last resort, and should be + avoided as much as possible... + The power-management is supported. Module snd-hdsp -- cgit v1.2.3 From 7a6c8ff1ef83df4ce44b586999e54966d8e5bda8 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 13 Jan 2006 13:56:33 +0100 Subject: [ALSA] Update description of ice1724 driver Modules: Documentation Updated the description of ice1724 driver. Signed-off-by: Takashi Iwai --- Documentation/sound/alsa/ALSA-Configuration.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Documentation') diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index cc8a70187199..b45f7be47816 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -815,6 +815,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. ------------------ Module for Envy24HT (VT/ICE1724), Envy24PT (VT1720) based PCI sound cards. + * MidiMan M Audio Revolution 5.1 * MidiMan M Audio Revolution 7.1 * AMP Ltd AUDIO2000 * TerraTec Aureon 5.1 Sky @@ -823,6 +824,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. * TerraTec Phase 22 * TerraTec Phase 28 * AudioTrak Prodigy 7.1 + * AudioTrak Prodigy 7.1LT * AudioTrak Prodigy 192 * Pontis MS300 * Albatron K8X800 Pro II @@ -833,9 +835,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. * Shuttle SN25P model - Use the given board model, one of the following: - revo71, amp2000, prodigy71, prodigy192, aureon51, - aureon71, universe, k8x800, phase22, phase28, ms300, - av710 + revo51, revo71, amp2000, prodigy71, prodigy71lt, + prodigy192, aureon51, aureon71, universe, + k8x800, phase22, phase28, ms300, av710 This module supports multiple cards and autoprobe. -- cgit v1.2.3 From d6ec894b6d6bf12885a34a4667bccb7f67e2916c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 20 Jan 2006 14:05:06 +0100 Subject: [ALSA] Add the notes on PM to ens1370/ens1371 sections Modules: Documentation Add the notes on PM to ens1370/ens1371 sections. Signed-off-by: Takashi Iwai --- Documentation/sound/alsa/ALSA-Configuration.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Documentation') diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index b45f7be47816..f28c45ca8395 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -513,6 +513,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. This module supports multiple cards and autoprobe. + The power-management is supported. + Module snd-ens1371 ------------------ @@ -526,6 +528,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. This module supports multiple cards and autoprobe. + The power-management is supported. + Module snd-es968 ---------------- -- cgit v1.2.3 From ed345f8f8630d6a3f52d899e181968e2bf8e4be8 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 1 Mar 2006 14:16:53 +0100 Subject: [ALSA] Update description of hda-intel models Modules: Documentation Updated the description of hda-intel models for realtek codecs. Signed-off-by: Takashi Iwai --- Documentation/sound/alsa/ALSA-Configuration.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Documentation') diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index f28c45ca8395..0daba0a8c4fd 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -703,10 +703,30 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. test for testing/debugging purpose, almost all controls can be adjusted. Appearing only when compiled with $CONFIG_SND_DEBUG=y + auto auto-config reading BIOS (default) ALC260 hp HP machines fujitsu Fujitsu S7020 + acer Acer TravelMate + basic fixed pin assignment (old default model) + auto auto-config reading BIOS (default) + + ALC262 + fujitsu Fujitsu Laptop + basic fixed pin assignment w/o SPDIF + auto auto-config reading BIOS (default) + + ALC882/883/885 + 3stack-dig 3-jack with SPDIF I/O + 6stck-dig 6-jack digital with SPDIF I/O + auto auto-config reading BIOS (default) + + ALC861 + 3stack 3-jack + 3stack-dig 3-jack with SPDIF I/O + 6stack-dig 6-jack with SPDIF I/O + auto auto-config reading BIOS (default) CMI9880 minimal 3-jack in back -- cgit v1.2.3 From 0b7bed4ec2a16434336e018505b66bd51bb35560 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 2 Mar 2006 15:35:55 +0100 Subject: [ALSA] Fix typos in document Modules: Documentation Fixed typos in document. Signed-off-by: Takashi Iwai --- Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Documentation') diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index 4251085d38d3..6dc9d9f622ca 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl @@ -1834,7 +1834,7 @@ mychip_set_sample_format(chip, runtime->format); mychip_set_sample_rate(chip, runtime->rate); mychip_set_channels(chip, runtime->channels); - mychip_set_dma_setup(chip, runtime->dma_area, + mychip_set_dma_setup(chip, runtime->dma_addr, chip->buffer_size, chip->period_size); return 0; @@ -3388,7 +3388,7 @@ struct _snd_pcm_runtime { .name = "PCM Playback Switch", .index = 0, .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .private_values = 0xffff, + .private_value = 0xffff, .info = my_control_info, .get = my_control_get, .put = my_control_put @@ -3449,7 +3449,7 @@ struct _snd_pcm_runtime { - The private_values field contains + The private_value field contains an arbitrary long integer value for this record. When using generic info, get and -- cgit v1.2.3 From ae6b813a4dbba2713df497c032798b845289653f Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 3 Mar 2006 16:47:17 +0100 Subject: [ALSA] hda-codec - Add lg model for LG laptop Modules: Documentation,HDA Codec driver Added a new model 'lg' for LG laptop (m1 express dual) with ALC880 codec. Also clean up the initialization/unsol_event hooks in patch_realtek.c. Signed-off-by: Takashi Iwai --- Documentation/sound/alsa/ALSA-Configuration.txt | 1 + sound/pci/hda/patch_realtek.c | 220 +++++++++++++++++++++--- 2 files changed, 193 insertions(+), 28 deletions(-) (limited to 'Documentation') diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 0daba0a8c4fd..c12dab05176a 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -700,6 +700,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. asus 3-jack uniwill 3-jack F1734 2-jack + lg LG laptop (m1 express dual) test for testing/debugging purpose, almost all controls can be adjusted. Appearing only when compiled with $CONFIG_SND_DEBUG=y diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 5de754a51fc7..fcab766862d4 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -51,6 +51,7 @@ enum { ALC880_UNIWILL_DIG, ALC880_CLEVO, ALC880_TCL_S700, + ALC880_LG, #ifdef CONFIG_SND_DEBUG ALC880_TEST, #endif @@ -147,6 +148,10 @@ struct alc_spec { struct hda_input_mux private_imux; hda_nid_t private_dac_nids[5]; + /* hooks */ + void (*init_hook)(struct hda_codec *codec); + void (*unsol_event)(struct hda_codec *codec, unsigned int res); + /* for pin sensing */ unsigned int sense_updated: 1; unsigned int jack_present: 1; @@ -168,6 +173,8 @@ struct alc_config_preset { unsigned int num_channel_mode; const struct hda_channel_mode *channel_mode; const struct hda_input_mux *input_mux; + void (*unsol_event)(struct hda_codec *, unsigned int); + void (*init_hook)(struct hda_codec *); }; @@ -481,6 +488,9 @@ static void setup_preset(struct alc_spec *spec, const struct alc_config_preset * spec->num_adc_nids = preset->num_adc_nids; spec->adc_nids = preset->adc_nids; spec->dig_in_nid = preset->dig_in_nid; + + spec->unsol_event = preset->unsol_event; + spec->init_hook = preset->init_hook; } /* @@ -1283,6 +1293,141 @@ static struct hda_verb alc880_pin_tcl_S700_init_verbs[] = { }; /* + * LG m1 express dual + * + * Pin assignment: + * Rear Line-In/Out (blue): 0x14 + * Build-in Mic-In: 0x15 + * Speaker-out: 0x17 + * HP-Out (green): 0x1b + * Mic-In/Out (red): 0x19 + * SPDIF-Out: 0x1e + */ + +/* To make 5.1 output working (green=Front, blue=Surr, red=CLFE) */ +static hda_nid_t alc880_lg_dac_nids[3] = { + 0x05, 0x02, 0x03 +}; + +/* seems analog CD is not working */ +static struct hda_input_mux alc880_lg_capture_source = { + .num_items = 3, + .items = { + { "Mic", 0x1 }, + { "Line", 0x5 }, + { "Internal Mic", 0x6 }, + }, +}; + +/* 2,4,6 channel modes */ +static struct hda_verb alc880_lg_ch2_init[] = { + /* set line-in and mic-in to input */ + { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, + { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, + { } +}; + +static struct hda_verb alc880_lg_ch4_init[] = { + /* set line-in to out and mic-in to input */ + { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, + { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, + { } +}; + +static struct hda_verb alc880_lg_ch6_init[] = { + /* set line-in and mic-in to output */ + { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, + { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, + { } +}; + +static struct hda_channel_mode alc880_lg_ch_modes[3] = { + { 2, alc880_lg_ch2_init }, + { 4, alc880_lg_ch4_init }, + { 6, alc880_lg_ch6_init }, +}; + +static struct snd_kcontrol_new alc880_lg_mixer[] = { + /* FIXME: it's not really "master" but front channels */ + HDA_CODEC_VOLUME("Master Playback Volume", 0x0f, 0x0, HDA_OUTPUT), + HDA_BIND_MUTE("Master Playback Switch", 0x0f, 2, HDA_INPUT), + HDA_CODEC_VOLUME("Surround Playback Volume", 0x0c, 0x0, HDA_OUTPUT), + HDA_BIND_MUTE("Surround Playback Switch", 0x0c, 2, HDA_INPUT), + HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0d, 1, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0d, 2, 0x0, HDA_OUTPUT), + HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0d, 1, 2, HDA_INPUT), + HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0d, 2, 2, HDA_INPUT), + HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), + HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), + HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x06, HDA_INPUT), + HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x06, HDA_INPUT), + HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x07, HDA_INPUT), + HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x07, HDA_INPUT), + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Channel Mode", + .info = alc_ch_mode_info, + .get = alc_ch_mode_get, + .put = alc_ch_mode_put, + }, + { } /* end */ +}; + +static struct hda_verb alc880_lg_init_verbs[] = { + /* set capture source to mic-in */ + {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + /* mute all amp mixer inputs */ + {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(5)}, + {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(6)}, + {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(7)}, + /* line-in to input */ + {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, + {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + /* built-in mic */ + {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + /* speaker-out */ + {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + /* mic-in to input */ + {0x11, AC_VERB_SET_CONNECT_SEL, 0x01}, + {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, + {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + /* HP-out */ + {0x13, AC_VERB_SET_CONNECT_SEL, 0x03}, + {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, + {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + /* jack sense */ + {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | 0x1}, + { } +}; + +/* toggle speaker-output according to the hp-jack state */ +static void alc880_lg_automute(struct hda_codec *codec) +{ + unsigned int present; + + present = snd_hda_codec_read(codec, 0x1b, 0, + AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; + snd_hda_codec_amp_update(codec, 0x17, 0, HDA_OUTPUT, 0, + 0x80, present ? 0x80 : 0); + snd_hda_codec_amp_update(codec, 0x17, 1, HDA_OUTPUT, 0, + 0x80, present ? 0x80 : 0); +} + +static void alc880_lg_unsol_event(struct hda_codec *codec, unsigned int res) +{ + /* Looks like the unsol event is incompatible with the standard + * definition. 4bit tag is placed at 28 bit! + */ + if ((res >> 28) == 0x01) + alc880_lg_automute(codec); +} + +/* + * Common callbacks */ static int alc_init(struct hda_codec *codec) @@ -1292,9 +1437,21 @@ static int alc_init(struct hda_codec *codec) for (i = 0; i < spec->num_init_verbs; i++) snd_hda_sequence_write(codec, spec->init_verbs[i]); + + if (spec->init_hook) + spec->init_hook(codec); + return 0; } +static void alc_unsol_event(struct hda_codec *codec, unsigned int res) +{ + struct alc_spec *spec = codec->spec; + + if (spec->unsol_event) + spec->unsol_event(codec, res); +} + #ifdef CONFIG_PM /* * resume @@ -1531,6 +1688,7 @@ static struct hda_codec_ops alc_patch_ops = { .build_pcms = alc_build_pcms, .init = alc_init, .free = alc_free, + .unsol_event = alc_unsol_event, #ifdef CONFIG_PM .resume = alc_resume, #endif @@ -1549,13 +1707,15 @@ static hda_nid_t alc880_test_dac_nids[4] = { }; static struct hda_input_mux alc880_test_capture_source = { - .num_items = 5, + .num_items = 7, .items = { { "In-1", 0x0 }, { "In-2", 0x1 }, { "In-3", 0x2 }, { "In-4", 0x3 }, { "CD", 0x4 }, + { "Front", 0x5 }, + { "Surround", 0x6 }, }, }; @@ -1911,6 +2071,9 @@ static struct hda_board_config alc880_cfg_tbl[] = { { .pci_subvendor = 0x1734, .pci_subdevice = 0x107c, .config = ALC880_F1734 }, { .pci_subvendor = 0x1584, .pci_subdevice = 0x9054, .config = ALC880_F1734 }, + { .modelname = "lg", .config = ALC880_LG }, + { .pci_subvendor = 0x1854, .pci_subdevice = 0x003b, .config = ALC880_LG }, + #ifdef CONFIG_SND_DEBUG { .modelname = "test", .config = ALC880_TEST }, #endif @@ -2088,6 +2251,19 @@ static struct alc_config_preset alc880_presets[] = { .channel_mode = alc880_threestack_modes, .input_mux = &alc880_capture_source, }, + [ALC880_LG] = { + .mixers = { alc880_lg_mixer }, + .init_verbs = { alc880_volume_init_verbs, + alc880_lg_init_verbs }, + .num_dacs = ARRAY_SIZE(alc880_lg_dac_nids), + .dac_nids = alc880_lg_dac_nids, + .dig_out_nid = ALC880_DIGOUT_NID, + .num_channel_mode = ARRAY_SIZE(alc880_lg_ch_modes), + .channel_mode = alc880_lg_ch_modes, + .input_mux = &alc880_lg_capture_source, + .unsol_event = alc880_lg_unsol_event, + .init_hook = alc880_lg_automute, + }, #ifdef CONFIG_SND_DEBUG [ALC880_TEST] = { .mixers = { alc880_test_mixer }, @@ -2427,14 +2603,12 @@ static int alc880_parse_auto_config(struct hda_codec *codec) return 1; } -/* init callback for auto-configuration model -- overriding the default init */ -static int alc880_auto_init(struct hda_codec *codec) +/* additional initialization for auto-configuration model */ +static void alc880_auto_init(struct hda_codec *codec) { - alc_init(codec); alc880_auto_init_multi_out(codec); alc880_auto_init_extra_out(codec); alc880_auto_init_analog_input(codec); - return 0; } /* @@ -2501,7 +2675,7 @@ static int patch_alc880(struct hda_codec *codec) codec->patch_ops = alc_patch_ops; if (board_config == ALC880_AUTO) - codec->patch_ops.init = alc880_auto_init; + spec->init_hook = alc880_auto_init; return 0; } @@ -3456,13 +3630,11 @@ static int alc260_parse_auto_config(struct hda_codec *codec) return 1; } -/* init callback for auto-configuration model -- overriding the default init */ -static int alc260_auto_init(struct hda_codec *codec) +/* additional initialization for auto-configuration model */ +static void alc260_auto_init(struct hda_codec *codec) { - alc_init(codec); alc260_auto_init_multi_out(codec); alc260_auto_init_analog_input(codec); - return 0; } /* @@ -3614,7 +3786,7 @@ static int patch_alc260(struct hda_codec *codec) codec->patch_ops = alc_patch_ops; if (board_config == ALC260_AUTO) - codec->patch_ops.init = alc260_auto_init; + spec->init_hook = alc260_auto_init; return 0; } @@ -4089,14 +4261,12 @@ static int alc882_parse_auto_config(struct hda_codec *codec) return err; } -/* init callback for auto-configuration model -- overriding the default init */ -static int alc882_auto_init(struct hda_codec *codec) +/* additional initialization for auto-configuration model */ +static void alc882_auto_init(struct hda_codec *codec) { - alc_init(codec); alc882_auto_init_multi_out(codec); alc882_auto_init_hp_out(codec); alc882_auto_init_analog_input(codec); - return 0; } /* @@ -4163,7 +4333,7 @@ static int patch_alc882(struct hda_codec *codec) codec->patch_ops = alc_patch_ops; if (board_config == ALC882_AUTO) - codec->patch_ops.init = alc882_auto_init; + spec->init_hook = alc882_auto_init; return 0; } @@ -4583,13 +4753,11 @@ static int alc262_parse_auto_config(struct hda_codec *codec) /* init callback for auto-configuration model -- overriding the default init */ -static int alc262_auto_init(struct hda_codec *codec) +static void alc262_auto_init(struct hda_codec *codec) { - alc_init(codec); alc262_auto_init_multi_out(codec); alc262_auto_init_hp_out(codec); alc262_auto_init_analog_input(codec); - return 0; } /* @@ -4624,6 +4792,7 @@ static struct alc_config_preset alc262_presets[] = { .num_channel_mode = ARRAY_SIZE(alc262_modes), .channel_mode = alc262_modes, .input_mux = &alc262_fujitsu_capture_source, + .unsol_event = alc262_fujitsu_unsol_event, }, }; @@ -4698,9 +4867,7 @@ static int patch_alc262(struct hda_codec *codec) codec->patch_ops = alc_patch_ops; if (board_config == ALC262_AUTO) - codec->patch_ops.init = alc262_auto_init; - if (board_config == ALC262_FUJITSU) - codec->patch_ops.unsol_event = alc262_fujitsu_unsol_event; + spec->init_hook = alc262_auto_init; return 0; } @@ -5262,15 +5429,12 @@ static int alc861_parse_auto_config(struct hda_codec *codec) return 1; } -/* init callback for auto-configuration model -- overriding the default init */ -static int alc861_auto_init(struct hda_codec *codec) +/* additional initialization for auto-configuration model */ +static void alc861_auto_init(struct hda_codec *codec) { - alc_init(codec); alc861_auto_init_multi_out(codec); alc861_auto_init_hp_out(codec); alc861_auto_init_analog_input(codec); - - return 0; } @@ -5368,7 +5532,7 @@ static int patch_alc861(struct hda_codec *codec) codec->patch_ops = alc_patch_ops; if (board_config == ALC861_AUTO) - codec->patch_ops.init = alc861_auto_init; + spec->init_hook = alc861_auto_init; return 0; } -- cgit v1.2.3 From 9230d2148a0c53188c216b446cf17ea213ebca8a Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 13 Mar 2006 13:49:49 +0100 Subject: [ALSA] hda-codec - Fix support of laptops with AD1986A codec Modules: Documentation,HDA Codec driver Fix the support of laptops with AD1986A HD-audio codec. Added new models '3stack' and 'laptop'. Currently, fixed for FSC V2060 and Samsung M50. Also fixed the description of missing models in ALSA-Configuration.txt. Signed-off-by: Takashi Iwai --- Documentation/sound/alsa/ALSA-Configuration.txt | 18 ++++ sound/pci/hda/patch_analog.c | 131 ++++++++++++++++++++++++ 2 files changed, 149 insertions(+) (limited to 'Documentation') diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index c12dab05176a..1065beed8d75 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -737,6 +737,24 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. allout 5-jack in back, 2-jack in front, SPDIF out auto auto-config reading BIOS (default) + AD1981 + basic 3-jack (default) + hp HP nx6320 + + AD1986A + 6stack 6-jack, separate surrounds (default) + 3stack 3-stack, shared surrounds + laptop 2-channel only (FSC V2060, Samsung M50) + + AD1988 + 6stack 6-jack + 6stack-dig ditto with SPDIF + 3stack 3-jack + 3stack-dig ditto with SPDIF + laptop 3-jack with hp-jack automute + laptop-dig ditto with SPDIF + auto auto-confgi reading BIOS (default) + If the default configuration doesn't work and one of the above matches with your device, report it together with the PCI subsystem ID (output of "lspci -nv") to ALSA BTS or alsa-devel diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 4d363cfa6c81..cdcc815a9320 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -379,6 +379,14 @@ static int ad198x_eapd_put(struct snd_kcontrol *kcontrol, return 1; } +static int ad198x_ch_mode_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo); +static int ad198x_ch_mode_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol); +static int ad198x_ch_mode_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol); + + /* * AD1986A specific */ @@ -527,6 +535,52 @@ static struct snd_kcontrol_new ad1986a_mixers[] = { { } /* end */ }; +/* additional mixers for 3stack mode */ +static struct snd_kcontrol_new ad1986a_3st_mixers[] = { + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Channel Mode", + .info = ad198x_ch_mode_info, + .get = ad198x_ch_mode_get, + .put = ad198x_ch_mode_put, + }, + { } /* end */ +}; + +/* laptop model - 2ch only */ +static hda_nid_t ad1986a_laptop_dac_nids[1] = { AD1986A_FRONT_DAC }; + +static struct snd_kcontrol_new ad1986a_laptop_mixers[] = { + HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Master Playback Volume", 0x1b, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Master Playback Switch", 0x1b, 0x0, HDA_OUTPUT), + /* HDA_CODEC_VOLUME("Headphone Playback Volume", 0x1a, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x0, HDA_OUTPUT), */ + HDA_CODEC_VOLUME("CD Playback Volume", 0x15, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("CD Playback Switch", 0x15, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Line Playback Volume", 0x17, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Line Playback Switch", 0x17, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Aux Playback Volume", 0x16, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Aux Playback Switch", 0x16, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), + /* HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x18, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x18, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Mono Playback Volume", 0x1e, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Mono Playback Switch", 0x1e, 0x0, HDA_OUTPUT), */ + HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Capture Switch", 0x12, 0x0, HDA_OUTPUT), + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Capture Source", + .info = ad198x_mux_enum_info, + .get = ad198x_mux_enum_get, + .put = ad198x_mux_enum_put, + }, + { } /* end */ +}; + /* * initialization verbs */ @@ -585,10 +639,68 @@ static struct hda_verb ad1986a_init_verbs[] = { { } /* end */ }; +/* additional verbs for 3-stack model */ +static struct hda_verb ad1986a_3st_init_verbs[] = { + /* Mic and line-in selectors */ + {0x0f, AC_VERB_SET_CONNECT_SEL, 0x2}, + {0x10, AC_VERB_SET_CONNECT_SEL, 0x1}, + { } /* end */ +}; + +static struct hda_verb ad1986a_ch2_init[] = { + /* Surround out -> Line In */ + { 0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + { 0x1c, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + /* CLFE -> Mic in */ + { 0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + { 0x1d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + { } /* end */ +}; + +static struct hda_verb ad1986a_ch4_init[] = { + /* Surround out -> Surround */ + { 0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + { 0x1c, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, + /* CLFE -> Mic in */ + { 0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + { 0x1d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + { } /* end */ +}; + +static struct hda_verb ad1986a_ch6_init[] = { + /* Surround out -> Surround out */ + { 0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + { 0x1c, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, + /* CLFE -> CLFE */ + { 0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + { 0x1d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, + { } /* end */ +}; + +static struct hda_channel_mode ad1986a_modes[3] = { + { 2, ad1986a_ch2_init }, + { 4, ad1986a_ch4_init }, + { 6, ad1986a_ch6_init }, +}; + +/* models */ +enum { AD1986A_6STACK, AD1986A_3STACK, AD1986A_LAPTOP }; + +static struct hda_board_config ad1986a_cfg_tbl[] = { + { .modelname = "6stack", .config = AD1986A_6STACK }, + { .modelname = "3stack", .config = AD1986A_3STACK }, + { .modelname = "laptop", .config = AD1986A_LAPTOP }, + { .pci_subvendor = 0x144d, .pci_subdevice = 0xc01e, + .config = AD1986A_LAPTOP }, /* FSC V2060 */ + { .pci_subvendor = 0x17c0, .pci_subdevice = 0x2017, + .config = AD1986A_LAPTOP }, /* Samsung M50 */ + {} +}; static int patch_ad1986a(struct hda_codec *codec) { struct ad198x_spec *spec; + int board_config; spec = kzalloc(sizeof(*spec), GFP_KERNEL); if (spec == NULL) @@ -612,6 +724,25 @@ static int patch_ad1986a(struct hda_codec *codec) codec->patch_ops = ad198x_patch_ops; + /* override some parameters */ + board_config = snd_hda_check_board_config(codec, ad1986a_cfg_tbl); + switch (board_config) { + case AD1986A_3STACK: + spec->num_mixers = 2; + spec->mixers[1] = ad1986a_3st_mixers; + spec->num_init_verbs = 2; + spec->init_verbs[1] = ad1986a_3st_init_verbs; + spec->channel_mode = ad1986a_modes; + spec->num_channel_mode = ARRAY_SIZE(ad1986a_modes); + break; + case AD1986A_LAPTOP: + spec->mixers[0] = ad1986a_laptop_mixers; + spec->multiout.max_channels = 2; + spec->multiout.num_dacs = 1; + spec->multiout.dac_nids = ad1986a_laptop_dac_nids; + break; + } + return 0; } -- cgit v1.2.3 From e311334ee6bdd173d53be52f4fdffa5f39652e26 Mon Sep 17 00:00:00 2001 From: Thibault LE MEUR Date: Tue, 14 Mar 2006 11:44:53 +0100 Subject: [ALSA] Fixes audiophile usb analog capture with the new device_setup parameter Modules: Documentation,USB generic driver The patch adds the 'device_setup' module parameter and a specific quirk to correctly initialize the audiophile usb device: this fixes the distorted sound bug on the Analog capture port. Backward compatibility is achieved by simply omitting the new parameter. Signed-off-by: Thibault LE MEUR Signed-off-by: Takashi Iwai --- Documentation/sound/alsa/ALSA-Configuration.txt | 3 + Documentation/sound/alsa/Audiophile-Usb.txt | 330 ++++++++++++++++++++++++ sound/usb/usbaudio.c | 52 +++- 3 files changed, 384 insertions(+), 1 deletion(-) create mode 100644 Documentation/sound/alsa/Audiophile-Usb.txt (limited to 'Documentation') diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 1065beed8d75..f947c4b04ab8 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -1411,6 +1411,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. vid - Vendor ID for the device (optional) pid - Product ID for the device (optional) + device_setup - Device specific magic number (optional) + - Influence depends on the device + - Default: 0x0000 This module supports multiple devices, autoprobe and hotplugging. diff --git a/Documentation/sound/alsa/Audiophile-Usb.txt b/Documentation/sound/alsa/Audiophile-Usb.txt new file mode 100644 index 000000000000..3ba45adbf040 --- /dev/null +++ b/Documentation/sound/alsa/Audiophile-Usb.txt @@ -0,0 +1,330 @@ + Guide to using M-Audio Audiophile USB with ALSA and Jack v1.1 + ======================================================== + + Thibault Le Meur + +This document is a guide to using the M-Audio Audiophile USB (tm) device with +ALSA and JACK. + +1 - Audiophile USB Specs and correct usage +========================================== +This part is a reminder of important facts about the functions and limitations +of the device. + +The device has 4 audio interfaces, and 2 MIDI ports: + * Analog Stereo Input (Ai) + * Analog Stereo Output (Ao) + * Digital Stereo Input (Di) + * Digital Stereo Output (Do) + * Midi In (Mi) + * Midi Out (Mo) + +The internal DAC/ADC has the following caracteristics: +* sample depth of 16 or 24 bits +* sample rate from 8kHz to 96kHz +* Two ports can't use different sample depths at the same time.Moreover, the +Audiophile USB documentation gives the following Warning: "Please exit any +audio application running before switching between bit depths" + +Due to the USB 1.1 bandwidth limitation, a limited number of interfaces can be +activated at the same time depending on the audio mode selected: + * 16-bit/48kHz ==> 4 channels in/ 4 channels out + - Ai+Ao+Di+Do + * 24-bit/48kHz ==> 4 channels in/2 channels out, + or 2 channels in/4 channels out + - Ai+Ao+Do or Ai+Di+Ao or Ai+Di+Do or Di+Ao+Do + * 24-bit/96kHz ==> 2 channels in, or 2 channels out (half duplex only) + - Ai or Ao or Di or Do + +Important facts about the Digital interface: +-------------------------------------------- + * The Do port additionnaly supports surround-encoded AC-3 and DTS passthrough, +though I haven't tested it under linux + - Note that in this setup only the Do interface can be enabled + * Apart from recording an audio digital stream, enabling the Di port is a way +to syncrhonize the device to an external sample clock + - As a consequence, the Di port must be enable only if an active Digital +source is connected + - Enabling Di when no digital source is connected can result in a +synchronization error (for instance sound played at an odd sample rate) + + +2 - Audiophile USB support in ALSA +================================== + +2.1 - MIDI ports +---------------- +The Audiophile USB MIDI ports will be automatically supported once the +following modules have been loaded: + * snd-usb-audio + * snd-seq + * snd-seq-midi + +No additionnal setting is required. + +2.2 - Audio ports +----------------- + +Audio functions of the Audiophile USB device are handled by the snd-usb-audio +module. This module can work in a default mode (without any device-specific +parameter), or in an advanced mode with the device-specific parameter called +"device_setup". + +2.2.1 - Default Alsa driver mode + +The default behaviour of the snd-usb-audio driver is to parse the device +capabilities at startup and enable all functions inside the device (including +all ports at any sample rates and any sample depths supported). This approach +has the advantage to let the driver easily switch from sample rates/depths +automatically according to the need of the application claiming the device. + +In this case the Audiophile ports are mapped to alsa pcm devices in the +following way (I suppose the device's index is 1): + * hw:1,0 is Ao in playback and Di in capture + * hw:1,1 is Do in playback and Ai in capture + * hw:1,2 is Do in AC3/DTS passthrough mode + +You must note as well that the device uses Big Endian byte encoding so that +supported audio format are S16_BE for 16-bit depth modes and S24_3BE for +24-bits depth mode. One exception is the hw:1,2 port which is Little Endian +compliant and thus uses S16_LE. + +Examples: + * playing a S24_3BE encoded raw file to the Ao port + % aplay -D hw:1,0 -c2 -t raw -r48000 -fS24_3BE test.raw + * recording a S24_3BE encoded raw file from the Ai port + % arecord -D hw:1,1 -c2 -t raw -r48000 -fS24_3BE test.raw + * playing a S16_BE encoded raw file to the Do port + % aplay -D hw:1,1 -c2 -t raw -r48000 -fS16_BE test.raw + +If you're happy with the default Alsa driver setup and don't experience any +issue with this mode, then you can skip the following chapter. + +2.2.2 - Advanced module setup + +Due to the hardware constraints described above, the device initialization made +by the Alsa driver in default mode may result in a corrupted state of the +device. For instance, a particularly annoying issue is that the sound captured +from the Ai port sounds distorted (as if boosted with an excessive high volume +gain). + +For people having this problem, the snd-usb-audio module has a new module +parameter called "device_setup". + +2.2.2.1 - Initializing the working mode of the Audiohile USB + +As far as the Audiohile USB device is concerned, this value let the user +specify: + * the sample depth + * the sample rate + * whether the Di port is used or not + +Here is a list of supported device_setup values for this device: + * device_setup=0x00 (or omitted) + - Alsa driver default mode + - maintains backward compatibility with setups that do not use this + parameter by not introducing any change + - results sometimes in corrupted sound as decribed earlier + * device_setup=0x01 + - 16bits 48kHz mode with Di disabled + - Ai,Ao,Do can be used at the same time + - hw:1,0 is not available in capture mode + - hw:1,2 is not available + * device_setup=0x11 + - 16bits 48kHz mode with Di enabled + - Ai,Ao,Di,Do can be used at the same time + - hw:1,0 is available in capture mode + - hw:1,2 is not available + * device_setup=0x09 + - 24bits 48kHz mode with Di disabled + - Ai,Ao,Do can be used at the same time + - hw:1,0 is not available in capture mode + - hw:1,2 is not available + * device_setup=0x19 + - 24bits 48kHz mode with Di enabled + - 3 ports from {Ai,Ao,Di,Do} can be used at the same time + - hw:1,0 is available in capture mode and an active digital source must be + connected to Di + - hw:1,2 is not available + * device_setup=0x0D or 0x10 + - 24bits 96kHz mode + - Di is enabled by default for this mode but does not need to be connected + to an active source + - Only 1 port from {Ai,Ao,Di,Do} can be used at the same time + - hw:1,0 is available in captured mode + - hw:1,2 is not available + * device_setup=0x03 + - 16bits 48kHz mode with only the Do port enabled + - AC3 with DTS passthru (not tested) + - Caution with this setup the Do port is mapped to the pcm device hw:1,0 + +2.2.2.2 - Setting and switching configurations with the device_setup parameter + +The parameter can be given: + * By manually probing the device (as root): + # modprobe -r snd-usb-audio + # modprobe snd-usb-audio index=1 device_setup=0x09 + * Or while configuring the modules options in your modules configuration file + - For Fedora distributions, edit the /etc/modprobe.conf file: + alias snd-card-1 snd-usb-audio + options snd-usb-audio index=1 device_setup=0x09 + +IMPORTANT NOTE WHEN SWITCHING CONFIGURATION: +------------------------------------------- + * You may need to _first_ intialize the module with the correct device_setup + parameter and _only_after_ turn on the Audiophile USB device + * This is especially true when switching the sample depth: + - first trun off the device + - de-register the snd-usb-audio module + - change the device_setup parameter (by either manually reprobing the module + or changing modprobe.conf) + - turn on the device + +2.2.2.3 - Setting and switching configurations with the device_setup parameter + +If you want to understand the device_setup magic numbers for the Audiophile +USB, you need some very basic understanding of binary computation. However, +this is not required to use the parameter and you may skip thi section. + +The device_setup is one byte long and its structure is the following: + + +---+---+---+---+---+---+---+---+ + | b7| b6| b5| b4| b3| b2| b1| b0| + +---+---+---+---+---+---+---+---+ + | 0 | 0 | 0 | Di|24B|96K|DTS|SET| + +---+---+---+---+---+---+---+---+ + +Where: + * b0 is the "SET" bit + - it MUST be set if device_setup is initialized + * b1 is the "DTS" bit + - it is set only for Digital output with DTS/AC3 + - this setup is not tested + * b2 is the Rate selection flag + - When set to "1" the rate range is 48.1-96kHz + - Otherwise the sample rate range is 8-48kHz + * b3 is the bit depth selection flag + - When set to "1" samples are 24bits long + - Otherwise they are 16bits long + - Note that b2 implies b3 as the 96kHz mode is only supported for 24 bits + samples + * b4 is the Digital input flag + - When set to "1" the device assumes that an active digital source is + connected + - You shouldn't enable Di if no source is seen on the port (this leads to + synchronization issues) + - b4 is implied by b2 (since only one port is enabled at a time no synch + error can occur) + * b5 to b7 are reserved for future uses, and must be set to "0" + - might become Ao, Do, Ai, for b7, b6, b4 respectively + +Caution: + * there is no check on the value you will give to device_setup + - for instance choosing 0x05 (16bits 96kHz) will fail back to 0x09 since + b2 implies b3. But _there_will_be_no_warning_ in /var/log/messages + * Hardware constraints due to the USB bus limitation aren't checked + - choosing b2 will prepare all interfaces for 24bits/96kHz but you'll + only be able to use one at the same time + +2.2.3 - Technical Details for Audiophile Usb + +You may safely skip this section if you're not interrested in driver +development. + +This section describes some internals aspect of the device and summarize the +data I got by usb-snooping the windows and linux drivers. + +The M-Audio Audiophile USB has 7 Usb Interfaces: +a "USB interface": + * Usb Interface nb.0 + * Usb Interface nb.1 + - Audio Control function + * Usb Interface nb.2 + - Analog Output + * Usb Interface nb.3 + - Digital Output + * Usb Interface nb.4 + - Analog Input + * Usb Interface nb.5 + - Digital Input + * Usb Interface nb.6 + - MIDI interface compliant with the MIDIMAN quirk + +Each interface has 5 altsettings (AltSet 1,2,3,4,5) except: + * Interface 3 (Digital Out) has an extra Alset nb.6 + * Interface 5 (Digital In) does not have Alset nb.3 and 5 + +Here is a short description of the AltSettings capabilities: + * AltSettings 1 corresponds to + - 24-bit depth, 48.1-96kHz sample mode + - Adaptive playback (Ao and Do), Synch capture (Ai), or Asynch capture (Di) + * AltSettings 2 corresponds to + - 24-bit depth, 8-48kHz sample mode + - Asynch capture and playback (Ao,Ai,Do,Di) + * AltSettings 3 corresponds to + - 24-bit depth, 8-48kHz sample mode + - Synch capture (Ai) and Adaptive playback (Ao,Do) + * AltSettings 4 corresponds to + - 16-bit depth, 8-48kHz sample mode + - Asynch capture and playback (Ao,Ai,Do,Di) + * AltSettings 5 corresponds to + - 16-bit depth, 8-48kHz sample mode + - Synch capture (Ai) and Adaptive playback (Ao,Do) + * AltSettings 6 corresponds to + - 16-bit depth, 8-48kHz sample mode + - Synch playback (Do), audio format type III IEC1937_AC-3 + +In order to ensure a correct intialization of the device, the driver +_must_know_ how the device will be used: + * if DTS is choosen, only Interface 2 with AltSet nb.6 must be + registered + * if 96KHz only AltSets nb.1 of each interface must be selected + * if samples are using 24bits/48KHz then AltSet 2 must me used if + Digital input is connected, and only AltSet nb.3 if Digital input + is not connected + * if samples are using 16bits/48KHz then AltSet 4 must me used if + Digital input is connected, and only AltSet nb.5 if Digital input + is not connected + +When device_setup is given as a parameter to the snd-usb-audio module, the +parse_audio_enpoint function uses a quirk called +"audiophile_skip_setting_quirk" in order to prevent AltSettings not +corresponding to device_setup from being registered in the driver. + +3 - Audiophile USB and Jack support +=================================== + +This section deals with support of the Audiophile USB device in Jack. +The main issue regarding this support is that the device is Big Endian +compliant. + +3.1 - Using the plug alsa plugin +-------------------------------- + +Jack doesn't directly support big endian devices. Thus, one way to have support +for this device with Alsa is to use the Alsa "plug" converter. + +For instance here is one way to run Jack with 2 playback channels on Ao and 2 +capture channels from Ai: + % jackd -R -dalsa -dplughw:1 -r48000 -p256 -n2 -D -Cplughw:1,1 + + +However you may see the following warning message: +"You appear to be using the ALSA software "plug" layer, probably a result of +using the "default" ALSA device. This is less efficient than it could be. +Consider using a hardware device instead rather than using the plug layer." + + +3.2 - Patching alsa to use direct pcm device +------------------------------------------- +A patch for Jack by Andreas Steinmetz adds support for Big Endian devices. +However it has not been included in the CVS tree. + +You can find it at the following URL: +http://sourceforge.net/tracker/index.php?func=detail&aid=1289682&group_id=39687& +atid=425939 + +After having applied the patch you can run jackd with the following command +line: +# /usr/local/bin/jackd -R -dalsa -Phw:1,0 -r48000 -p128 -n2 -D -Chw:1,1 + diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 6fad2c40c77c..4e614ac39f21 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -70,6 +70,7 @@ static int vid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 }; /* Vendor ID for static int pid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 }; /* Product ID for this card */ static int nrpacks = 4; /* max. number of packets per urb */ static int async_unlink = 1; +static int device_setup[SNDRV_CARDS]; /* device parameter for this card*/ module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for the USB audio adapter."); @@ -85,6 +86,8 @@ module_param(nrpacks, int, 0644); MODULE_PARM_DESC(nrpacks, "Max. number of packets per URB."); module_param(async_unlink, bool, 0444); MODULE_PARM_DESC(async_unlink, "Use async unlink mode."); +module_param_array(device_setup, int, NULL, 0444); +MODULE_PARM_DESC(device_setup, "Specific device setup (if needed)."); /* @@ -2547,6 +2550,8 @@ static int parse_audio_format(struct snd_usb_audio *chip, struct audioformat *fp return 0; } +static int audiophile_skip_setting_quirk(struct snd_usb_audio *chip, + int iface, int altno); static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no) { struct usb_device *dev; @@ -2581,6 +2586,12 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no) stream = (get_endpoint(alts, 0)->bEndpointAddress & USB_DIR_IN) ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK; altno = altsd->bAlternateSetting; + + /* audiophile usb: skip altsets incompatible with device_setup + */ + if (chip->usb_id == USB_ID(0x0763, 0x2003) && + audiophile_skip_setting_quirk(chip, iface_no, altno)) + continue; /* get audio formats */ fmt = snd_usb_find_csint_desc(alts->extra, alts->extralen, NULL, AS_GENERAL); @@ -2675,7 +2686,7 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no) continue; } - snd_printdd(KERN_INFO "%d:%u:%d: add audio endpoint 0x%x\n", dev->devnum, iface_no, i, fp->endpoint); + snd_printdd(KERN_INFO "%d:%u:%d: add audio endpoint 0x%x\n", dev->devnum, iface_no, altno, fp->endpoint); err = add_audio_endpoint(chip, stream, fp); if (err < 0) { kfree(fp->rate_table); @@ -3083,6 +3094,45 @@ static int snd_usb_audigy2nx_boot_quirk(struct usb_device *dev) return 0; } +/* + * Setup quirks + */ +#define AUDIOPHILE_SET 0x01 /* if set, parse device_setup */ +#define AUDIOPHILE_SET_DTS 0x02 /* if set, enable DTS Digital Output */ +#define AUDIOPHILE_SET_96K 0x04 /* 48-96KHz rate if set, 8-48KHz otherwise */ +#define AUDIOPHILE_SET_24B 0x08 /* 24bits sample if set, 16bits otherwise */ +#define AUDIOPHILE_SET_DI 0x10 /* if set, enable Digital Input */ +#define AUDIOPHILE_SET_MASK 0x1F /* bit mask for setup value */ +#define AUDIOPHILE_SET_24B_48K_DI 0x19 /* value for 24bits+48KHz+Digital Input */ +#define AUDIOPHILE_SET_24B_48K_NOTDI 0x09 /* value for 24bits+48KHz+No Digital Input */ +#define AUDIOPHILE_SET_16B_48K_DI 0x11 /* value for 16bits+48KHz+Digital Input */ +#define AUDIOPHILE_SET_16B_48K_NOTDI 0x01 /* value for 16bits+48KHz+No Digital Input */ + +static int audiophile_skip_setting_quirk(struct snd_usb_audio *chip, + int iface, int altno) +{ + if (device_setup[chip->index] & AUDIOPHILE_SET) { + if ((device_setup[chip->index] & AUDIOPHILE_SET_DTS) + && altno != 6) + return 1; /* skip this altsetting */ + if ((device_setup[chip->index] & AUDIOPHILE_SET_96K) + && altno != 1) + return 1; /* skip this altsetting */ + if ((device_setup[chip->index] & AUDIOPHILE_SET_MASK) == + AUDIOPHILE_SET_24B_48K_DI && altno != 2) + return 1; /* skip this altsetting */ + if ((device_setup[chip->index] & AUDIOPHILE_SET_MASK) == + AUDIOPHILE_SET_24B_48K_NOTDI && altno != 3) + return 1; /* skip this altsetting */ + if ((device_setup[chip->index] & AUDIOPHILE_SET_MASK) == + AUDIOPHILE_SET_16B_48K_DI && altno != 4) + return 1; /* skip this altsetting */ + if ((device_setup[chip->index] & AUDIOPHILE_SET_MASK) == + AUDIOPHILE_SET_16B_48K_NOTDI && altno != 5) + return 1; /* skip this altsetting */ + } + return 0; /* keep this altsetting */ +} /* * audio-interface quirks -- cgit v1.2.3 From db064e503419c32df463326a3891a973bb30582e Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 16 Mar 2006 16:04:58 +0100 Subject: [ALSA] hda-codec - Add support for VAIO FE550G and SZ110 Modules: Documentation,HDA Codec driver Add support for VAIO FE550G and SZ110 laptops with Sigmatel codec (7661). The new model 'vaio' is added. Signed-off-by: Takashi Iwai --- Documentation/sound/alsa/ALSA-Configuration.txt | 3 + sound/pci/hda/patch_sigmatel.c | 161 ++++++++++++++++++++++++ 2 files changed, 164 insertions(+) (limited to 'Documentation') diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index f947c4b04ab8..dcc9cd9633dd 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -755,6 +755,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. laptop-dig ditto with SPDIF auto auto-confgi reading BIOS (default) + STAC7661(?) + vaio Setup for VAIO FE550G/SZ110 + If the default configuration doesn't work and one of the above matches with your device, report it together with the PCI subsystem ID (output of "lspci -nv") to ALSA BTS or alsa-devel diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 45ddf548d6fb..240958df26ce 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -1147,6 +1147,166 @@ static int patch_stac927x(struct hda_codec *codec) return 0; } +/* + * STAC 7661(?) hack + */ + +/* static config for Sony VAIO FE550G */ +static hda_nid_t vaio_dacs[] = { 0x2 }; +#define VAIO_HP_DAC 0x5 +static hda_nid_t vaio_adcs[] = { 0x8 /*,0x6*/ }; +static hda_nid_t vaio_mux_nids[] = { 0x15 }; + +static struct hda_input_mux vaio_mux = { + .num_items = 2, + .items = { + /* { "HP", 0x0 }, + { "Unknown", 0x1 }, */ + { "Mic", 0x2 }, + { "PCM", 0x3 }, + } +}; + +static struct hda_verb vaio_init[] = { + {0x0a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, /* HP <- 0x2 */ + {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, /* Speaker <- 0x5 */ + {0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* Mic? (<- 0x2) */ + {0x0e, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, /* CD */ + {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* Mic? */ + {0x15, AC_VERB_SET_CONNECT_SEL, 0x2}, /* mic-sel: 0a,0d,14,02 */ + {0x02, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, /* HP */ + {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, /* Speaker */ + {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* capture sw/vol -> 0x8 */ + {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, /* CD-in -> 0x6 */ + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, /* Mic-in -> 0x9 */ + {} +}; + +/* bind volumes of both NID 0x02 and 0x05 */ +static int vaio_master_vol_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + long *valp = ucontrol->value.integer.value; + int change; + + change = snd_hda_codec_amp_update(codec, 0x02, 0, HDA_OUTPUT, 0, + 0x7f, valp[0] & 0x7f); + change |= snd_hda_codec_amp_update(codec, 0x02, 1, HDA_OUTPUT, 0, + 0x7f, valp[1] & 0x7f); + snd_hda_codec_amp_update(codec, 0x05, 0, HDA_OUTPUT, 0, + 0x7f, valp[0] & 0x7f); + snd_hda_codec_amp_update(codec, 0x05, 1, HDA_OUTPUT, 0, + 0x7f, valp[1] & 0x7f); + return change; +} + +/* bind volumes of both NID 0x02 and 0x05 */ +static int vaio_master_sw_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + long *valp = ucontrol->value.integer.value; + int change; + + change = snd_hda_codec_amp_update(codec, 0x02, 0, HDA_OUTPUT, 0, + 0x80, valp[0] & 0x80); + change |= snd_hda_codec_amp_update(codec, 0x02, 1, HDA_OUTPUT, 0, + 0x80, valp[1] & 0x80); + snd_hda_codec_amp_update(codec, 0x05, 0, HDA_OUTPUT, 0, + 0x80, valp[0] & 0x80); + snd_hda_codec_amp_update(codec, 0x05, 1, HDA_OUTPUT, 0, + 0x80, valp[1] & 0x80); + return change; +} + +static struct snd_kcontrol_new vaio_mixer[] = { + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Master Playback Volume", + .info = snd_hda_mixer_amp_volume_info, + .get = snd_hda_mixer_amp_volume_get, + .put = vaio_master_vol_put, + .private_value = HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT), + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Master Playback Switch", + .info = snd_hda_mixer_amp_switch_info, + .get = snd_hda_mixer_amp_switch_get, + .put = vaio_master_sw_put, + .private_value = HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT), + }, + /* HDA_CODEC_VOLUME("CD Capture Volume", 0x07, 0, HDA_INPUT), */ + HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_INPUT), + HDA_CODEC_MUTE("Capture Switch", 0x09, 0, HDA_INPUT), + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Capture Source", + .count = 1, + .info = stac92xx_mux_enum_info, + .get = stac92xx_mux_enum_get, + .put = stac92xx_mux_enum_put, + }, + {} +}; + +static struct hda_codec_ops stac7661_patch_ops = { + .build_controls = stac92xx_build_controls, + .build_pcms = stac92xx_build_pcms, + .init = stac92xx_init, + .free = stac92xx_free, +#ifdef CONFIG_PM + .resume = stac92xx_resume, +#endif +}; + +enum { STAC7661_VAIO }; + +static struct hda_board_config stac7661_cfg_tbl[] = { + { .modelname = "vaio", .config = STAC7661_VAIO }, + { .pci_subvendor = 0x104d, .pci_subdevice = 0x81e6, + .config = STAC7661_VAIO }, + { .pci_subvendor = 0x104d, .pci_subdevice = 0x81ef, + .config = STAC7661_VAIO }, + {} +}; + +static int patch_stac7661(struct hda_codec *codec) +{ + struct sigmatel_spec *spec; + int board_config; + + board_config = snd_hda_check_board_config(codec, stac7661_cfg_tbl); + if (board_config < 0) + /* unknown config, let generic-parser do its job... */ + return snd_hda_parse_generic_codec(codec); + + spec = kzalloc(sizeof(*spec), GFP_KERNEL); + if (spec == NULL) + return -ENOMEM; + + codec->spec = spec; + switch (board_config) { + case STAC7661_VAIO: + spec->mixer = vaio_mixer; + spec->init = vaio_init; + spec->multiout.max_channels = 2; + spec->multiout.num_dacs = ARRAY_SIZE(vaio_dacs); + spec->multiout.dac_nids = vaio_dacs; + spec->multiout.hp_nid = VAIO_HP_DAC; + spec->num_adcs = ARRAY_SIZE(vaio_adcs); + spec->adc_nids = vaio_adcs; + spec->input_mux = &vaio_mux; + spec->mux_nids = vaio_mux_nids; + break; + } + + codec->patch_ops = stac7661_patch_ops; + return 0; +} + + /* * patch entries */ @@ -1168,5 +1328,6 @@ struct hda_codec_preset snd_hda_preset_sigmatel[] = { { .id = 0x83847627, .name = "STAC9271D", .patch = patch_stac927x }, { .id = 0x83847628, .name = "STAC9274X5NH", .patch = patch_stac927x }, { .id = 0x83847629, .name = "STAC9274D5NH", .patch = patch_stac927x }, + { .id = 0x83847661, .name = "STAC7661", .patch = patch_stac7661 }, {} /* terminator */ }; -- cgit v1.2.3 From 825aa97241b46d2819c1db984c86a1a9df41b8e1 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 17 Mar 2006 10:50:49 +0100 Subject: [ALSA] hda-codec - Fix for Samsung R65 and ASUS A6J Modules: Documentation,HDA Codec driver Added a new model 'laptop-eapd' to AD1986A codec for Samsung R65 and ASUS A6J laptops. Signed-off-by: Takashi Iwai --- Documentation/sound/alsa/ALSA-Configuration.txt | 1 + sound/pci/hda/patch_analog.c | 116 +++++++++++++++++++++++- 2 files changed, 116 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index dcc9cd9633dd..1def6049784c 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -745,6 +745,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. 6stack 6-jack, separate surrounds (default) 3stack 3-stack, shared surrounds laptop 2-channel only (FSC V2060, Samsung M50) + laptop-eapd 2-channel with EAPD (Samsung R65, ASUS A6J) AD1988 6stack 6-jack diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index cdcc815a9320..2b14fa74a8fd 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -581,6 +581,97 @@ static struct snd_kcontrol_new ad1986a_laptop_mixers[] = { { } /* end */ }; +/* laptop-eapd model - 2ch only */ + +/* master controls both pins 0x1a and 0x1b */ +static int ad1986a_laptop_master_vol_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + long *valp = ucontrol->value.integer.value; + int change; + + change = snd_hda_codec_amp_update(codec, 0x1a, 0, HDA_OUTPUT, 0, + 0x7f, valp[0] & 0x7f); + change |= snd_hda_codec_amp_update(codec, 0x1a, 1, HDA_OUTPUT, 0, + 0x7f, valp[1] & 0x7f); + snd_hda_codec_amp_update(codec, 0x1b, 0, HDA_OUTPUT, 0, + 0x7f, valp[0] & 0x7f); + snd_hda_codec_amp_update(codec, 0x1b, 1, HDA_OUTPUT, 0, + 0x7f, valp[1] & 0x7f); + return change; +} + +static int ad1986a_laptop_master_sw_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + long *valp = ucontrol->value.integer.value; + int change; + + change = snd_hda_codec_amp_update(codec, 0x1a, 0, HDA_OUTPUT, 0, + 0x80, valp[0] ? 0 : 0x80); + change |= snd_hda_codec_amp_update(codec, 0x1a, 1, HDA_OUTPUT, 0, + 0x80, valp[1] ? 0 : 0x80); + snd_hda_codec_amp_update(codec, 0x1b, 0, HDA_OUTPUT, 0, + 0x80, valp[0] ? 0 : 0x80); + snd_hda_codec_amp_update(codec, 0x1b, 1, HDA_OUTPUT, 0, + 0x80, valp[1] ? 0 : 0x80); + return change; +} + +static struct hda_input_mux ad1986a_laptop_eapd_capture_source = { + .num_items = 3, + .items = { + { "Mic", 0x0 }, + { "Internal Mic", 0x4 }, + { "Mix", 0x5 }, + }, +}; + +static struct snd_kcontrol_new ad1986a_laptop_eapd_mixers[] = { + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Master Playback Volume", + .info = snd_hda_mixer_amp_volume_info, + .get = snd_hda_mixer_amp_volume_get, + .put = ad1986a_laptop_master_vol_put, + .private_value = HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT), + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Master Playback Switch", + .info = snd_hda_mixer_amp_switch_info, + .get = snd_hda_mixer_amp_switch_get, + .put = ad1986a_laptop_master_sw_put, + .private_value = HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT), + }, + HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x17, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Capture Switch", 0x12, 0x0, HDA_OUTPUT), + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Capture Source", + .info = ad198x_mux_enum_info, + .get = ad198x_mux_enum_get, + .put = ad198x_mux_enum_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "External Amplifier", + .info = ad198x_eapd_info, + .get = ad198x_eapd_get, + .put = ad198x_eapd_put, + .private_value = 0x1b | (1 << 8), /* port-D, inversed */ + }, + { } /* end */ +}; + /* * initialization verbs */ @@ -683,8 +774,14 @@ static struct hda_channel_mode ad1986a_modes[3] = { { 6, ad1986a_ch6_init }, }; +/* eapd initialization */ +static struct hda_verb ad1986a_eapd_init_verbs[] = { + {0x1b, AC_VERB_SET_EAPD_BTLENABLE, 0x00}, + {} +}; + /* models */ -enum { AD1986A_6STACK, AD1986A_3STACK, AD1986A_LAPTOP }; +enum { AD1986A_6STACK, AD1986A_3STACK, AD1986A_LAPTOP, AD1986A_LAPTOP_EAPD }; static struct hda_board_config ad1986a_cfg_tbl[] = { { .modelname = "6stack", .config = AD1986A_6STACK }, @@ -694,6 +791,13 @@ static struct hda_board_config ad1986a_cfg_tbl[] = { .config = AD1986A_LAPTOP }, /* FSC V2060 */ { .pci_subvendor = 0x17c0, .pci_subdevice = 0x2017, .config = AD1986A_LAPTOP }, /* Samsung M50 */ + { .pci_subvendor = 0x1043, .pci_subdevice = 0x818f, + .config = AD1986A_LAPTOP }, /* ASUS P5GV-MX */ + { .modelname = "laptop-eapd", .config = AD1986A_LAPTOP_EAPD }, + { .pci_subvendor = 0x144d, .pci_subdevice = 0xc024, + .config = AD1986A_LAPTOP_EAPD }, /* Samsung R65-T2300 Charis */ + { .pci_subvendor = 0x1043, .pci_subdevice = 0x1213, + .config = AD1986A_LAPTOP_EAPD }, /* ASUS A6J */ {} }; @@ -741,6 +845,16 @@ static int patch_ad1986a(struct hda_codec *codec) spec->multiout.num_dacs = 1; spec->multiout.dac_nids = ad1986a_laptop_dac_nids; break; + case AD1986A_LAPTOP_EAPD: + spec->mixers[0] = ad1986a_laptop_eapd_mixers; + spec->num_init_verbs = 2; + spec->init_verbs[1] = ad1986a_eapd_init_verbs; + spec->multiout.max_channels = 2; + spec->multiout.num_dacs = 1; + spec->multiout.dac_nids = ad1986a_laptop_dac_nids; + spec->multiout.dig_out_nid = 0; + spec->input_mux = &ad1986a_laptop_eapd_capture_source; + break; } return 0; -- cgit v1.2.3 From 19739fef0203d2f3eecc9c4b1ef25b57d85f2b30 Mon Sep 17 00:00:00 2001 From: Thibault LE MEUR Date: Tue, 21 Mar 2006 11:06:40 +0100 Subject: [ALSA] Fixes typos in Audiophile-USB.txt Modules: Documentation Fixes typos in Audiophile-USB.txt. Signed-off-by: Thibault LE MEUR Signed-off-by: Takashi Iwai --- Documentation/sound/alsa/Audiophile-Usb.txt | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'Documentation') diff --git a/Documentation/sound/alsa/Audiophile-Usb.txt b/Documentation/sound/alsa/Audiophile-Usb.txt index 3ba45adbf040..4692c8e77dc1 100644 --- a/Documentation/sound/alsa/Audiophile-Usb.txt +++ b/Documentation/sound/alsa/Audiophile-Usb.txt @@ -1,4 +1,4 @@ - Guide to using M-Audio Audiophile USB with ALSA and Jack v1.1 + Guide to using M-Audio Audiophile USB with ALSA and Jack v1.2 ======================================================== Thibault Le Meur @@ -13,6 +13,9 @@ of the device. The device has 4 audio interfaces, and 2 MIDI ports: * Analog Stereo Input (Ai) + - This port supports 2 pairs of line-level audio inputs (1/4" TS and RCA) + - When the 1/4" TS (jack) connectors are connected, the RCA connectors + are disabled * Analog Stereo Output (Ao) * Digital Stereo Input (Di) * Digital Stereo Output (Do) @@ -42,7 +45,7 @@ Important facts about the Digital interface: though I haven't tested it under linux - Note that in this setup only the Do interface can be enabled * Apart from recording an audio digital stream, enabling the Di port is a way -to syncrhonize the device to an external sample clock +to synchronize the device to an external sample clock - As a consequence, the Di port must be enable only if an active Digital source is connected - Enabling Di when no digital source is connected can result in a @@ -180,7 +183,7 @@ IMPORTANT NOTE WHEN SWITCHING CONFIGURATION: or changing modprobe.conf) - turn on the device -2.2.2.3 - Setting and switching configurations with the device_setup parameter +2.2.2.3 - Audiophile USB's device_setup structure If you want to understand the device_setup magic numbers for the Audiophile USB, you need some very basic understanding of binary computation. However, @@ -226,7 +229,7 @@ Caution: - choosing b2 will prepare all interfaces for 24bits/96kHz but you'll only be able to use one at the same time -2.2.3 - Technical Details for Audiophile Usb +2.2.3 - USB implementation details for this device You may safely skip this section if you're not interrested in driver development. @@ -234,20 +237,20 @@ development. This section describes some internals aspect of the device and summarize the data I got by usb-snooping the windows and linux drivers. -The M-Audio Audiophile USB has 7 Usb Interfaces: +The M-Audio Audiophile USB has 7 USB Interfaces: a "USB interface": - * Usb Interface nb.0 - * Usb Interface nb.1 + * USB Interface nb.0 + * USB Interface nb.1 - Audio Control function - * Usb Interface nb.2 + * USB Interface nb.2 - Analog Output - * Usb Interface nb.3 + * USB Interface nb.3 - Digital Output - * Usb Interface nb.4 + * USB Interface nb.4 - Analog Input - * Usb Interface nb.5 + * USB Interface nb.5 - Digital Input - * Usb Interface nb.6 + * USB Interface nb.6 - MIDI interface compliant with the MIDIMAN quirk Each interface has 5 altsettings (AltSet 1,2,3,4,5) except: @@ -326,5 +329,5 @@ atid=425939 After having applied the patch you can run jackd with the following command line: -# /usr/local/bin/jackd -R -dalsa -Phw:1,0 -r48000 -p128 -n2 -D -Chw:1,1 + % jackd -R -dalsa -Phw:1,0 -r48000 -p128 -n2 -D -Chw:1,1 -- cgit v1.2.3