[alsa-devel] model needed for Clevo P150HM (Realtek ALC892)
Hi,
I am coming here from pulseaudio-general mailing list [1]. I recently got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in microphone and the following connectors: - headphone out - microphone in; can be switched to center/lfe out - spdif out; can be switched to rear speaker out - line in; can be switched to side speaker out Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 sound, and there are two configs showing up in pavucontrol (analog output and analog headphones) which seem to be the same. I have uploaded the output of alsa-info.sh [2]. Please let me know if more information is needed.
Regards, Julian
[1] http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/10096 [2] http://www.alsa-project.org/db/?f=7c91e874f4272387c2c51e448337567202c0edfe
At Thu, 23 Jun 2011 08:36:55 +0200, Julian Sikorski wrote:
Hi,
I am coming here from pulseaudio-general mailing list [1]. I recently got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in microphone and the following connectors:
- headphone out
- microphone in; can be switched to center/lfe out
- spdif out; can be switched to rear speaker out
- line in; can be switched to side speaker out
Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 sound, and there are two configs showing up in pavucontrol (analog output and analog headphones) which seem to be the same. I have uploaded the output of alsa-info.sh [2]. Please let me know if more information is needed.
The current parser doesn't allow the multi-io pins when the primary output is no line-out. The patch below should fix (change) the behavior. It'll count HP out, too.
Takashi
--- diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index fe56b2b..b0cf726 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, hda_nid_t dac;
spec->multiout.dac_nids = spec->private_dac_nids; + spec->multiout.num_dacs = 0; for (i = 0; i < cfg->line_outs; i++) { dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); if (!dac) @@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) unsigned int location, defcfg; int num_pins;
+ if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT && cfg->hp_outs == 1) { + /* use HP as primary out */ + cfg->speaker_outs = cfg->line_outs; + memcpy(cfg->speaker_pins, cfg->line_out_pins, + sizeof(cfg->speaker_pins)); + cfg->line_outs = cfg->hp_outs; + memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins)); + cfg->hp_outs = 0; + memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins)); + cfg->line_out_type = AUTO_PIN_HP_OUT; + alc662_auto_fill_dac_nids(codec, cfg); + } if (cfg->line_outs != 1 || - cfg->line_out_type != AUTO_PIN_LINE_OUT) + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) return 0;
defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]); @@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) spec->multi_ios = num_pins; spec->ext_channel_count = 2; spec->multiout.num_dacs = num_pins + 1; + /* for avoiding multi HP mixers */ + cfg->line_out_type = AUTO_PIN_LINE_OUT; } return 0; }
On 23/06/2011 14:41, Takashi Iwai wrote:
At Thu, 23 Jun 2011 08:36:55 +0200, Julian Sikorski wrote:
Hi,
I am coming here from pulseaudio-general mailing list [1]. I recently got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in microphone and the following connectors:
- headphone out
- microphone in; can be switched to center/lfe out
- spdif out; can be switched to rear speaker out
- line in; can be switched to side speaker out
Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 sound, and there are two configs showing up in pavucontrol (analog output and analog headphones) which seem to be the same. I have uploaded the output of alsa-info.sh [2]. Please let me know if more information is needed.
The current parser doesn't allow the multi-io pins when the primary output is no line-out. The patch below should fix (change) the behavior. It'll count HP out, too.
Takashi
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index fe56b2b..b0cf726 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, hda_nid_t dac;
spec->multiout.dac_nids = spec->private_dac_nids;
- spec->multiout.num_dacs = 0; for (i = 0; i< cfg->line_outs; i++) { dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); if (!dac)
@@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) unsigned int location, defcfg; int num_pins;
- if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) {
/* use HP as primary out */
cfg->speaker_outs = cfg->line_outs;
memcpy(cfg->speaker_pins, cfg->line_out_pins,
sizeof(cfg->speaker_pins));
cfg->line_outs = cfg->hp_outs;
memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins));
cfg->hp_outs = 0;
memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins));
cfg->line_out_type = AUTO_PIN_HP_OUT;
alc662_auto_fill_dac_nids(codec, cfg);
- } if (cfg->line_outs != 1 ||
cfg->line_out_type != AUTO_PIN_LINE_OUT)
cfg->line_out_type == AUTO_PIN_SPEAKER_OUT)
return 0;
defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]);
@@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) spec->multi_ios = num_pins; spec->ext_channel_count = 2; spec->multiout.num_dacs = num_pins + 1;
/* for avoiding multi HP mixers */
} return 0; }cfg->line_out_type = AUTO_PIN_LINE_OUT;
Would you like me to test this patch? If so, what should I apply it to and how should I proceed?
Julian
At Thu, 23 Jun 2011 18:40:47 +0200, Julian Sikorski wrote:
On 23/06/2011 14:41, Takashi Iwai wrote:
At Thu, 23 Jun 2011 08:36:55 +0200, Julian Sikorski wrote:
Hi,
I am coming here from pulseaudio-general mailing list [1]. I recently got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in microphone and the following connectors:
- headphone out
- microphone in; can be switched to center/lfe out
- spdif out; can be switched to rear speaker out
- line in; can be switched to side speaker out
Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 sound, and there are two configs showing up in pavucontrol (analog output and analog headphones) which seem to be the same. I have uploaded the output of alsa-info.sh [2]. Please let me know if more information is needed.
The current parser doesn't allow the multi-io pins when the primary output is no line-out. The patch below should fix (change) the behavior. It'll count HP out, too.
Takashi
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index fe56b2b..b0cf726 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, hda_nid_t dac;
spec->multiout.dac_nids = spec->private_dac_nids;
- spec->multiout.num_dacs = 0; for (i = 0; i< cfg->line_outs; i++) { dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); if (!dac)
@@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) unsigned int location, defcfg; int num_pins;
- if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) {
/* use HP as primary out */
cfg->speaker_outs = cfg->line_outs;
memcpy(cfg->speaker_pins, cfg->line_out_pins,
sizeof(cfg->speaker_pins));
cfg->line_outs = cfg->hp_outs;
memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins));
cfg->hp_outs = 0;
memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins));
cfg->line_out_type = AUTO_PIN_HP_OUT;
alc662_auto_fill_dac_nids(codec, cfg);
- } if (cfg->line_outs != 1 ||
cfg->line_out_type != AUTO_PIN_LINE_OUT)
cfg->line_out_type == AUTO_PIN_SPEAKER_OUT)
return 0;
defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]);
@@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) spec->multi_ios = num_pins; spec->ext_channel_count = 2; spec->multiout.num_dacs = num_pins + 1;
/* for avoiding multi HP mixers */
} return 0; }cfg->line_out_type = AUTO_PIN_LINE_OUT;
Would you like me to test this patch? If so, what should I apply it to and how should I proceed?
Yes, the test would be appreciated, of course. Apply it to the latest 3.0-rc kernel and test.
thanks,
Takashi
At Fri, 24 Jun 2011 10:34:01 +0200, Takashi Iwai wrote:
At Thu, 23 Jun 2011 18:40:47 +0200, Julian Sikorski wrote:
On 23/06/2011 14:41, Takashi Iwai wrote:
At Thu, 23 Jun 2011 08:36:55 +0200, Julian Sikorski wrote:
Hi,
I am coming here from pulseaudio-general mailing list [1]. I recently got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in microphone and the following connectors:
- headphone out
- microphone in; can be switched to center/lfe out
- spdif out; can be switched to rear speaker out
- line in; can be switched to side speaker out
Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 sound, and there are two configs showing up in pavucontrol (analog output and analog headphones) which seem to be the same. I have uploaded the output of alsa-info.sh [2]. Please let me know if more information is needed.
The current parser doesn't allow the multi-io pins when the primary output is no line-out. The patch below should fix (change) the behavior. It'll count HP out, too.
Takashi
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index fe56b2b..b0cf726 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, hda_nid_t dac;
spec->multiout.dac_nids = spec->private_dac_nids;
- spec->multiout.num_dacs = 0; for (i = 0; i< cfg->line_outs; i++) { dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); if (!dac)
@@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) unsigned int location, defcfg; int num_pins;
- if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) {
/* use HP as primary out */
cfg->speaker_outs = cfg->line_outs;
memcpy(cfg->speaker_pins, cfg->line_out_pins,
sizeof(cfg->speaker_pins));
cfg->line_outs = cfg->hp_outs;
memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins));
cfg->hp_outs = 0;
memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins));
cfg->line_out_type = AUTO_PIN_HP_OUT;
alc662_auto_fill_dac_nids(codec, cfg);
- } if (cfg->line_outs != 1 ||
cfg->line_out_type != AUTO_PIN_LINE_OUT)
cfg->line_out_type == AUTO_PIN_SPEAKER_OUT)
return 0;
defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]);
@@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) spec->multi_ios = num_pins; spec->ext_channel_count = 2; spec->multiout.num_dacs = num_pins + 1;
/* for avoiding multi HP mixers */
} return 0; }cfg->line_out_type = AUTO_PIN_LINE_OUT;
Would you like me to test this patch? If so, what should I apply it to and how should I proceed?
Yes, the test would be appreciated, of course. Apply it to the latest 3.0-rc kernel and test.
Also, the additional patch below will give "Headphone" mixer control back while new "Surround", "Center" and "LFE" will appear.
Note that you'll need to change "Channel Mode" mixer control to "6ch" for using the surround outputs even with these patches. As default, it's set as "2ch".
Takashi
--- Subject: [PATCH] ALSA: hda - Clean up multi-channel mixer name assignment in patch_realtek.c
Change alc_get_line_out_pfx() in patch_realtek.c to provide the channel specific name and assign the index so that each caller doesn't have to set the channel name by itself.
Also, check the multi-io case with the primary hp-out; for the multi-io channels, assign the channel name instead of "Headphone" with indices. This makes the mixer names more intuitive and reduces confusion.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/hda/patch_realtek.c | 92 ++++++++++++++++------------------------- 1 files changed, 36 insertions(+), 56 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index b0cf726..7858da5 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -5359,11 +5359,15 @@ static int alc880_auto_fill_dac_nids(struct alc_spec *spec, return 0; }
-static const char *alc_get_line_out_pfx(struct alc_spec *spec, - bool can_be_master) +static const char *alc_get_line_out_pfx(struct alc_spec *spec, int ch, + bool can_be_master, int *index) { struct auto_pin_cfg *cfg = &spec->autocfg; + static const char * const chname[4] = { + "Front", "Surround", NULL /*CLFE*/, "Side" + };
+ *index = 0; if (cfg->line_outs == 1 && !spec->multi_ios && !cfg->hp_outs && !cfg->speaker_outs && can_be_master) return "Master"; @@ -5374,23 +5378,23 @@ static const char *alc_get_line_out_pfx(struct alc_spec *spec, return "Speaker"; break; case AUTO_PIN_HP_OUT: + /* for multi-io case, only the primary out */ + if (ch && spec->multi_ios) + break; + *index = ch; return "Headphone"; default: if (cfg->line_outs == 1 && !spec->multi_ios) return "PCM"; break; } - return NULL; + return chname[ch]; }
/* add playback controls from the parsed DAC table */ static int alc880_auto_create_multi_out_ctls(struct alc_spec *spec, const struct auto_pin_cfg *cfg) { - static const char * const chname[4] = { - "Front", "Surround", NULL /*CLFE*/, "Side" - }; - const char *pfx = alc_get_line_out_pfx(spec, false); hda_nid_t nid; int i, err, noutputs;
@@ -5399,10 +5403,13 @@ static int alc880_auto_create_multi_out_ctls(struct alc_spec *spec, noutputs += spec->multi_ios;
for (i = 0; i < noutputs; i++) { + const char *name; + int index; if (!spec->multiout.dac_nids[i]) continue; nid = alc880_idx_to_mixer(alc880_dac_to_idx(spec->multiout.dac_nids[i])); - if (!pfx && i == 2) { + name = alc_get_line_out_pfx(spec, i, false, &index); + if (!name) { /* Center/LFE */ err = add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, "Center", @@ -5429,12 +5436,6 @@ static int alc880_auto_create_multi_out_ctls(struct alc_spec *spec, if (err < 0) return err; } else { - const char *name = pfx; - int index = i; - if (!name) { - name = chname[i]; - index = 0; - } err = __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, name, index, HDA_COMPOSE_AMP_VAL(nid, 3, 0, @@ -12257,17 +12258,18 @@ static int alc262_auto_create_multi_out_ctls(struct alc_spec *spec, { const char *pfx; int vbits; - int i, err; + int i, index, err;
spec->multiout.num_dacs = 1; /* only use one dac */ spec->multiout.dac_nids = spec->private_dac_nids; spec->private_dac_nids[0] = 2;
- pfx = alc_get_line_out_pfx(spec, true); - if (!pfx) - pfx = "Front"; for (i = 0; i < 2; i++) { - err = alc262_add_out_sw_ctl(spec, cfg->line_out_pins[i], pfx, i); + pfx = alc_get_line_out_pfx(spec, i, true, &index); + if (!pfx) + pfx = "PCM"; + err = alc262_add_out_sw_ctl(spec, cfg->line_out_pins[i], pfx, + index); if (err < 0) return err; if (cfg->line_out_type != AUTO_PIN_SPEAKER_OUT) { @@ -12287,10 +12289,11 @@ static int alc262_auto_create_multi_out_ctls(struct alc_spec *spec, vbits = alc262_check_volbit(cfg->line_out_pins[0]) | alc262_check_volbit(cfg->speaker_pins[0]) | alc262_check_volbit(cfg->hp_pins[0]); - if (vbits == 1 || vbits == 2) - pfx = "Master"; /* only one mixer is used */ vbits = 0; for (i = 0; i < 2; i++) { + pfx = alc_get_line_out_pfx(spec, i, true, &index); + if (!pfx) + pfx = "PCM"; err = alc262_add_out_vol_ctl(spec, cfg->line_out_pins[i], pfx, &vbits, i); if (err < 0) @@ -16035,10 +16038,6 @@ static int alc861_auto_create_multi_out_ctls(struct hda_codec *codec, const struct auto_pin_cfg *cfg) { struct alc_spec *spec = codec->spec; - static const char * const chname[4] = { - "Front", "Surround", NULL /*CLFE*/, "Side" - }; - const char *pfx = alc_get_line_out_pfx(spec, true); hda_nid_t nid; int i, err, noutputs;
@@ -16047,10 +16046,13 @@ static int alc861_auto_create_multi_out_ctls(struct hda_codec *codec, noutputs += spec->multi_ios;
for (i = 0; i < noutputs; i++) { + const char *name; + int index; nid = spec->multiout.dac_nids[i]; if (!nid) continue; - if (!pfx && i == 2) { + name = alc_get_line_out_pfx(spec, i, true, &index); + if (!name) { /* Center/LFE */ err = alc861_create_out_sw(codec, "Center", nid, 1); if (err < 0) @@ -16059,12 +16061,6 @@ static int alc861_auto_create_multi_out_ctls(struct hda_codec *codec, if (err < 0) return err; } else { - const char *name = pfx; - int index = i; - if (!name) { - name = chname[i]; - index = 0; - } err = __alc861_create_out_sw(codec, name, nid, index, 3); if (err < 0) return err; @@ -17178,10 +17174,6 @@ static void alc861vd_auto_init_analog_input(struct hda_codec *codec) static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, const struct auto_pin_cfg *cfg) { - static const char * const chname[4] = { - "Front", "Surround", "CLFE", "Side" - }; - const char *pfx = alc_get_line_out_pfx(spec, true); hda_nid_t nid_v, nid_s; int i, err, noutputs;
@@ -17190,6 +17182,8 @@ static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, noutputs += spec->multi_ios;
for (i = 0; i < noutputs; i++) { + const char *name; + int index; if (!spec->multiout.dac_nids[i]) continue; nid_v = alc861vd_idx_to_mixer_vol( @@ -17199,7 +17193,8 @@ static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, alc880_dac_to_idx( spec->multiout.dac_nids[i]));
- if (!pfx && i == 2) { + name = alc_get_line_out_pfx(spec, i, true, &index); + if (!name) { /* Center/LFE */ err = add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, "Center", @@ -17226,12 +17221,6 @@ static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, if (err < 0) return err; } else { - const char *name = pfx; - int index = i; - if (!name) { - name = chname[i]; - index = 0; - } err = __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, name, index, HDA_COMPOSE_AMP_VAL(nid_v, 3, 0, @@ -19030,10 +19019,6 @@ static int alc662_auto_create_multi_out_ctls(struct hda_codec *codec, const struct auto_pin_cfg *cfg) { struct alc_spec *spec = codec->spec; - static const char * const chname[4] = { - "Front", "Surround", NULL /*CLFE*/, "Side" - }; - const char *pfx = alc_get_line_out_pfx(spec, true); hda_nid_t nid, mix, pin; int i, err, noutputs;
@@ -19042,6 +19027,8 @@ static int alc662_auto_create_multi_out_ctls(struct hda_codec *codec, noutputs += spec->multi_ios;
for (i = 0; i < noutputs; i++) { + const char *name; + int index; nid = spec->multiout.dac_nids[i]; if (!nid) continue; @@ -19052,7 +19039,8 @@ static int alc662_auto_create_multi_out_ctls(struct hda_codec *codec, mix = alc_auto_dac_to_mix(codec, pin, nid); if (!mix) continue; - if (!pfx && i == 2) { + name = alc_get_line_out_pfx(spec, i, true, &index); + if (!name) { /* Center/LFE */ err = alc662_add_vol_ctl(spec, "Center", nid, 1); if (err < 0) @@ -19067,12 +19055,6 @@ static int alc662_auto_create_multi_out_ctls(struct hda_codec *codec, if (err < 0) return err; } else { - const char *name = pfx; - int index = i; - if (!name) { - name = chname[i]; - index = 0; - } err = __alc662_add_vol_ctl(spec, name, nid, index, 3); if (err < 0) return err; @@ -19361,8 +19343,6 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) spec->multi_ios = num_pins; spec->ext_channel_count = 2; spec->multiout.num_dacs = num_pins + 1; - /* for avoiding multi HP mixers */ - cfg->line_out_type = AUTO_PIN_LINE_OUT; } return 0; }
On 24/06/2011 11:12, Takashi Iwai wrote:
At Fri, 24 Jun 2011 10:34:01 +0200, Takashi Iwai wrote:
At Thu, 23 Jun 2011 18:40:47 +0200, Julian Sikorski wrote:
On 23/06/2011 14:41, Takashi Iwai wrote:
At Thu, 23 Jun 2011 08:36:55 +0200, Julian Sikorski wrote:
Hi,
I am coming here from pulseaudio-general mailing list [1]. I recently got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in microphone and the following connectors:
- headphone out
- microphone in; can be switched to center/lfe out
- spdif out; can be switched to rear speaker out
- line in; can be switched to side speaker out
Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 sound, and there are two configs showing up in pavucontrol (analog output and analog headphones) which seem to be the same. I have uploaded the output of alsa-info.sh [2]. Please let me know if more information is needed.
The current parser doesn't allow the multi-io pins when the primary output is no line-out. The patch below should fix (change) the behavior. It'll count HP out, too.
Takashi
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index fe56b2b..b0cf726 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, hda_nid_t dac;
spec->multiout.dac_nids = spec->private_dac_nids;
- spec->multiout.num_dacs = 0; for (i = 0; i< cfg->line_outs; i++) { dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); if (!dac)
@@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) unsigned int location, defcfg; int num_pins;
- if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) {
/* use HP as primary out */
cfg->speaker_outs = cfg->line_outs;
memcpy(cfg->speaker_pins, cfg->line_out_pins,
sizeof(cfg->speaker_pins));
cfg->line_outs = cfg->hp_outs;
memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins));
cfg->hp_outs = 0;
memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins));
cfg->line_out_type = AUTO_PIN_HP_OUT;
alc662_auto_fill_dac_nids(codec, cfg);
- } if (cfg->line_outs != 1 ||
cfg->line_out_type != AUTO_PIN_LINE_OUT)
cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) return 0;
defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]);
@@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) spec->multi_ios = num_pins; spec->ext_channel_count = 2; spec->multiout.num_dacs = num_pins + 1;
/* for avoiding multi HP mixers */
} return 0; }cfg->line_out_type = AUTO_PIN_LINE_OUT;
Would you like me to test this patch? If so, what should I apply it to and how should I proceed?
Yes, the test would be appreciated, of course. Apply it to the latest 3.0-rc kernel and test.
Also, the additional patch below will give "Headphone" mixer control back while new "Surround", "Center" and "LFE" will appear.
Note that you'll need to change "Channel Mode" mixer control to "6ch" for using the surround outputs even with these patches. As default, it's set as "2ch".
Takashi
I will definitely try to give this a shot, but the outcome might be dependent on the fact whether Fedora 15 will want to work with 3.0-rc kernel. How about 8-channel sound btw? Under Windows the device claims to be capable of it.
Julian
At Fri, 24 Jun 2011 13:25:53 +0200, Julian Sikorski wrote:
On 24/06/2011 11:12, Takashi Iwai wrote:
At Fri, 24 Jun 2011 10:34:01 +0200, Takashi Iwai wrote:
At Thu, 23 Jun 2011 18:40:47 +0200, Julian Sikorski wrote:
On 23/06/2011 14:41, Takashi Iwai wrote:
At Thu, 23 Jun 2011 08:36:55 +0200, Julian Sikorski wrote:
Hi,
I am coming here from pulseaudio-general mailing list [1]. I recently got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in microphone and the following connectors:
- headphone out
- microphone in; can be switched to center/lfe out
- spdif out; can be switched to rear speaker out
- line in; can be switched to side speaker out
Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 sound, and there are two configs showing up in pavucontrol (analog output and analog headphones) which seem to be the same. I have uploaded the output of alsa-info.sh [2]. Please let me know if more information is needed.
The current parser doesn't allow the multi-io pins when the primary output is no line-out. The patch below should fix (change) the behavior. It'll count HP out, too.
Takashi
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index fe56b2b..b0cf726 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, hda_nid_t dac;
spec->multiout.dac_nids = spec->private_dac_nids;
- spec->multiout.num_dacs = 0; for (i = 0; i< cfg->line_outs; i++) { dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); if (!dac)
@@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) unsigned int location, defcfg; int num_pins;
- if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) {
/* use HP as primary out */
cfg->speaker_outs = cfg->line_outs;
memcpy(cfg->speaker_pins, cfg->line_out_pins,
sizeof(cfg->speaker_pins));
cfg->line_outs = cfg->hp_outs;
memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins));
cfg->hp_outs = 0;
memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins));
cfg->line_out_type = AUTO_PIN_HP_OUT;
alc662_auto_fill_dac_nids(codec, cfg);
- } if (cfg->line_outs != 1 ||
cfg->line_out_type != AUTO_PIN_LINE_OUT)
cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) return 0;
defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]);
@@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) spec->multi_ios = num_pins; spec->ext_channel_count = 2; spec->multiout.num_dacs = num_pins + 1;
/* for avoiding multi HP mixers */
} return 0; }cfg->line_out_type = AUTO_PIN_LINE_OUT;
Would you like me to test this patch? If so, what should I apply it to and how should I proceed?
Yes, the test would be appreciated, of course. Apply it to the latest 3.0-rc kernel and test.
Also, the additional patch below will give "Headphone" mixer control back while new "Surround", "Center" and "LFE" will appear.
Note that you'll need to change "Channel Mode" mixer control to "6ch" for using the surround outputs even with these patches. As default, it's set as "2ch".
Takashi
I will definitely try to give this a shot, but the outcome might be dependent on the fact whether Fedora 15 will want to work with 3.0-rc kernel.
You can build the kernel by yourself at any time...
How about 8-channel sound btw? Under Windows the device claims to be capable of it.
Do you have 4 jacks? Otherwise it's nonsense.
Takashi
W dniu 25.06.2011 09:11, Takashi Iwai pisze:
At Fri, 24 Jun 2011 13:25:53 +0200, Julian Sikorski wrote:
On 24/06/2011 11:12, Takashi Iwai wrote:
At Fri, 24 Jun 2011 10:34:01 +0200, Takashi Iwai wrote:
At Thu, 23 Jun 2011 18:40:47 +0200, Julian Sikorski wrote:
On 23/06/2011 14:41, Takashi Iwai wrote:
At Thu, 23 Jun 2011 08:36:55 +0200, Julian Sikorski wrote: > > Hi, > > I am coming here from pulseaudio-general mailing list [1]. I recently > got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in > microphone and the following connectors: > - headphone out > - microphone in; can be switched to center/lfe out > - spdif out; can be switched to rear speaker out > - line in; can be switched to side speaker out > Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 > sound, and there are two configs showing up in pavucontrol (analog > output and analog headphones) which seem to be the same. I have uploaded > the output of alsa-info.sh [2]. Please let me know if more information > is needed.
The current parser doesn't allow the multi-io pins when the primary output is no line-out. The patch below should fix (change) the behavior. It'll count HP out, too.
Takashi
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index fe56b2b..b0cf726 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, hda_nid_t dac;
spec->multiout.dac_nids = spec->private_dac_nids;
- spec->multiout.num_dacs = 0; for (i = 0; i< cfg->line_outs; i++) { dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); if (!dac)
@@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) unsigned int location, defcfg; int num_pins;
- if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) {
/* use HP as primary out */
cfg->speaker_outs = cfg->line_outs;
memcpy(cfg->speaker_pins, cfg->line_out_pins,
sizeof(cfg->speaker_pins));
cfg->line_outs = cfg->hp_outs;
memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins));
cfg->hp_outs = 0;
memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins));
cfg->line_out_type = AUTO_PIN_HP_OUT;
alc662_auto_fill_dac_nids(codec, cfg);
- } if (cfg->line_outs != 1 ||
cfg->line_out_type != AUTO_PIN_LINE_OUT)
cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) return 0;
defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]);
@@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) spec->multi_ios = num_pins; spec->ext_channel_count = 2; spec->multiout.num_dacs = num_pins + 1;
/* for avoiding multi HP mixers */
} return 0; }cfg->line_out_type = AUTO_PIN_LINE_OUT;
Would you like me to test this patch? If so, what should I apply it to and how should I proceed?
Yes, the test would be appreciated, of course. Apply it to the latest 3.0-rc kernel and test.
Also, the additional patch below will give "Headphone" mixer control back while new "Surround", "Center" and "LFE" will appear.
Note that you'll need to change "Channel Mode" mixer control to "6ch" for using the surround outputs even with these patches. As default, it's set as "2ch".
Takashi
I will definitely try to give this a shot, but the outcome might be dependent on the fact whether Fedora 15 will want to work with 3.0-rc kernel.
You can build the kernel by yourself at any time...
I will definitely try.
How about 8-channel sound btw? Under Windows the device claims to be capable of it.
Do you have 4 jacks? Otherwise it's nonsense.
_From my 1st mail:
It has 2.1 speakers, a built-in microphone and the following connectors: - headphone out - microphone in; can be switched to center/lfe out - spdif out; can be switched to rear speaker out - line in; can be switched to side speaker out
Sorry if I wasn't clear, but the spdif out is a jack/optical hybrid.
Takashi
Julian
W dniu 25.06.2011 09:11, Takashi Iwai pisze:
At Fri, 24 Jun 2011 13:25:53 +0200, Julian Sikorski wrote:
On 24/06/2011 11:12, Takashi Iwai wrote:
At Fri, 24 Jun 2011 10:34:01 +0200, Takashi Iwai wrote:
At Thu, 23 Jun 2011 18:40:47 +0200, Julian Sikorski wrote:
On 23/06/2011 14:41, Takashi Iwai wrote:
At Thu, 23 Jun 2011 08:36:55 +0200, Julian Sikorski wrote: > > Hi, > > I am coming here from pulseaudio-general mailing list [1]. I recently > got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in > microphone and the following connectors: > - headphone out > - microphone in; can be switched to center/lfe out > - spdif out; can be switched to rear speaker out > - line in; can be switched to side speaker out > Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 > sound, and there are two configs showing up in pavucontrol (analog > output and analog headphones) which seem to be the same. I have uploaded > the output of alsa-info.sh [2]. Please let me know if more information > is needed.
The current parser doesn't allow the multi-io pins when the primary output is no line-out. The patch below should fix (change) the behavior. It'll count HP out, too.
Takashi
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index fe56b2b..b0cf726 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, hda_nid_t dac;
spec->multiout.dac_nids = spec->private_dac_nids;
- spec->multiout.num_dacs = 0; for (i = 0; i< cfg->line_outs; i++) { dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); if (!dac)
@@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) unsigned int location, defcfg; int num_pins;
- if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) {
/* use HP as primary out */
cfg->speaker_outs = cfg->line_outs;
memcpy(cfg->speaker_pins, cfg->line_out_pins,
sizeof(cfg->speaker_pins));
cfg->line_outs = cfg->hp_outs;
memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins));
cfg->hp_outs = 0;
memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins));
cfg->line_out_type = AUTO_PIN_HP_OUT;
alc662_auto_fill_dac_nids(codec, cfg);
- } if (cfg->line_outs != 1 ||
cfg->line_out_type != AUTO_PIN_LINE_OUT)
cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) return 0;
defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]);
@@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) spec->multi_ios = num_pins; spec->ext_channel_count = 2; spec->multiout.num_dacs = num_pins + 1;
/* for avoiding multi HP mixers */
} return 0; }cfg->line_out_type = AUTO_PIN_LINE_OUT;
Would you like me to test this patch? If so, what should I apply it to and how should I proceed?
Yes, the test would be appreciated, of course. Apply it to the latest 3.0-rc kernel and test.
Also, the additional patch below will give "Headphone" mixer control back while new "Surround", "Center" and "LFE" will appear.
Note that you'll need to change "Channel Mode" mixer control to "6ch" for using the surround outputs even with these patches. As default, it's set as "2ch".
Takashi
I will definitely try to give this a shot, but the outcome might be dependent on the fact whether Fedora 15 will want to work with 3.0-rc kernel.
You can build the kernel by yourself at any time...
How about 8-channel sound btw? Under Windows the device claims to be capable of it.
Do you have 4 jacks? Otherwise it's nonsense.
Takashi
OK, I was able to successfully apply the patch and build the kernel. I tested it using: $ pasuspender bash $ speaker-test -Dplug:surround51 -c6 Once I set sound to 6-channel using alsamixer -c0, I was able to hear the sound for all 6 channels. Setting it to 4 channels took away LFE and center. Pulseaudio outputs are still a little messy, but this is out of ALSA scope, I think.
Julian
W dniu 25.06.2011 13:08, Julian Sikorski pisze:
W dniu 25.06.2011 09:11, Takashi Iwai pisze:
At Fri, 24 Jun 2011 13:25:53 +0200, Julian Sikorski wrote:
On 24/06/2011 11:12, Takashi Iwai wrote:
At Fri, 24 Jun 2011 10:34:01 +0200, Takashi Iwai wrote:
At Thu, 23 Jun 2011 18:40:47 +0200, Julian Sikorski wrote:
On 23/06/2011 14:41, Takashi Iwai wrote: > At Thu, 23 Jun 2011 08:36:55 +0200, > Julian Sikorski wrote: >> >> Hi, >> >> I am coming here from pulseaudio-general mailing list [1]. I recently >> got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in >> microphone and the following connectors: >> - headphone out >> - microphone in; can be switched to center/lfe out >> - spdif out; can be switched to rear speaker out >> - line in; can be switched to side speaker out >> Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 >> sound, and there are two configs showing up in pavucontrol (analog >> output and analog headphones) which seem to be the same. I have uploaded >> the output of alsa-info.sh [2]. Please let me know if more information >> is needed. > > The current parser doesn't allow the multi-io pins when the primary > output is no line-out. The patch below should fix (change) the > behavior. It'll count HP out, too. > > > Takashi > > --- > diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c > index fe56b2b..b0cf726 100644 > --- a/sound/pci/hda/patch_realtek.c > +++ b/sound/pci/hda/patch_realtek.c > @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, > hda_nid_t dac; > > spec->multiout.dac_nids = spec->private_dac_nids; > + spec->multiout.num_dacs = 0; > for (i = 0; i< cfg->line_outs; i++) { > dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); > if (!dac) > @@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) > unsigned int location, defcfg; > int num_pins; > > + if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) { > + /* use HP as primary out */ > + cfg->speaker_outs = cfg->line_outs; > + memcpy(cfg->speaker_pins, cfg->line_out_pins, > + sizeof(cfg->speaker_pins)); > + cfg->line_outs = cfg->hp_outs; > + memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins)); > + cfg->hp_outs = 0; > + memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins)); > + cfg->line_out_type = AUTO_PIN_HP_OUT; > + alc662_auto_fill_dac_nids(codec, cfg); > + } > if (cfg->line_outs != 1 || > - cfg->line_out_type != AUTO_PIN_LINE_OUT) > + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) > return 0; > > defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]); > @@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) > spec->multi_ios = num_pins; > spec->ext_channel_count = 2; > spec->multiout.num_dacs = num_pins + 1; > + /* for avoiding multi HP mixers */ > + cfg->line_out_type = AUTO_PIN_LINE_OUT; > } > return 0; > } Would you like me to test this patch? If so, what should I apply it to and how should I proceed?
Yes, the test would be appreciated, of course. Apply it to the latest 3.0-rc kernel and test.
Also, the additional patch below will give "Headphone" mixer control back while new "Surround", "Center" and "LFE" will appear.
Note that you'll need to change "Channel Mode" mixer control to "6ch" for using the surround outputs even with these patches. As default, it's set as "2ch".
Takashi
I will definitely try to give this a shot, but the outcome might be dependent on the fact whether Fedora 15 will want to work with 3.0-rc kernel.
You can build the kernel by yourself at any time...
How about 8-channel sound btw? Under Windows the device claims to be capable of it.
Do you have 4 jacks? Otherwise it's nonsense.
Takashi
OK, I was able to successfully apply the patch and build the kernel. I tested it using: $ pasuspender bash $ speaker-test -Dplug:surround51 -c6 Once I set sound to 6-channel using alsamixer -c0, I was able to hear the sound for all 6 channels. Setting it to 4 channels took away LFE and center. Pulseaudio outputs are still a little messy, but this is out of ALSA scope, I think.
Julian
It seems I spoke a bit too soon. The superfluous controls are still a problem. Speaker and Headphone controls seem to be overlapping (new output on amixer -c0 attached). They both control the headphones when they are plugged in and internal speakers when not.
Julian
W dniu 25.06.2011 13:31, Julian Sikorski pisze:
W dniu 25.06.2011 13:08, Julian Sikorski pisze:
W dniu 25.06.2011 09:11, Takashi Iwai pisze:
At Fri, 24 Jun 2011 13:25:53 +0200, Julian Sikorski wrote:
On 24/06/2011 11:12, Takashi Iwai wrote:
At Fri, 24 Jun 2011 10:34:01 +0200, Takashi Iwai wrote:
At Thu, 23 Jun 2011 18:40:47 +0200, Julian Sikorski wrote: > > On 23/06/2011 14:41, Takashi Iwai wrote: >> At Thu, 23 Jun 2011 08:36:55 +0200, >> Julian Sikorski wrote: >>> >>> Hi, >>> >>> I am coming here from pulseaudio-general mailing list [1]. I recently >>> got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in >>> microphone and the following connectors: >>> - headphone out >>> - microphone in; can be switched to center/lfe out >>> - spdif out; can be switched to rear speaker out >>> - line in; can be switched to side speaker out >>> Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 >>> sound, and there are two configs showing up in pavucontrol (analog >>> output and analog headphones) which seem to be the same. I have uploaded >>> the output of alsa-info.sh [2]. Please let me know if more information >>> is needed. >> >> The current parser doesn't allow the multi-io pins when the primary >> output is no line-out. The patch below should fix (change) the >> behavior. It'll count HP out, too. >> >> >> Takashi >> >> --- >> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c >> index fe56b2b..b0cf726 100644 >> --- a/sound/pci/hda/patch_realtek.c >> +++ b/sound/pci/hda/patch_realtek.c >> @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, >> hda_nid_t dac; >> >> spec->multiout.dac_nids = spec->private_dac_nids; >> + spec->multiout.num_dacs = 0; >> for (i = 0; i< cfg->line_outs; i++) { >> dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); >> if (!dac) >> @@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >> unsigned int location, defcfg; >> int num_pins; >> >> + if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) { >> + /* use HP as primary out */ >> + cfg->speaker_outs = cfg->line_outs; >> + memcpy(cfg->speaker_pins, cfg->line_out_pins, >> + sizeof(cfg->speaker_pins)); >> + cfg->line_outs = cfg->hp_outs; >> + memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins)); >> + cfg->hp_outs = 0; >> + memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins)); >> + cfg->line_out_type = AUTO_PIN_HP_OUT; >> + alc662_auto_fill_dac_nids(codec, cfg); >> + } >> if (cfg->line_outs != 1 || >> - cfg->line_out_type != AUTO_PIN_LINE_OUT) >> + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) >> return 0; >> >> defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]); >> @@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >> spec->multi_ios = num_pins; >> spec->ext_channel_count = 2; >> spec->multiout.num_dacs = num_pins + 1; >> + /* for avoiding multi HP mixers */ >> + cfg->line_out_type = AUTO_PIN_LINE_OUT; >> } >> return 0; >> } > Would you like me to test this patch? If so, what should I apply it to > and how should I proceed?
Yes, the test would be appreciated, of course. Apply it to the latest 3.0-rc kernel and test.
Also, the additional patch below will give "Headphone" mixer control back while new "Surround", "Center" and "LFE" will appear.
Note that you'll need to change "Channel Mode" mixer control to "6ch" for using the surround outputs even with these patches. As default, it's set as "2ch".
Takashi
I will definitely try to give this a shot, but the outcome might be dependent on the fact whether Fedora 15 will want to work with 3.0-rc kernel.
You can build the kernel by yourself at any time...
How about 8-channel sound btw? Under Windows the device claims to be capable of it.
Do you have 4 jacks? Otherwise it's nonsense.
Takashi
OK, I was able to successfully apply the patch and build the kernel. I tested it using: $ pasuspender bash $ speaker-test -Dplug:surround51 -c6 Once I set sound to 6-channel using alsamixer -c0, I was able to hear the sound for all 6 channels. Setting it to 4 channels took away LFE and center. Pulseaudio outputs are still a little messy, but this is out of ALSA scope, I think.
Julian
It seems I spoke a bit too soon. The superfluous controls are still a problem. Speaker and Headphone controls seem to be overlapping (new output on amixer -c0 attached). They both control the headphones when they are plugged in and internal speakers when not.
Julian
Sorry for this email bombardment, but I just booted back to stock F15 kernel (2.6.38.8-32.fc15.x86_64) and noticed that speaker and headphone controls actually do what they advertise. Still, it is impossible to make the sound go through the speakers when headphones are plugged in (I tried pavucontrol for this). The converse might be true though - if you select "analog headphones" in pavucontrols the speakers go silent.
Julian
At Sat, 25 Jun 2011 14:01:06 +0200, Julian Sikorski wrote:
W dniu 25.06.2011 13:31, Julian Sikorski pisze:
W dniu 25.06.2011 13:08, Julian Sikorski pisze:
W dniu 25.06.2011 09:11, Takashi Iwai pisze:
At Fri, 24 Jun 2011 13:25:53 +0200, Julian Sikorski wrote:
On 24/06/2011 11:12, Takashi Iwai wrote:
At Fri, 24 Jun 2011 10:34:01 +0200, Takashi Iwai wrote: > > At Thu, 23 Jun 2011 18:40:47 +0200, > Julian Sikorski wrote: >> >> On 23/06/2011 14:41, Takashi Iwai wrote: >>> At Thu, 23 Jun 2011 08:36:55 +0200, >>> Julian Sikorski wrote: >>>> >>>> Hi, >>>> >>>> I am coming here from pulseaudio-general mailing list [1]. I recently >>>> got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in >>>> microphone and the following connectors: >>>> - headphone out >>>> - microphone in; can be switched to center/lfe out >>>> - spdif out; can be switched to rear speaker out >>>> - line in; can be switched to side speaker out >>>> Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 >>>> sound, and there are two configs showing up in pavucontrol (analog >>>> output and analog headphones) which seem to be the same. I have uploaded >>>> the output of alsa-info.sh [2]. Please let me know if more information >>>> is needed. >>> >>> The current parser doesn't allow the multi-io pins when the primary >>> output is no line-out. The patch below should fix (change) the >>> behavior. It'll count HP out, too. >>> >>> >>> Takashi >>> >>> --- >>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c >>> index fe56b2b..b0cf726 100644 >>> --- a/sound/pci/hda/patch_realtek.c >>> +++ b/sound/pci/hda/patch_realtek.c >>> @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, >>> hda_nid_t dac; >>> >>> spec->multiout.dac_nids = spec->private_dac_nids; >>> + spec->multiout.num_dacs = 0; >>> for (i = 0; i< cfg->line_outs; i++) { >>> dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); >>> if (!dac) >>> @@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>> unsigned int location, defcfg; >>> int num_pins; >>> >>> + if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) { >>> + /* use HP as primary out */ >>> + cfg->speaker_outs = cfg->line_outs; >>> + memcpy(cfg->speaker_pins, cfg->line_out_pins, >>> + sizeof(cfg->speaker_pins)); >>> + cfg->line_outs = cfg->hp_outs; >>> + memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins)); >>> + cfg->hp_outs = 0; >>> + memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins)); >>> + cfg->line_out_type = AUTO_PIN_HP_OUT; >>> + alc662_auto_fill_dac_nids(codec, cfg); >>> + } >>> if (cfg->line_outs != 1 || >>> - cfg->line_out_type != AUTO_PIN_LINE_OUT) >>> + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) >>> return 0; >>> >>> defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]); >>> @@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>> spec->multi_ios = num_pins; >>> spec->ext_channel_count = 2; >>> spec->multiout.num_dacs = num_pins + 1; >>> + /* for avoiding multi HP mixers */ >>> + cfg->line_out_type = AUTO_PIN_LINE_OUT; >>> } >>> return 0; >>> } >> Would you like me to test this patch? If so, what should I apply it to >> and how should I proceed? > > Yes, the test would be appreciated, of course. > Apply it to the latest 3.0-rc kernel and test.
Also, the additional patch below will give "Headphone" mixer control back while new "Surround", "Center" and "LFE" will appear.
Note that you'll need to change "Channel Mode" mixer control to "6ch" for using the surround outputs even with these patches. As default, it's set as "2ch".
Takashi
I will definitely try to give this a shot, but the outcome might be dependent on the fact whether Fedora 15 will want to work with 3.0-rc kernel.
You can build the kernel by yourself at any time...
How about 8-channel sound btw? Under Windows the device claims to be capable of it.
Do you have 4 jacks? Otherwise it's nonsense.
Takashi
OK, I was able to successfully apply the patch and build the kernel. I tested it using: $ pasuspender bash $ speaker-test -Dplug:surround51 -c6 Once I set sound to 6-channel using alsamixer -c0, I was able to hear the sound for all 6 channels. Setting it to 4 channels took away LFE and center. Pulseaudio outputs are still a little messy, but this is out of ALSA scope, I think.
Julian
It seems I spoke a bit too soon. The superfluous controls are still a problem. Speaker and Headphone controls seem to be overlapping (new output on amixer -c0 attached). They both control the headphones when they are plugged in and internal speakers when not.
Julian
Sorry for this email bombardment, but I just booted back to stock F15 kernel (2.6.38.8-32.fc15.x86_64) and noticed that speaker and headphone controls actually do what they advertise. Still, it is impossible to make the sound go through the speakers when headphones are plugged in (I tried pavucontrol for this).
The auto-mute feature can be controlled "Auto-Mute Mode" mixer enum. Set to "Disabled" will turn off the auto-mute in the driver side. However...
The converse might be true though - if you select "analog headphones" in pavucontrols the speakers go silent.
This is what PA does intentionally, independently from the driver auto-mute behavior.
Takashi
W dniu 27.06.2011 08:04, Takashi Iwai pisze:
At Sat, 25 Jun 2011 14:01:06 +0200, Julian Sikorski wrote:
W dniu 25.06.2011 13:31, Julian Sikorski pisze:
W dniu 25.06.2011 13:08, Julian Sikorski pisze:
W dniu 25.06.2011 09:11, Takashi Iwai pisze:
At Fri, 24 Jun 2011 13:25:53 +0200, Julian Sikorski wrote:
On 24/06/2011 11:12, Takashi Iwai wrote: > At Fri, 24 Jun 2011 10:34:01 +0200, > Takashi Iwai wrote: >> >> At Thu, 23 Jun 2011 18:40:47 +0200, >> Julian Sikorski wrote: >>> >>> On 23/06/2011 14:41, Takashi Iwai wrote: >>>> At Thu, 23 Jun 2011 08:36:55 +0200, >>>> Julian Sikorski wrote: >>>>> >>>>> Hi, >>>>> >>>>> I am coming here from pulseaudio-general mailing list [1]. I recently >>>>> got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in >>>>> microphone and the following connectors: >>>>> - headphone out >>>>> - microphone in; can be switched to center/lfe out >>>>> - spdif out; can be switched to rear speaker out >>>>> - line in; can be switched to side speaker out >>>>> Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 >>>>> sound, and there are two configs showing up in pavucontrol (analog >>>>> output and analog headphones) which seem to be the same. I have uploaded >>>>> the output of alsa-info.sh [2]. Please let me know if more information >>>>> is needed. >>>> >>>> The current parser doesn't allow the multi-io pins when the primary >>>> output is no line-out. The patch below should fix (change) the >>>> behavior. It'll count HP out, too. >>>> >>>> >>>> Takashi >>>> >>>> --- >>>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c >>>> index fe56b2b..b0cf726 100644 >>>> --- a/sound/pci/hda/patch_realtek.c >>>> +++ b/sound/pci/hda/patch_realtek.c >>>> @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, >>>> hda_nid_t dac; >>>> >>>> spec->multiout.dac_nids = spec->private_dac_nids; >>>> + spec->multiout.num_dacs = 0; >>>> for (i = 0; i< cfg->line_outs; i++) { >>>> dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); >>>> if (!dac) >>>> @@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>> unsigned int location, defcfg; >>>> int num_pins; >>>> >>>> + if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) { >>>> + /* use HP as primary out */ >>>> + cfg->speaker_outs = cfg->line_outs; >>>> + memcpy(cfg->speaker_pins, cfg->line_out_pins, >>>> + sizeof(cfg->speaker_pins)); >>>> + cfg->line_outs = cfg->hp_outs; >>>> + memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins)); >>>> + cfg->hp_outs = 0; >>>> + memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins)); >>>> + cfg->line_out_type = AUTO_PIN_HP_OUT; >>>> + alc662_auto_fill_dac_nids(codec, cfg); >>>> + } >>>> if (cfg->line_outs != 1 || >>>> - cfg->line_out_type != AUTO_PIN_LINE_OUT) >>>> + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) >>>> return 0; >>>> >>>> defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]); >>>> @@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>> spec->multi_ios = num_pins; >>>> spec->ext_channel_count = 2; >>>> spec->multiout.num_dacs = num_pins + 1; >>>> + /* for avoiding multi HP mixers */ >>>> + cfg->line_out_type = AUTO_PIN_LINE_OUT; >>>> } >>>> return 0; >>>> } >>> Would you like me to test this patch? If so, what should I apply it to >>> and how should I proceed? >> >> Yes, the test would be appreciated, of course. >> Apply it to the latest 3.0-rc kernel and test. > > Also, the additional patch below will give "Headphone" mixer control > back while new "Surround", "Center" and "LFE" will appear. > > Note that you'll need to change "Channel Mode" mixer control to "6ch" > for using the surround outputs even with these patches. As default, > it's set as "2ch". > > > Takashi > I will definitely try to give this a shot, but the outcome might be dependent on the fact whether Fedora 15 will want to work with 3.0-rc kernel.
You can build the kernel by yourself at any time...
How about 8-channel sound btw? Under Windows the device claims to be capable of it.
Do you have 4 jacks? Otherwise it's nonsense.
Takashi
OK, I was able to successfully apply the patch and build the kernel. I tested it using: $ pasuspender bash $ speaker-test -Dplug:surround51 -c6 Once I set sound to 6-channel using alsamixer -c0, I was able to hear the sound for all 6 channels. Setting it to 4 channels took away LFE and center. Pulseaudio outputs are still a little messy, but this is out of ALSA scope, I think.
Julian
It seems I spoke a bit too soon. The superfluous controls are still a problem. Speaker and Headphone controls seem to be overlapping (new output on amixer -c0 attached). They both control the headphones when they are plugged in and internal speakers when not.
Julian
Sorry for this email bombardment, but I just booted back to stock F15 kernel (2.6.38.8-32.fc15.x86_64) and noticed that speaker and headphone controls actually do what they advertise. Still, it is impossible to make the sound go through the speakers when headphones are plugged in (I tried pavucontrol for this).
The auto-mute feature can be controlled "Auto-Mute Mode" mixer enum. Set to "Disabled" will turn off the auto-mute in the driver side. However...
You are right - when auto-mute is disabled sound goes via both speakers and headphones when they are plugged. I did not know the function of auto-mute. However, the "Speaker" and "Headphone" controls still do influence both outputs, and "Speaker" can only be muted - there is no volume control available. So, in my opinion, they should either be merged altogether, or switched back to the way they work in 2.6.38.8-32.fc15.x86_64, that is setting the volume of speakers and headphones independently.
The converse might be true though - if you select "analog headphones" in pavucontrols the speakers go silent.
This is what PA does intentionally, independently from the driver auto-mute behavior.
OK, understood.
Takashi
Julian
At Mon, 27 Jun 2011 08:21:26 +0200, Julian Sikorski wrote:
W dniu 27.06.2011 08:04, Takashi Iwai pisze:
At Sat, 25 Jun 2011 14:01:06 +0200, Julian Sikorski wrote:
W dniu 25.06.2011 13:31, Julian Sikorski pisze:
W dniu 25.06.2011 13:08, Julian Sikorski pisze:
W dniu 25.06.2011 09:11, Takashi Iwai pisze:
At Fri, 24 Jun 2011 13:25:53 +0200, Julian Sikorski wrote: > > On 24/06/2011 11:12, Takashi Iwai wrote: >> At Fri, 24 Jun 2011 10:34:01 +0200, >> Takashi Iwai wrote: >>> >>> At Thu, 23 Jun 2011 18:40:47 +0200, >>> Julian Sikorski wrote: >>>> >>>> On 23/06/2011 14:41, Takashi Iwai wrote: >>>>> At Thu, 23 Jun 2011 08:36:55 +0200, >>>>> Julian Sikorski wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> I am coming here from pulseaudio-general mailing list [1]. I recently >>>>>> got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in >>>>>> microphone and the following connectors: >>>>>> - headphone out >>>>>> - microphone in; can be switched to center/lfe out >>>>>> - spdif out; can be switched to rear speaker out >>>>>> - line in; can be switched to side speaker out >>>>>> Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 >>>>>> sound, and there are two configs showing up in pavucontrol (analog >>>>>> output and analog headphones) which seem to be the same. I have uploaded >>>>>> the output of alsa-info.sh [2]. Please let me know if more information >>>>>> is needed. >>>>> >>>>> The current parser doesn't allow the multi-io pins when the primary >>>>> output is no line-out. The patch below should fix (change) the >>>>> behavior. It'll count HP out, too. >>>>> >>>>> >>>>> Takashi >>>>> >>>>> --- >>>>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c >>>>> index fe56b2b..b0cf726 100644 >>>>> --- a/sound/pci/hda/patch_realtek.c >>>>> +++ b/sound/pci/hda/patch_realtek.c >>>>> @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, >>>>> hda_nid_t dac; >>>>> >>>>> spec->multiout.dac_nids = spec->private_dac_nids; >>>>> + spec->multiout.num_dacs = 0; >>>>> for (i = 0; i< cfg->line_outs; i++) { >>>>> dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); >>>>> if (!dac) >>>>> @@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>> unsigned int location, defcfg; >>>>> int num_pins; >>>>> >>>>> + if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) { >>>>> + /* use HP as primary out */ >>>>> + cfg->speaker_outs = cfg->line_outs; >>>>> + memcpy(cfg->speaker_pins, cfg->line_out_pins, >>>>> + sizeof(cfg->speaker_pins)); >>>>> + cfg->line_outs = cfg->hp_outs; >>>>> + memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins)); >>>>> + cfg->hp_outs = 0; >>>>> + memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins)); >>>>> + cfg->line_out_type = AUTO_PIN_HP_OUT; >>>>> + alc662_auto_fill_dac_nids(codec, cfg); >>>>> + } >>>>> if (cfg->line_outs != 1 || >>>>> - cfg->line_out_type != AUTO_PIN_LINE_OUT) >>>>> + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) >>>>> return 0; >>>>> >>>>> defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]); >>>>> @@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>> spec->multi_ios = num_pins; >>>>> spec->ext_channel_count = 2; >>>>> spec->multiout.num_dacs = num_pins + 1; >>>>> + /* for avoiding multi HP mixers */ >>>>> + cfg->line_out_type = AUTO_PIN_LINE_OUT; >>>>> } >>>>> return 0; >>>>> } >>>> Would you like me to test this patch? If so, what should I apply it to >>>> and how should I proceed? >>> >>> Yes, the test would be appreciated, of course. >>> Apply it to the latest 3.0-rc kernel and test. >> >> Also, the additional patch below will give "Headphone" mixer control >> back while new "Surround", "Center" and "LFE" will appear. >> >> Note that you'll need to change "Channel Mode" mixer control to "6ch" >> for using the surround outputs even with these patches. As default, >> it's set as "2ch". >> >> >> Takashi >> > I will definitely try to give this a shot, but the outcome might be > dependent on the fact whether Fedora 15 will want to work with 3.0-rc > kernel.
You can build the kernel by yourself at any time...
> How about 8-channel sound btw? Under Windows the device claims to be > capable of it.
Do you have 4 jacks? Otherwise it's nonsense.
Takashi
OK, I was able to successfully apply the patch and build the kernel. I tested it using: $ pasuspender bash $ speaker-test -Dplug:surround51 -c6 Once I set sound to 6-channel using alsamixer -c0, I was able to hear the sound for all 6 channels. Setting it to 4 channels took away LFE and center. Pulseaudio outputs are still a little messy, but this is out of ALSA scope, I think.
Julian
It seems I spoke a bit too soon. The superfluous controls are still a problem. Speaker and Headphone controls seem to be overlapping (new output on amixer -c0 attached). They both control the headphones when they are plugged in and internal speakers when not.
Julian
Sorry for this email bombardment, but I just booted back to stock F15 kernel (2.6.38.8-32.fc15.x86_64) and noticed that speaker and headphone controls actually do what they advertise. Still, it is impossible to make the sound go through the speakers when headphones are plugged in (I tried pavucontrol for this).
The auto-mute feature can be controlled "Auto-Mute Mode" mixer enum. Set to "Disabled" will turn off the auto-mute in the driver side. However...
You are right - when auto-mute is disabled sound goes via both speakers and headphones when they are plugged. I did not know the function of auto-mute. However, the "Speaker" and "Headphone" controls still do influence both outputs, and "Speaker" can only be muted - there is no volume control available. So, in my opinion, they should either be merged altogether, or switched back to the way they work in 2.6.38.8-32.fc15.x86_64, that is setting the volume of speakers and headphones independently.
Give alsa-info.sh outputs on your machine with the latest status for further analysis.
Takashi
At Mon, 27 Jun 2011 11:19:36 +0200, Takashi Iwai wrote:
At Mon, 27 Jun 2011 08:21:26 +0200, Julian Sikorski wrote:
W dniu 27.06.2011 08:04, Takashi Iwai pisze:
At Sat, 25 Jun 2011 14:01:06 +0200, Julian Sikorski wrote:
W dniu 25.06.2011 13:31, Julian Sikorski pisze:
W dniu 25.06.2011 13:08, Julian Sikorski pisze:
W dniu 25.06.2011 09:11, Takashi Iwai pisze: > At Fri, 24 Jun 2011 13:25:53 +0200, > Julian Sikorski wrote: >> >> On 24/06/2011 11:12, Takashi Iwai wrote: >>> At Fri, 24 Jun 2011 10:34:01 +0200, >>> Takashi Iwai wrote: >>>> >>>> At Thu, 23 Jun 2011 18:40:47 +0200, >>>> Julian Sikorski wrote: >>>>> >>>>> On 23/06/2011 14:41, Takashi Iwai wrote: >>>>>> At Thu, 23 Jun 2011 08:36:55 +0200, >>>>>> Julian Sikorski wrote: >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I am coming here from pulseaudio-general mailing list [1]. I recently >>>>>>> got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in >>>>>>> microphone and the following connectors: >>>>>>> - headphone out >>>>>>> - microphone in; can be switched to center/lfe out >>>>>>> - spdif out; can be switched to rear speaker out >>>>>>> - line in; can be switched to side speaker out >>>>>>> Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 >>>>>>> sound, and there are two configs showing up in pavucontrol (analog >>>>>>> output and analog headphones) which seem to be the same. I have uploaded >>>>>>> the output of alsa-info.sh [2]. Please let me know if more information >>>>>>> is needed. >>>>>> >>>>>> The current parser doesn't allow the multi-io pins when the primary >>>>>> output is no line-out. The patch below should fix (change) the >>>>>> behavior. It'll count HP out, too. >>>>>> >>>>>> >>>>>> Takashi >>>>>> >>>>>> --- >>>>>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c >>>>>> index fe56b2b..b0cf726 100644 >>>>>> --- a/sound/pci/hda/patch_realtek.c >>>>>> +++ b/sound/pci/hda/patch_realtek.c >>>>>> @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, >>>>>> hda_nid_t dac; >>>>>> >>>>>> spec->multiout.dac_nids = spec->private_dac_nids; >>>>>> + spec->multiout.num_dacs = 0; >>>>>> for (i = 0; i< cfg->line_outs; i++) { >>>>>> dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); >>>>>> if (!dac) >>>>>> @@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>>> unsigned int location, defcfg; >>>>>> int num_pins; >>>>>> >>>>>> + if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) { >>>>>> + /* use HP as primary out */ >>>>>> + cfg->speaker_outs = cfg->line_outs; >>>>>> + memcpy(cfg->speaker_pins, cfg->line_out_pins, >>>>>> + sizeof(cfg->speaker_pins)); >>>>>> + cfg->line_outs = cfg->hp_outs; >>>>>> + memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins)); >>>>>> + cfg->hp_outs = 0; >>>>>> + memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins)); >>>>>> + cfg->line_out_type = AUTO_PIN_HP_OUT; >>>>>> + alc662_auto_fill_dac_nids(codec, cfg); >>>>>> + } >>>>>> if (cfg->line_outs != 1 || >>>>>> - cfg->line_out_type != AUTO_PIN_LINE_OUT) >>>>>> + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) >>>>>> return 0; >>>>>> >>>>>> defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]); >>>>>> @@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>>> spec->multi_ios = num_pins; >>>>>> spec->ext_channel_count = 2; >>>>>> spec->multiout.num_dacs = num_pins + 1; >>>>>> + /* for avoiding multi HP mixers */ >>>>>> + cfg->line_out_type = AUTO_PIN_LINE_OUT; >>>>>> } >>>>>> return 0; >>>>>> } >>>>> Would you like me to test this patch? If so, what should I apply it to >>>>> and how should I proceed? >>>> >>>> Yes, the test would be appreciated, of course. >>>> Apply it to the latest 3.0-rc kernel and test. >>> >>> Also, the additional patch below will give "Headphone" mixer control >>> back while new "Surround", "Center" and "LFE" will appear. >>> >>> Note that you'll need to change "Channel Mode" mixer control to "6ch" >>> for using the surround outputs even with these patches. As default, >>> it's set as "2ch". >>> >>> >>> Takashi >>> >> I will definitely try to give this a shot, but the outcome might be >> dependent on the fact whether Fedora 15 will want to work with 3.0-rc >> kernel. > > You can build the kernel by yourself at any time... > >> How about 8-channel sound btw? Under Windows the device claims to be >> capable of it. > > Do you have 4 jacks? Otherwise it's nonsense. > > > Takashi OK, I was able to successfully apply the patch and build the kernel. I tested it using: $ pasuspender bash $ speaker-test -Dplug:surround51 -c6 Once I set sound to 6-channel using alsamixer -c0, I was able to hear the sound for all 6 channels. Setting it to 4 channels took away LFE and center. Pulseaudio outputs are still a little messy, but this is out of ALSA scope, I think.
Julian
It seems I spoke a bit too soon. The superfluous controls are still a problem. Speaker and Headphone controls seem to be overlapping (new output on amixer -c0 attached). They both control the headphones when they are plugged in and internal speakers when not.
Julian
Sorry for this email bombardment, but I just booted back to stock F15 kernel (2.6.38.8-32.fc15.x86_64) and noticed that speaker and headphone controls actually do what they advertise. Still, it is impossible to make the sound go through the speakers when headphones are plugged in (I tried pavucontrol for this).
The auto-mute feature can be controlled "Auto-Mute Mode" mixer enum. Set to "Disabled" will turn off the auto-mute in the driver side. However...
You are right - when auto-mute is disabled sound goes via both speakers and headphones when they are plugged. I did not know the function of auto-mute. However, the "Speaker" and "Headphone" controls still do influence both outputs, and "Speaker" can only be muted - there is no volume control available. So, in my opinion, they should either be merged altogether, or switched back to the way they work in 2.6.38.8-32.fc15.x86_64, that is setting the volume of speakers and headphones independently.
Give alsa-info.sh outputs on your machine with the latest status for further analysis.
I think this issue was fixed now in topic/hda branch in sound git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
Give it a try. You can pull the branch into the latest Linus git tree for merging into the latest 3.0-rc.
Takashi
On 27/06/2011 14:32, Takashi Iwai wrote:
At Mon, 27 Jun 2011 11:19:36 +0200, Takashi Iwai wrote:
At Mon, 27 Jun 2011 08:21:26 +0200, Julian Sikorski wrote:
W dniu 27.06.2011 08:04, Takashi Iwai pisze:
At Sat, 25 Jun 2011 14:01:06 +0200, Julian Sikorski wrote:
W dniu 25.06.2011 13:31, Julian Sikorski pisze:
W dniu 25.06.2011 13:08, Julian Sikorski pisze: > W dniu 25.06.2011 09:11, Takashi Iwai pisze: >> At Fri, 24 Jun 2011 13:25:53 +0200, >> Julian Sikorski wrote: >>> >>> On 24/06/2011 11:12, Takashi Iwai wrote: >>>> At Fri, 24 Jun 2011 10:34:01 +0200, >>>> Takashi Iwai wrote: >>>>> >>>>> At Thu, 23 Jun 2011 18:40:47 +0200, >>>>> Julian Sikorski wrote: >>>>>> >>>>>> On 23/06/2011 14:41, Takashi Iwai wrote: >>>>>>> At Thu, 23 Jun 2011 08:36:55 +0200, >>>>>>> Julian Sikorski wrote: >>>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I am coming here from pulseaudio-general mailing list [1]. I recently >>>>>>>> got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in >>>>>>>> microphone and the following connectors: >>>>>>>> - headphone out >>>>>>>> - microphone in; can be switched to center/lfe out >>>>>>>> - spdif out; can be switched to rear speaker out >>>>>>>> - line in; can be switched to side speaker out >>>>>>>> Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 >>>>>>>> sound, and there are two configs showing up in pavucontrol (analog >>>>>>>> output and analog headphones) which seem to be the same. I have uploaded >>>>>>>> the output of alsa-info.sh [2]. Please let me know if more information >>>>>>>> is needed. >>>>>>> >>>>>>> The current parser doesn't allow the multi-io pins when the primary >>>>>>> output is no line-out. The patch below should fix (change) the >>>>>>> behavior. It'll count HP out, too. >>>>>>> >>>>>>> >>>>>>> Takashi >>>>>>> >>>>>>> --- >>>>>>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c >>>>>>> index fe56b2b..b0cf726 100644 >>>>>>> --- a/sound/pci/hda/patch_realtek.c >>>>>>> +++ b/sound/pci/hda/patch_realtek.c >>>>>>> @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, >>>>>>> hda_nid_t dac; >>>>>>> >>>>>>> spec->multiout.dac_nids = spec->private_dac_nids; >>>>>>> + spec->multiout.num_dacs = 0; >>>>>>> for (i = 0; i< cfg->line_outs; i++) { >>>>>>> dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); >>>>>>> if (!dac) >>>>>>> @@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>>>> unsigned int location, defcfg; >>>>>>> int num_pins; >>>>>>> >>>>>>> + if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) { >>>>>>> + /* use HP as primary out */ >>>>>>> + cfg->speaker_outs = cfg->line_outs; >>>>>>> + memcpy(cfg->speaker_pins, cfg->line_out_pins, >>>>>>> + sizeof(cfg->speaker_pins)); >>>>>>> + cfg->line_outs = cfg->hp_outs; >>>>>>> + memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins)); >>>>>>> + cfg->hp_outs = 0; >>>>>>> + memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins)); >>>>>>> + cfg->line_out_type = AUTO_PIN_HP_OUT; >>>>>>> + alc662_auto_fill_dac_nids(codec, cfg); >>>>>>> + } >>>>>>> if (cfg->line_outs != 1 || >>>>>>> - cfg->line_out_type != AUTO_PIN_LINE_OUT) >>>>>>> + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) >>>>>>> return 0; >>>>>>> >>>>>>> defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]); >>>>>>> @@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>>>> spec->multi_ios = num_pins; >>>>>>> spec->ext_channel_count = 2; >>>>>>> spec->multiout.num_dacs = num_pins + 1; >>>>>>> + /* for avoiding multi HP mixers */ >>>>>>> + cfg->line_out_type = AUTO_PIN_LINE_OUT; >>>>>>> } >>>>>>> return 0; >>>>>>> } >>>>>> Would you like me to test this patch? If so, what should I apply it to >>>>>> and how should I proceed? >>>>> >>>>> Yes, the test would be appreciated, of course. >>>>> Apply it to the latest 3.0-rc kernel and test. >>>> >>>> Also, the additional patch below will give "Headphone" mixer control >>>> back while new "Surround", "Center" and "LFE" will appear. >>>> >>>> Note that you'll need to change "Channel Mode" mixer control to "6ch" >>>> for using the surround outputs even with these patches. As default, >>>> it's set as "2ch". >>>> >>>> >>>> Takashi >>>> >>> I will definitely try to give this a shot, but the outcome might be >>> dependent on the fact whether Fedora 15 will want to work with 3.0-rc >>> kernel. >> >> You can build the kernel by yourself at any time... >> >>> How about 8-channel sound btw? Under Windows the device claims to be >>> capable of it. >> >> Do you have 4 jacks? Otherwise it's nonsense. >> >> >> Takashi > OK, I was able to successfully apply the patch and build the kernel. I > tested it using: > $ pasuspender bash > $ speaker-test -Dplug:surround51 -c6 > Once I set sound to 6-channel using alsamixer -c0, I was able to hear > the sound for all 6 channels. Setting it to 4 channels took away LFE and > center. Pulseaudio outputs are still a little messy, but this is out of > ALSA scope, I think. > > Julian It seems I spoke a bit too soon. The superfluous controls are still a problem. Speaker and Headphone controls seem to be overlapping (new output on amixer -c0 attached). They both control the headphones when they are plugged in and internal speakers when not.
Julian
Sorry for this email bombardment, but I just booted back to stock F15 kernel (2.6.38.8-32.fc15.x86_64) and noticed that speaker and headphone controls actually do what they advertise. Still, it is impossible to make the sound go through the speakers when headphones are plugged in (I tried pavucontrol for this).
The auto-mute feature can be controlled "Auto-Mute Mode" mixer enum. Set to "Disabled" will turn off the auto-mute in the driver side. However...
You are right - when auto-mute is disabled sound goes via both speakers and headphones when they are plugged. I did not know the function of auto-mute. However, the "Speaker" and "Headphone" controls still do influence both outputs, and "Speaker" can only be muted - there is no volume control available. So, in my opinion, they should either be merged altogether, or switched back to the way they work in 2.6.38.8-32.fc15.x86_64, that is setting the volume of speakers and headphones independently.
Give alsa-info.sh outputs on your machine with the latest status for further analysis.
I think this issue was fixed now in topic/hda branch in sound git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
Give it a try. You can pull the branch into the latest Linus git tree for merging into the latest 3.0-rc.
Takashi
Do you mean this specific commit: http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git;a=commit;h=3af... ? The thing is that I only know how to build a kernel using Fedora RPM and I have never built it purely from source. As a result, I can easily test patches but testing whole trees might be tricky. If it is a problem, I can try to seek help how to create RPM out of your tree. I'll try to test it one way or the other once I get back home in the evening (I'm in CEST time zone). Thank you for all the input so far.
Julian
At Mon, 27 Jun 2011 14:42:08 +0200, Julian Sikorski wrote:
I think this issue was fixed now in topic/hda branch in sound git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
Give it a try. You can pull the branch into the latest Linus git tree for merging into the latest 3.0-rc.
Takashi
Do you mean this specific commit: http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git;a=commit;h=3af... ?
Yes. But the commit depends on other older commits, so you can't do cherry-pick easily.
Takashi
On 27/06/2011 14:46, Takashi Iwai wrote:
At Mon, 27 Jun 2011 14:42:08 +0200, Julian Sikorski wrote:
I think this issue was fixed now in topic/hda branch in sound git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
Give it a try. You can pull the branch into the latest Linus git tree for merging into the latest 3.0-rc.
Takashi
Do you mean this specific commit: http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git;a=commit;h=3af... ?
Yes. But the commit depends on other older commits, so you can't do cherry-pick easily.
Takashi
OK, how about obtaining a diff against Linus's tree? Would that work? Moreover, does this tree include the two patches you asked me to test earlier?
Julian
At Mon, 27 Jun 2011 14:55:14 +0200, Julian Sikorski wrote:
On 27/06/2011 14:46, Takashi Iwai wrote:
At Mon, 27 Jun 2011 14:42:08 +0200, Julian Sikorski wrote:
I think this issue was fixed now in topic/hda branch in sound git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
Give it a try. You can pull the branch into the latest Linus git tree for merging into the latest 3.0-rc.
Takashi
Do you mean this specific commit: http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git;a=commit;h=3af... ?
Yes. But the commit depends on other older commits, so you can't do cherry-pick easily.
Takashi
OK, how about obtaining a diff against Linus's tree? Would that work?
It should work, of course. It's something like what git-merge does :) But beware that it'll be a big patch with 12736 lines.
Moreover, does this tree include the two patches you asked me to test earlier?
Yes.
Takashi
W dniu 27.06.2011 14:32, Takashi Iwai pisze:
At Mon, 27 Jun 2011 11:19:36 +0200, Takashi Iwai wrote:
At Mon, 27 Jun 2011 08:21:26 +0200, Julian Sikorski wrote:
W dniu 27.06.2011 08:04, Takashi Iwai pisze:
At Sat, 25 Jun 2011 14:01:06 +0200, Julian Sikorski wrote:
W dniu 25.06.2011 13:31, Julian Sikorski pisze:
W dniu 25.06.2011 13:08, Julian Sikorski pisze: > W dniu 25.06.2011 09:11, Takashi Iwai pisze: >> At Fri, 24 Jun 2011 13:25:53 +0200, >> Julian Sikorski wrote: >>> >>> On 24/06/2011 11:12, Takashi Iwai wrote: >>>> At Fri, 24 Jun 2011 10:34:01 +0200, >>>> Takashi Iwai wrote: >>>>> >>>>> At Thu, 23 Jun 2011 18:40:47 +0200, >>>>> Julian Sikorski wrote: >>>>>> >>>>>> On 23/06/2011 14:41, Takashi Iwai wrote: >>>>>>> At Thu, 23 Jun 2011 08:36:55 +0200, >>>>>>> Julian Sikorski wrote: >>>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I am coming here from pulseaudio-general mailing list [1]. I recently >>>>>>>> got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in >>>>>>>> microphone and the following connectors: >>>>>>>> - headphone out >>>>>>>> - microphone in; can be switched to center/lfe out >>>>>>>> - spdif out; can be switched to rear speaker out >>>>>>>> - line in; can be switched to side speaker out >>>>>>>> Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 >>>>>>>> sound, and there are two configs showing up in pavucontrol (analog >>>>>>>> output and analog headphones) which seem to be the same. I have uploaded >>>>>>>> the output of alsa-info.sh [2]. Please let me know if more information >>>>>>>> is needed. >>>>>>> >>>>>>> The current parser doesn't allow the multi-io pins when the primary >>>>>>> output is no line-out. The patch below should fix (change) the >>>>>>> behavior. It'll count HP out, too. >>>>>>> >>>>>>> >>>>>>> Takashi >>>>>>> >>>>>>> --- >>>>>>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c >>>>>>> index fe56b2b..b0cf726 100644 >>>>>>> --- a/sound/pci/hda/patch_realtek.c >>>>>>> +++ b/sound/pci/hda/patch_realtek.c >>>>>>> @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, >>>>>>> hda_nid_t dac; >>>>>>> >>>>>>> spec->multiout.dac_nids = spec->private_dac_nids; >>>>>>> + spec->multiout.num_dacs = 0; >>>>>>> for (i = 0; i< cfg->line_outs; i++) { >>>>>>> dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); >>>>>>> if (!dac) >>>>>>> @@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>>>> unsigned int location, defcfg; >>>>>>> int num_pins; >>>>>>> >>>>>>> + if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) { >>>>>>> + /* use HP as primary out */ >>>>>>> + cfg->speaker_outs = cfg->line_outs; >>>>>>> + memcpy(cfg->speaker_pins, cfg->line_out_pins, >>>>>>> + sizeof(cfg->speaker_pins)); >>>>>>> + cfg->line_outs = cfg->hp_outs; >>>>>>> + memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins)); >>>>>>> + cfg->hp_outs = 0; >>>>>>> + memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins)); >>>>>>> + cfg->line_out_type = AUTO_PIN_HP_OUT; >>>>>>> + alc662_auto_fill_dac_nids(codec, cfg); >>>>>>> + } >>>>>>> if (cfg->line_outs != 1 || >>>>>>> - cfg->line_out_type != AUTO_PIN_LINE_OUT) >>>>>>> + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) >>>>>>> return 0; >>>>>>> >>>>>>> defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]); >>>>>>> @@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>>>> spec->multi_ios = num_pins; >>>>>>> spec->ext_channel_count = 2; >>>>>>> spec->multiout.num_dacs = num_pins + 1; >>>>>>> + /* for avoiding multi HP mixers */ >>>>>>> + cfg->line_out_type = AUTO_PIN_LINE_OUT; >>>>>>> } >>>>>>> return 0; >>>>>>> } >>>>>> Would you like me to test this patch? If so, what should I apply it to >>>>>> and how should I proceed? >>>>> >>>>> Yes, the test would be appreciated, of course. >>>>> Apply it to the latest 3.0-rc kernel and test. >>>> >>>> Also, the additional patch below will give "Headphone" mixer control >>>> back while new "Surround", "Center" and "LFE" will appear. >>>> >>>> Note that you'll need to change "Channel Mode" mixer control to "6ch" >>>> for using the surround outputs even with these patches. As default, >>>> it's set as "2ch". >>>> >>>> >>>> Takashi >>>> >>> I will definitely try to give this a shot, but the outcome might be >>> dependent on the fact whether Fedora 15 will want to work with 3.0-rc >>> kernel. >> >> You can build the kernel by yourself at any time... >> >>> How about 8-channel sound btw? Under Windows the device claims to be >>> capable of it. >> >> Do you have 4 jacks? Otherwise it's nonsense. >> >> >> Takashi > OK, I was able to successfully apply the patch and build the kernel. I > tested it using: > $ pasuspender bash > $ speaker-test -Dplug:surround51 -c6 > Once I set sound to 6-channel using alsamixer -c0, I was able to hear > the sound for all 6 channels. Setting it to 4 channels took away LFE and > center. Pulseaudio outputs are still a little messy, but this is out of > ALSA scope, I think. > > Julian It seems I spoke a bit too soon. The superfluous controls are still a problem. Speaker and Headphone controls seem to be overlapping (new output on amixer -c0 attached). They both control the headphones when they are plugged in and internal speakers when not.
Julian
Sorry for this email bombardment, but I just booted back to stock F15 kernel (2.6.38.8-32.fc15.x86_64) and noticed that speaker and headphone controls actually do what they advertise. Still, it is impossible to make the sound go through the speakers when headphones are plugged in (I tried pavucontrol for this).
The auto-mute feature can be controlled "Auto-Mute Mode" mixer enum. Set to "Disabled" will turn off the auto-mute in the driver side. However...
You are right - when auto-mute is disabled sound goes via both speakers and headphones when they are plugged. I did not know the function of auto-mute. However, the "Speaker" and "Headphone" controls still do influence both outputs, and "Speaker" can only be muted - there is no volume control available. So, in my opinion, they should either be merged altogether, or switched back to the way they work in 2.6.38.8-32.fc15.x86_64, that is setting the volume of speakers and headphones independently.
Give alsa-info.sh outputs on your machine with the latest status for further analysis.
I think this issue was fixed now in topic/hda branch in sound git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
Give it a try. You can pull the branch into the latest Linus git tree for merging into the latest 3.0-rc.
Takashi
It seems like the problem is still there. The output of alsa-info.sh is available here: http://www.alsa-project.org/db/?f=38e2e44ab86691006a837715601aad4311fda0d3
Julian
At Mon, 27 Jun 2011 22:08:29 +0200, Julian Sikorski wrote:
W dniu 27.06.2011 14:32, Takashi Iwai pisze:
At Mon, 27 Jun 2011 11:19:36 +0200, Takashi Iwai wrote:
At Mon, 27 Jun 2011 08:21:26 +0200, Julian Sikorski wrote:
W dniu 27.06.2011 08:04, Takashi Iwai pisze:
At Sat, 25 Jun 2011 14:01:06 +0200, Julian Sikorski wrote:
W dniu 25.06.2011 13:31, Julian Sikorski pisze: > W dniu 25.06.2011 13:08, Julian Sikorski pisze: >> W dniu 25.06.2011 09:11, Takashi Iwai pisze: >>> At Fri, 24 Jun 2011 13:25:53 +0200, >>> Julian Sikorski wrote: >>>> >>>> On 24/06/2011 11:12, Takashi Iwai wrote: >>>>> At Fri, 24 Jun 2011 10:34:01 +0200, >>>>> Takashi Iwai wrote: >>>>>> >>>>>> At Thu, 23 Jun 2011 18:40:47 +0200, >>>>>> Julian Sikorski wrote: >>>>>>> >>>>>>> On 23/06/2011 14:41, Takashi Iwai wrote: >>>>>>>> At Thu, 23 Jun 2011 08:36:55 +0200, >>>>>>>> Julian Sikorski wrote: >>>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> I am coming here from pulseaudio-general mailing list [1]. I recently >>>>>>>>> got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in >>>>>>>>> microphone and the following connectors: >>>>>>>>> - headphone out >>>>>>>>> - microphone in; can be switched to center/lfe out >>>>>>>>> - spdif out; can be switched to rear speaker out >>>>>>>>> - line in; can be switched to side speaker out >>>>>>>>> Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 >>>>>>>>> sound, and there are two configs showing up in pavucontrol (analog >>>>>>>>> output and analog headphones) which seem to be the same. I have uploaded >>>>>>>>> the output of alsa-info.sh [2]. Please let me know if more information >>>>>>>>> is needed. >>>>>>>> >>>>>>>> The current parser doesn't allow the multi-io pins when the primary >>>>>>>> output is no line-out. The patch below should fix (change) the >>>>>>>> behavior. It'll count HP out, too. >>>>>>>> >>>>>>>> >>>>>>>> Takashi >>>>>>>> >>>>>>>> --- >>>>>>>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c >>>>>>>> index fe56b2b..b0cf726 100644 >>>>>>>> --- a/sound/pci/hda/patch_realtek.c >>>>>>>> +++ b/sound/pci/hda/patch_realtek.c >>>>>>>> @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, >>>>>>>> hda_nid_t dac; >>>>>>>> >>>>>>>> spec->multiout.dac_nids = spec->private_dac_nids; >>>>>>>> + spec->multiout.num_dacs = 0; >>>>>>>> for (i = 0; i< cfg->line_outs; i++) { >>>>>>>> dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); >>>>>>>> if (!dac) >>>>>>>> @@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>>>>> unsigned int location, defcfg; >>>>>>>> int num_pins; >>>>>>>> >>>>>>>> + if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) { >>>>>>>> + /* use HP as primary out */ >>>>>>>> + cfg->speaker_outs = cfg->line_outs; >>>>>>>> + memcpy(cfg->speaker_pins, cfg->line_out_pins, >>>>>>>> + sizeof(cfg->speaker_pins)); >>>>>>>> + cfg->line_outs = cfg->hp_outs; >>>>>>>> + memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins)); >>>>>>>> + cfg->hp_outs = 0; >>>>>>>> + memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins)); >>>>>>>> + cfg->line_out_type = AUTO_PIN_HP_OUT; >>>>>>>> + alc662_auto_fill_dac_nids(codec, cfg); >>>>>>>> + } >>>>>>>> if (cfg->line_outs != 1 || >>>>>>>> - cfg->line_out_type != AUTO_PIN_LINE_OUT) >>>>>>>> + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) >>>>>>>> return 0; >>>>>>>> >>>>>>>> defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]); >>>>>>>> @@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>>>>> spec->multi_ios = num_pins; >>>>>>>> spec->ext_channel_count = 2; >>>>>>>> spec->multiout.num_dacs = num_pins + 1; >>>>>>>> + /* for avoiding multi HP mixers */ >>>>>>>> + cfg->line_out_type = AUTO_PIN_LINE_OUT; >>>>>>>> } >>>>>>>> return 0; >>>>>>>> } >>>>>>> Would you like me to test this patch? If so, what should I apply it to >>>>>>> and how should I proceed? >>>>>> >>>>>> Yes, the test would be appreciated, of course. >>>>>> Apply it to the latest 3.0-rc kernel and test. >>>>> >>>>> Also, the additional patch below will give "Headphone" mixer control >>>>> back while new "Surround", "Center" and "LFE" will appear. >>>>> >>>>> Note that you'll need to change "Channel Mode" mixer control to "6ch" >>>>> for using the surround outputs even with these patches. As default, >>>>> it's set as "2ch". >>>>> >>>>> >>>>> Takashi >>>>> >>>> I will definitely try to give this a shot, but the outcome might be >>>> dependent on the fact whether Fedora 15 will want to work with 3.0-rc >>>> kernel. >>> >>> You can build the kernel by yourself at any time... >>> >>>> How about 8-channel sound btw? Under Windows the device claims to be >>>> capable of it. >>> >>> Do you have 4 jacks? Otherwise it's nonsense. >>> >>> >>> Takashi >> OK, I was able to successfully apply the patch and build the kernel. I >> tested it using: >> $ pasuspender bash >> $ speaker-test -Dplug:surround51 -c6 >> Once I set sound to 6-channel using alsamixer -c0, I was able to hear >> the sound for all 6 channels. Setting it to 4 channels took away LFE and >> center. Pulseaudio outputs are still a little messy, but this is out of >> ALSA scope, I think. >> >> Julian > It seems I spoke a bit too soon. The superfluous controls are still a > problem. Speaker and Headphone controls seem to be overlapping (new > output on amixer -c0 attached). They both control the headphones when > they are plugged in and internal speakers when not. > > Julian > Sorry for this email bombardment, but I just booted back to stock F15 kernel (2.6.38.8-32.fc15.x86_64) and noticed that speaker and headphone controls actually do what they advertise. Still, it is impossible to make the sound go through the speakers when headphones are plugged in (I tried pavucontrol for this).
The auto-mute feature can be controlled "Auto-Mute Mode" mixer enum. Set to "Disabled" will turn off the auto-mute in the driver side. However...
You are right - when auto-mute is disabled sound goes via both speakers and headphones when they are plugged. I did not know the function of auto-mute. However, the "Speaker" and "Headphone" controls still do influence both outputs, and "Speaker" can only be muted - there is no volume control available. So, in my opinion, they should either be merged altogether, or switched back to the way they work in 2.6.38.8-32.fc15.x86_64, that is setting the volume of speakers and headphones independently.
Give alsa-info.sh outputs on your machine with the latest status for further analysis.
I think this issue was fixed now in topic/hda branch in sound git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
Give it a try. You can pull the branch into the latest Linus git tree for merging into the latest 3.0-rc.
Takashi
It seems like the problem is still there. The output of alsa-info.sh is available here: http://www.alsa-project.org/db/?f=38e2e44ab86691006a837715601aad4311fda0d3
Double-check whether you compiled really the right stuff. The emulator works fine, so something wrong likely in your side.
Takashi
On 28/06/2011 09:12, Takashi Iwai wrote:
Double-check whether you compiled really the right stuff. The emulator works fine, so something wrong likely in your side.
Takashi
When I was asking for help how to build a different kernel tree and a fellow #fedora-kernel channel member offered to compile the stuff for me. The source RPM is here: http://koji.fedoraproject.org/koji/taskinfo?taskID=3164043 Inside, you have alsa-fixups.patch and alsa-next_topic-hda.patch as an addition to the stock Fedora kernel. I looked into alsa-next_topic-hda.patch and it seemed like commit http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git;a=commit;h=3af... was included.
Julian
At Tue, 28 Jun 2011 10:03:34 +0200, Julian Sikorski wrote:
On 28/06/2011 09:12, Takashi Iwai wrote:
Double-check whether you compiled really the right stuff. The emulator works fine, so something wrong likely in your side.
Takashi
When I was asking for help how to build a different kernel tree and a fellow #fedora-kernel channel member offered to compile the stuff for me. The source RPM is here: http://koji.fedoraproject.org/koji/taskinfo?taskID=3164043 Inside, you have alsa-fixups.patch and alsa-next_topic-hda.patch as an addition to the stock Fedora kernel. I looked into alsa-next_topic-hda.patch and it seemed like commit http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git;a=commit;h=3af... was included.
That doesn't explain anything, and I can't help any more, sorry. The single patch won't work unless you really carefully pick up all necessary stuff. You'd better to copy the whole sound/pci/hda/* files from the very latest sound git tree.
Any reason you can't use git and build manually? It'll save your time very much in the end. With a modern PC, you can build the kernel in 10 minutes or so if you edit kernel config beforehand.
Takashi
On 28/06/2011 11:05, Takashi Iwai wrote:
At Tue, 28 Jun 2011 10:03:34 +0200, Julian Sikorski wrote:
On 28/06/2011 09:12, Takashi Iwai wrote:
Double-check whether you compiled really the right stuff. The emulator works fine, so something wrong likely in your side.
Takashi
When I was asking for help how to build a different kernel tree and a fellow #fedora-kernel channel member offered to compile the stuff for me. The source RPM is here: http://koji.fedoraproject.org/koji/taskinfo?taskID=3164043 Inside, you have alsa-fixups.patch and alsa-next_topic-hda.patch as an addition to the stock Fedora kernel. I looked into alsa-next_topic-hda.patch and it seemed like commit http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git;a=commit;h=3af... was included.
That doesn't explain anything, and I can't help any more, sorry. The single patch won't work unless you really carefully pick up all necessary stuff. You'd better to copy the whole sound/pci/hda/* files from the very latest sound git tree.
Any reason you can't use git and build manually? It'll save your time very much in the end. With a modern PC, you can build the kernel in 10 minutes or so if you edit kernel config beforehand.
Takashi
I just never did it and I am not sure how to steal the old config options. Would make oldconfig do the trick?
Julian
At Tue, 28 Jun 2011 12:36:44 +0200, Julian Sikorski wrote:
On 28/06/2011 11:05, Takashi Iwai wrote:
At Tue, 28 Jun 2011 10:03:34 +0200, Julian Sikorski wrote:
On 28/06/2011 09:12, Takashi Iwai wrote:
Double-check whether you compiled really the right stuff. The emulator works fine, so something wrong likely in your side.
Takashi
When I was asking for help how to build a different kernel tree and a fellow #fedora-kernel channel member offered to compile the stuff for me. The source RPM is here: http://koji.fedoraproject.org/koji/taskinfo?taskID=3164043 Inside, you have alsa-fixups.patch and alsa-next_topic-hda.patch as an addition to the stock Fedora kernel. I looked into alsa-next_topic-hda.patch and it seemed like commit http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git;a=commit;h=3af... was included.
That doesn't explain anything, and I can't help any more, sorry. The single patch won't work unless you really carefully pick up all necessary stuff. You'd better to copy the whole sound/pci/hda/* files from the very latest sound git tree.
Any reason you can't use git and build manually? It'll save your time very much in the end. With a modern PC, you can build the kernel in 10 minutes or so if you edit kernel config beforehand.
Takashi
I just never did it and I am not sure how to steal the old config options. Would make oldconfig do the trick?
Yes, and just press return for the questions.
Or you can try make localmodconfig. This will give you a .config with only the currently used modules, so many unused config items are stripped down.
Note that you need to load some dynamically loaded modules (e.g. usb stuff) before running the localmodconfig. Otherwise the modules won't be built for the new kernel.
Takashi
W dniu 28.06.2011 09:12, Takashi Iwai pisze:
At Mon, 27 Jun 2011 22:08:29 +0200, Julian Sikorski wrote:
W dniu 27.06.2011 14:32, Takashi Iwai pisze:
At Mon, 27 Jun 2011 11:19:36 +0200, Takashi Iwai wrote:
At Mon, 27 Jun 2011 08:21:26 +0200, Julian Sikorski wrote:
W dniu 27.06.2011 08:04, Takashi Iwai pisze:
At Sat, 25 Jun 2011 14:01:06 +0200, Julian Sikorski wrote: > > W dniu 25.06.2011 13:31, Julian Sikorski pisze: >> W dniu 25.06.2011 13:08, Julian Sikorski pisze: >>> W dniu 25.06.2011 09:11, Takashi Iwai pisze: >>>> At Fri, 24 Jun 2011 13:25:53 +0200, >>>> Julian Sikorski wrote: >>>>> >>>>> On 24/06/2011 11:12, Takashi Iwai wrote: >>>>>> At Fri, 24 Jun 2011 10:34:01 +0200, >>>>>> Takashi Iwai wrote: >>>>>>> >>>>>>> At Thu, 23 Jun 2011 18:40:47 +0200, >>>>>>> Julian Sikorski wrote: >>>>>>>> >>>>>>>> On 23/06/2011 14:41, Takashi Iwai wrote: >>>>>>>>> At Thu, 23 Jun 2011 08:36:55 +0200, >>>>>>>>> Julian Sikorski wrote: >>>>>>>>>> >>>>>>>>>> Hi, >>>>>>>>>> >>>>>>>>>> I am coming here from pulseaudio-general mailing list [1]. I recently >>>>>>>>>> got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in >>>>>>>>>> microphone and the following connectors: >>>>>>>>>> - headphone out >>>>>>>>>> - microphone in; can be switched to center/lfe out >>>>>>>>>> - spdif out; can be switched to rear speaker out >>>>>>>>>> - line in; can be switched to side speaker out >>>>>>>>>> Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 >>>>>>>>>> sound, and there are two configs showing up in pavucontrol (analog >>>>>>>>>> output and analog headphones) which seem to be the same. I have uploaded >>>>>>>>>> the output of alsa-info.sh [2]. Please let me know if more information >>>>>>>>>> is needed. >>>>>>>>> >>>>>>>>> The current parser doesn't allow the multi-io pins when the primary >>>>>>>>> output is no line-out. The patch below should fix (change) the >>>>>>>>> behavior. It'll count HP out, too. >>>>>>>>> >>>>>>>>> >>>>>>>>> Takashi >>>>>>>>> >>>>>>>>> --- >>>>>>>>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c >>>>>>>>> index fe56b2b..b0cf726 100644 >>>>>>>>> --- a/sound/pci/hda/patch_realtek.c >>>>>>>>> +++ b/sound/pci/hda/patch_realtek.c >>>>>>>>> @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, >>>>>>>>> hda_nid_t dac; >>>>>>>>> >>>>>>>>> spec->multiout.dac_nids = spec->private_dac_nids; >>>>>>>>> + spec->multiout.num_dacs = 0; >>>>>>>>> for (i = 0; i< cfg->line_outs; i++) { >>>>>>>>> dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); >>>>>>>>> if (!dac) >>>>>>>>> @@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>>>>>> unsigned int location, defcfg; >>>>>>>>> int num_pins; >>>>>>>>> >>>>>>>>> + if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) { >>>>>>>>> + /* use HP as primary out */ >>>>>>>>> + cfg->speaker_outs = cfg->line_outs; >>>>>>>>> + memcpy(cfg->speaker_pins, cfg->line_out_pins, >>>>>>>>> + sizeof(cfg->speaker_pins)); >>>>>>>>> + cfg->line_outs = cfg->hp_outs; >>>>>>>>> + memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins)); >>>>>>>>> + cfg->hp_outs = 0; >>>>>>>>> + memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins)); >>>>>>>>> + cfg->line_out_type = AUTO_PIN_HP_OUT; >>>>>>>>> + alc662_auto_fill_dac_nids(codec, cfg); >>>>>>>>> + } >>>>>>>>> if (cfg->line_outs != 1 || >>>>>>>>> - cfg->line_out_type != AUTO_PIN_LINE_OUT) >>>>>>>>> + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) >>>>>>>>> return 0; >>>>>>>>> >>>>>>>>> defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]); >>>>>>>>> @@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>>>>>> spec->multi_ios = num_pins; >>>>>>>>> spec->ext_channel_count = 2; >>>>>>>>> spec->multiout.num_dacs = num_pins + 1; >>>>>>>>> + /* for avoiding multi HP mixers */ >>>>>>>>> + cfg->line_out_type = AUTO_PIN_LINE_OUT; >>>>>>>>> } >>>>>>>>> return 0; >>>>>>>>> } >>>>>>>> Would you like me to test this patch? If so, what should I apply it to >>>>>>>> and how should I proceed? >>>>>>> >>>>>>> Yes, the test would be appreciated, of course. >>>>>>> Apply it to the latest 3.0-rc kernel and test. >>>>>> >>>>>> Also, the additional patch below will give "Headphone" mixer control >>>>>> back while new "Surround", "Center" and "LFE" will appear. >>>>>> >>>>>> Note that you'll need to change "Channel Mode" mixer control to "6ch" >>>>>> for using the surround outputs even with these patches. As default, >>>>>> it's set as "2ch". >>>>>> >>>>>> >>>>>> Takashi >>>>>> >>>>> I will definitely try to give this a shot, but the outcome might be >>>>> dependent on the fact whether Fedora 15 will want to work with 3.0-rc >>>>> kernel. >>>> >>>> You can build the kernel by yourself at any time... >>>> >>>>> How about 8-channel sound btw? Under Windows the device claims to be >>>>> capable of it. >>>> >>>> Do you have 4 jacks? Otherwise it's nonsense. >>>> >>>> >>>> Takashi >>> OK, I was able to successfully apply the patch and build the kernel. I >>> tested it using: >>> $ pasuspender bash >>> $ speaker-test -Dplug:surround51 -c6 >>> Once I set sound to 6-channel using alsamixer -c0, I was able to hear >>> the sound for all 6 channels. Setting it to 4 channels took away LFE and >>> center. Pulseaudio outputs are still a little messy, but this is out of >>> ALSA scope, I think. >>> >>> Julian >> It seems I spoke a bit too soon. The superfluous controls are still a >> problem. Speaker and Headphone controls seem to be overlapping (new >> output on amixer -c0 attached). They both control the headphones when >> they are plugged in and internal speakers when not. >> >> Julian >> > Sorry for this email bombardment, but I just booted back to stock F15 > kernel (2.6.38.8-32.fc15.x86_64) and noticed that speaker and headphone > controls actually do what they advertise. Still, it is impossible to > make the sound go through the speakers when headphones are plugged in (I > tried pavucontrol for this).
The auto-mute feature can be controlled "Auto-Mute Mode" mixer enum. Set to "Disabled" will turn off the auto-mute in the driver side. However...
You are right - when auto-mute is disabled sound goes via both speakers and headphones when they are plugged. I did not know the function of auto-mute. However, the "Speaker" and "Headphone" controls still do influence both outputs, and "Speaker" can only be muted - there is no volume control available. So, in my opinion, they should either be merged altogether, or switched back to the way they work in 2.6.38.8-32.fc15.x86_64, that is setting the volume of speakers and headphones independently.
Give alsa-info.sh outputs on your machine with the latest status for further analysis.
I think this issue was fixed now in topic/hda branch in sound git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
Give it a try. You can pull the branch into the latest Linus git tree for merging into the latest 3.0-rc.
Takashi
It seems like the problem is still there. The output of alsa-info.sh is available here: http://www.alsa-project.org/db/?f=38e2e44ab86691006a837715601aad4311fda0d3
Double-check whether you compiled really the right stuff. The emulator works fine, so something wrong likely in your side.
Takashi
I compiled the latest origin/master of sound-2.6 tree and the problem is still there. Output of alsa-info.sh is attached.
Julian
W dniu 29.06.2011 19:36, Julian Sikorski pisze:
W dniu 28.06.2011 09:12, Takashi Iwai pisze:
At Mon, 27 Jun 2011 22:08:29 +0200, Julian Sikorski wrote:
W dniu 27.06.2011 14:32, Takashi Iwai pisze:
At Mon, 27 Jun 2011 11:19:36 +0200, Takashi Iwai wrote:
At Mon, 27 Jun 2011 08:21:26 +0200, Julian Sikorski wrote:
W dniu 27.06.2011 08:04, Takashi Iwai pisze: > At Sat, 25 Jun 2011 14:01:06 +0200, > Julian Sikorski wrote: >> >> W dniu 25.06.2011 13:31, Julian Sikorski pisze: >>> W dniu 25.06.2011 13:08, Julian Sikorski pisze: >>>> W dniu 25.06.2011 09:11, Takashi Iwai pisze: >>>>> At Fri, 24 Jun 2011 13:25:53 +0200, >>>>> Julian Sikorski wrote: >>>>>> >>>>>> On 24/06/2011 11:12, Takashi Iwai wrote: >>>>>>> At Fri, 24 Jun 2011 10:34:01 +0200, >>>>>>> Takashi Iwai wrote: >>>>>>>> >>>>>>>> At Thu, 23 Jun 2011 18:40:47 +0200, >>>>>>>> Julian Sikorski wrote: >>>>>>>>> >>>>>>>>> On 23/06/2011 14:41, Takashi Iwai wrote: >>>>>>>>>> At Thu, 23 Jun 2011 08:36:55 +0200, >>>>>>>>>> Julian Sikorski wrote: >>>>>>>>>>> >>>>>>>>>>> Hi, >>>>>>>>>>> >>>>>>>>>>> I am coming here from pulseaudio-general mailing list [1]. I recently >>>>>>>>>>> got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in >>>>>>>>>>> microphone and the following connectors: >>>>>>>>>>> - headphone out >>>>>>>>>>> - microphone in; can be switched to center/lfe out >>>>>>>>>>> - spdif out; can be switched to rear speaker out >>>>>>>>>>> - line in; can be switched to side speaker out >>>>>>>>>>> Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 >>>>>>>>>>> sound, and there are two configs showing up in pavucontrol (analog >>>>>>>>>>> output and analog headphones) which seem to be the same. I have uploaded >>>>>>>>>>> the output of alsa-info.sh [2]. Please let me know if more information >>>>>>>>>>> is needed. >>>>>>>>>> >>>>>>>>>> The current parser doesn't allow the multi-io pins when the primary >>>>>>>>>> output is no line-out. The patch below should fix (change) the >>>>>>>>>> behavior. It'll count HP out, too. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Takashi >>>>>>>>>> >>>>>>>>>> --- >>>>>>>>>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c >>>>>>>>>> index fe56b2b..b0cf726 100644 >>>>>>>>>> --- a/sound/pci/hda/patch_realtek.c >>>>>>>>>> +++ b/sound/pci/hda/patch_realtek.c >>>>>>>>>> @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, >>>>>>>>>> hda_nid_t dac; >>>>>>>>>> >>>>>>>>>> spec->multiout.dac_nids = spec->private_dac_nids; >>>>>>>>>> + spec->multiout.num_dacs = 0; >>>>>>>>>> for (i = 0; i< cfg->line_outs; i++) { >>>>>>>>>> dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); >>>>>>>>>> if (!dac) >>>>>>>>>> @@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>>>>>>> unsigned int location, defcfg; >>>>>>>>>> int num_pins; >>>>>>>>>> >>>>>>>>>> + if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) { >>>>>>>>>> + /* use HP as primary out */ >>>>>>>>>> + cfg->speaker_outs = cfg->line_outs; >>>>>>>>>> + memcpy(cfg->speaker_pins, cfg->line_out_pins, >>>>>>>>>> + sizeof(cfg->speaker_pins)); >>>>>>>>>> + cfg->line_outs = cfg->hp_outs; >>>>>>>>>> + memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins)); >>>>>>>>>> + cfg->hp_outs = 0; >>>>>>>>>> + memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins)); >>>>>>>>>> + cfg->line_out_type = AUTO_PIN_HP_OUT; >>>>>>>>>> + alc662_auto_fill_dac_nids(codec, cfg); >>>>>>>>>> + } >>>>>>>>>> if (cfg->line_outs != 1 || >>>>>>>>>> - cfg->line_out_type != AUTO_PIN_LINE_OUT) >>>>>>>>>> + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) >>>>>>>>>> return 0; >>>>>>>>>> >>>>>>>>>> defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]); >>>>>>>>>> @@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>>>>>>> spec->multi_ios = num_pins; >>>>>>>>>> spec->ext_channel_count = 2; >>>>>>>>>> spec->multiout.num_dacs = num_pins + 1; >>>>>>>>>> + /* for avoiding multi HP mixers */ >>>>>>>>>> + cfg->line_out_type = AUTO_PIN_LINE_OUT; >>>>>>>>>> } >>>>>>>>>> return 0; >>>>>>>>>> } >>>>>>>>> Would you like me to test this patch? If so, what should I apply it to >>>>>>>>> and how should I proceed? >>>>>>>> >>>>>>>> Yes, the test would be appreciated, of course. >>>>>>>> Apply it to the latest 3.0-rc kernel and test. >>>>>>> >>>>>>> Also, the additional patch below will give "Headphone" mixer control >>>>>>> back while new "Surround", "Center" and "LFE" will appear. >>>>>>> >>>>>>> Note that you'll need to change "Channel Mode" mixer control to "6ch" >>>>>>> for using the surround outputs even with these patches. As default, >>>>>>> it's set as "2ch". >>>>>>> >>>>>>> >>>>>>> Takashi >>>>>>> >>>>>> I will definitely try to give this a shot, but the outcome might be >>>>>> dependent on the fact whether Fedora 15 will want to work with 3.0-rc >>>>>> kernel. >>>>> >>>>> You can build the kernel by yourself at any time... >>>>> >>>>>> How about 8-channel sound btw? Under Windows the device claims to be >>>>>> capable of it. >>>>> >>>>> Do you have 4 jacks? Otherwise it's nonsense. >>>>> >>>>> >>>>> Takashi >>>> OK, I was able to successfully apply the patch and build the kernel. I >>>> tested it using: >>>> $ pasuspender bash >>>> $ speaker-test -Dplug:surround51 -c6 >>>> Once I set sound to 6-channel using alsamixer -c0, I was able to hear >>>> the sound for all 6 channels. Setting it to 4 channels took away LFE and >>>> center. Pulseaudio outputs are still a little messy, but this is out of >>>> ALSA scope, I think. >>>> >>>> Julian >>> It seems I spoke a bit too soon. The superfluous controls are still a >>> problem. Speaker and Headphone controls seem to be overlapping (new >>> output on amixer -c0 attached). They both control the headphones when >>> they are plugged in and internal speakers when not. >>> >>> Julian >>> >> Sorry for this email bombardment, but I just booted back to stock F15 >> kernel (2.6.38.8-32.fc15.x86_64) and noticed that speaker and headphone >> controls actually do what they advertise. Still, it is impossible to >> make the sound go through the speakers when headphones are plugged in (I >> tried pavucontrol for this). > > The auto-mute feature can be controlled "Auto-Mute Mode" mixer enum. > Set to "Disabled" will turn off the auto-mute in the driver side. > However...
You are right - when auto-mute is disabled sound goes via both speakers and headphones when they are plugged. I did not know the function of auto-mute. However, the "Speaker" and "Headphone" controls still do influence both outputs, and "Speaker" can only be muted - there is no volume control available. So, in my opinion, they should either be merged altogether, or switched back to the way they work in 2.6.38.8-32.fc15.x86_64, that is setting the volume of speakers and headphones independently.
Give alsa-info.sh outputs on your machine with the latest status for further analysis.
I think this issue was fixed now in topic/hda branch in sound git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
Give it a try. You can pull the branch into the latest Linus git tree for merging into the latest 3.0-rc.
Takashi
It seems like the problem is still there. The output of alsa-info.sh is available here: http://www.alsa-project.org/db/?f=38e2e44ab86691006a837715601aad4311fda0d3
Double-check whether you compiled really the right stuff. The emulator works fine, so something wrong likely in your side.
Takashi
I compiled the latest origin/master of sound-2.6 tree and the problem is still there. Output of alsa-info.sh is attached.
Julian
I had a closer look at 2.6.38.8-32.fc15.x86_64 and the controls are not completely separate. While you can regulate the volume of headphones and speakers separately, muting one mutes the other.
Julian
W dniu 29.06.2011 20:16, Julian Sikorski pisze:
W dniu 29.06.2011 19:36, Julian Sikorski pisze:
W dniu 28.06.2011 09:12, Takashi Iwai pisze:
At Mon, 27 Jun 2011 22:08:29 +0200, Julian Sikorski wrote:
W dniu 27.06.2011 14:32, Takashi Iwai pisze:
At Mon, 27 Jun 2011 11:19:36 +0200, Takashi Iwai wrote:
At Mon, 27 Jun 2011 08:21:26 +0200, Julian Sikorski wrote: > > W dniu 27.06.2011 08:04, Takashi Iwai pisze: >> At Sat, 25 Jun 2011 14:01:06 +0200, >> Julian Sikorski wrote: >>> >>> W dniu 25.06.2011 13:31, Julian Sikorski pisze: >>>> W dniu 25.06.2011 13:08, Julian Sikorski pisze: >>>>> W dniu 25.06.2011 09:11, Takashi Iwai pisze: >>>>>> At Fri, 24 Jun 2011 13:25:53 +0200, >>>>>> Julian Sikorski wrote: >>>>>>> >>>>>>> On 24/06/2011 11:12, Takashi Iwai wrote: >>>>>>>> At Fri, 24 Jun 2011 10:34:01 +0200, >>>>>>>> Takashi Iwai wrote: >>>>>>>>> >>>>>>>>> At Thu, 23 Jun 2011 18:40:47 +0200, >>>>>>>>> Julian Sikorski wrote: >>>>>>>>>> >>>>>>>>>> On 23/06/2011 14:41, Takashi Iwai wrote: >>>>>>>>>>> At Thu, 23 Jun 2011 08:36:55 +0200, >>>>>>>>>>> Julian Sikorski wrote: >>>>>>>>>>>> >>>>>>>>>>>> Hi, >>>>>>>>>>>> >>>>>>>>>>>> I am coming here from pulseaudio-general mailing list [1]. I recently >>>>>>>>>>>> got myself a Clevo P150HM laptop. It has 2.1 speakers, a built-in >>>>>>>>>>>> microphone and the following connectors: >>>>>>>>>>>> - headphone out >>>>>>>>>>>> - microphone in; can be switched to center/lfe out >>>>>>>>>>>> - spdif out; can be switched to rear speaker out >>>>>>>>>>>> - line in; can be switched to side speaker out >>>>>>>>>>>> Alsa does not seem to reflect that the device is capable of 5.1 and 7.1 >>>>>>>>>>>> sound, and there are two configs showing up in pavucontrol (analog >>>>>>>>>>>> output and analog headphones) which seem to be the same. I have uploaded >>>>>>>>>>>> the output of alsa-info.sh [2]. Please let me know if more information >>>>>>>>>>>> is needed. >>>>>>>>>>> >>>>>>>>>>> The current parser doesn't allow the multi-io pins when the primary >>>>>>>>>>> output is no line-out. The patch below should fix (change) the >>>>>>>>>>> behavior. It'll count HP out, too. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Takashi >>>>>>>>>>> >>>>>>>>>>> --- >>>>>>>>>>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c >>>>>>>>>>> index fe56b2b..b0cf726 100644 >>>>>>>>>>> --- a/sound/pci/hda/patch_realtek.c >>>>>>>>>>> +++ b/sound/pci/hda/patch_realtek.c >>>>>>>>>>> @@ -18992,6 +18992,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, >>>>>>>>>>> hda_nid_t dac; >>>>>>>>>>> >>>>>>>>>>> spec->multiout.dac_nids = spec->private_dac_nids; >>>>>>>>>>> + spec->multiout.num_dacs = 0; >>>>>>>>>>> for (i = 0; i< cfg->line_outs; i++) { >>>>>>>>>>> dac = alc_auto_look_for_dac(codec, cfg->line_out_pins[i]); >>>>>>>>>>> if (!dac) >>>>>>>>>>> @@ -19326,8 +19327,20 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>>>>>>>> unsigned int location, defcfg; >>>>>>>>>>> int num_pins; >>>>>>>>>>> >>>>>>>>>>> + if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT&& cfg->hp_outs == 1) { >>>>>>>>>>> + /* use HP as primary out */ >>>>>>>>>>> + cfg->speaker_outs = cfg->line_outs; >>>>>>>>>>> + memcpy(cfg->speaker_pins, cfg->line_out_pins, >>>>>>>>>>> + sizeof(cfg->speaker_pins)); >>>>>>>>>>> + cfg->line_outs = cfg->hp_outs; >>>>>>>>>>> + memcpy(cfg->line_out_pins, cfg->hp_pins, sizeof(cfg->hp_pins)); >>>>>>>>>>> + cfg->hp_outs = 0; >>>>>>>>>>> + memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins)); >>>>>>>>>>> + cfg->line_out_type = AUTO_PIN_HP_OUT; >>>>>>>>>>> + alc662_auto_fill_dac_nids(codec, cfg); >>>>>>>>>>> + } >>>>>>>>>>> if (cfg->line_outs != 1 || >>>>>>>>>>> - cfg->line_out_type != AUTO_PIN_LINE_OUT) >>>>>>>>>>> + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) >>>>>>>>>>> return 0; >>>>>>>>>>> >>>>>>>>>>> defcfg = snd_hda_codec_get_pincfg(codec, cfg->line_out_pins[0]); >>>>>>>>>>> @@ -19348,6 +19361,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec) >>>>>>>>>>> spec->multi_ios = num_pins; >>>>>>>>>>> spec->ext_channel_count = 2; >>>>>>>>>>> spec->multiout.num_dacs = num_pins + 1; >>>>>>>>>>> + /* for avoiding multi HP mixers */ >>>>>>>>>>> + cfg->line_out_type = AUTO_PIN_LINE_OUT; >>>>>>>>>>> } >>>>>>>>>>> return 0; >>>>>>>>>>> } >>>>>>>>>> Would you like me to test this patch? If so, what should I apply it to >>>>>>>>>> and how should I proceed? >>>>>>>>> >>>>>>>>> Yes, the test would be appreciated, of course. >>>>>>>>> Apply it to the latest 3.0-rc kernel and test. >>>>>>>> >>>>>>>> Also, the additional patch below will give "Headphone" mixer control >>>>>>>> back while new "Surround", "Center" and "LFE" will appear. >>>>>>>> >>>>>>>> Note that you'll need to change "Channel Mode" mixer control to "6ch" >>>>>>>> for using the surround outputs even with these patches. As default, >>>>>>>> it's set as "2ch". >>>>>>>> >>>>>>>> >>>>>>>> Takashi >>>>>>>> >>>>>>> I will definitely try to give this a shot, but the outcome might be >>>>>>> dependent on the fact whether Fedora 15 will want to work with 3.0-rc >>>>>>> kernel. >>>>>> >>>>>> You can build the kernel by yourself at any time... >>>>>> >>>>>>> How about 8-channel sound btw? Under Windows the device claims to be >>>>>>> capable of it. >>>>>> >>>>>> Do you have 4 jacks? Otherwise it's nonsense. >>>>>> >>>>>> >>>>>> Takashi >>>>> OK, I was able to successfully apply the patch and build the kernel. I >>>>> tested it using: >>>>> $ pasuspender bash >>>>> $ speaker-test -Dplug:surround51 -c6 >>>>> Once I set sound to 6-channel using alsamixer -c0, I was able to hear >>>>> the sound for all 6 channels. Setting it to 4 channels took away LFE and >>>>> center. Pulseaudio outputs are still a little messy, but this is out of >>>>> ALSA scope, I think. >>>>> >>>>> Julian >>>> It seems I spoke a bit too soon. The superfluous controls are still a >>>> problem. Speaker and Headphone controls seem to be overlapping (new >>>> output on amixer -c0 attached). They both control the headphones when >>>> they are plugged in and internal speakers when not. >>>> >>>> Julian >>>> >>> Sorry for this email bombardment, but I just booted back to stock F15 >>> kernel (2.6.38.8-32.fc15.x86_64) and noticed that speaker and headphone >>> controls actually do what they advertise. Still, it is impossible to >>> make the sound go through the speakers when headphones are plugged in (I >>> tried pavucontrol for this). >> >> The auto-mute feature can be controlled "Auto-Mute Mode" mixer enum. >> Set to "Disabled" will turn off the auto-mute in the driver side. >> However... > > You are right - when auto-mute is disabled sound goes via both speakers > and headphones when they are plugged. I did not know the function of > auto-mute. > However, the "Speaker" and "Headphone" controls still do influence both > outputs, and "Speaker" can only be muted - there is no volume control > available. So, in my opinion, they should either be merged altogether, > or switched back to the way they work in 2.6.38.8-32.fc15.x86_64, that > is setting the volume of speakers and headphones independently.
Give alsa-info.sh outputs on your machine with the latest status for further analysis.
I think this issue was fixed now in topic/hda branch in sound git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
Give it a try. You can pull the branch into the latest Linus git tree for merging into the latest 3.0-rc.
Takashi
It seems like the problem is still there. The output of alsa-info.sh is available here: http://www.alsa-project.org/db/?f=38e2e44ab86691006a837715601aad4311fda0d3
Double-check whether you compiled really the right stuff. The emulator works fine, so something wrong likely in your side.
Takashi
I compiled the latest origin/master of sound-2.6 tree and the problem is still there. Output of alsa-info.sh is attached.
Julian
I had a closer look at 2.6.38.8-32.fc15.x86_64 and the controls are not completely separate. While you can regulate the volume of headphones and speakers separately, muting one mutes the other.
Julian
I also tried merging sound-2.6/master with Linus's tree, but this also did not help.
Julian
At Wed, 29 Jun 2011 21:29:38 +0200, Julian Sikorski wrote:
I also tried merging sound-2.6/master with Linus's tree, but this also did not help.
It's really strange. Are you sure that this is the kernel you modified properly? Before further debugging, check two things:
- Run "git log sound/pci/hda/patch_realtek.c" and the first few entries, whether they come from sound git tree. For example, check the commit below is contained:
commit 7ec9c6ccc6007b14a916021d4ba7ffbcc7822ae3 Author: Takashi Iwai tiwai@suse.de Date: Mon Jun 27 15:53:38 2011 +0200
ALSA: hda - Fix volume-init for ALC259 with invalid widget caps
- Confirm the running kernel is what you really built and installed. You can modify the suffix via $CONFIG_LOCALVERSION in .config file. Name it uniquely, rebuild, re-install and reboot. The new suffix should appear in the output of "uname -r".
- Once when these are correct, check /proc/asound/card0/codec#0: the widget NID 0x02 should contain "Speaker Playback Volume" instead of "Headphone Playback Volume" with the latest driver.
Takashi
W dniu 30.06.2011 07:26, Takashi Iwai pisze:
At Wed, 29 Jun 2011 21:29:38 +0200, Julian Sikorski wrote:
I also tried merging sound-2.6/master with Linus's tree, but this also did not help.
It's really strange. Are you sure that this is the kernel you modified properly? Before further debugging, check two things:
Run "git log sound/pci/hda/patch_realtek.c" and the first few entries, whether they come from sound git tree. For example, check the commit below is contained:
commit 7ec9c6ccc6007b14a916021d4ba7ffbcc7822ae3 Author: Takashi Iwai tiwai@suse.de Date: Mon Jun 27 15:53:38 2011 +0200
ALSA: hda - Fix volume-init for ALC259 with invalid widget caps
commit 0b0c8490670a77b937f502491ae9d5236aa4054a Author: Takashi Iwai tiwai@suse.de Date: Tue Jun 28 12:45:47 2011 +0200
ALSA: hda - Create snd_hda_get_conn_index() helper function
Create snd_hda_get_conn_index() helper function for obtaining the connection index of the widget. Replaced the similar codes used in several codec-drivers with this common helper.
Signed-off-by: Takashi Iwai tiwai@suse.de
commit 4f574b7b1a1cc8aac617e938459e8f03a641e678 Author: Takashi Iwai tiwai@suse.de Date: Mon Jun 27 16:17:07 2011 +0200
ALSA: hda - More volume-init fixes for ALC267 codec
More similar fixes like previous commits: handle the exceptional case like ALC267 where no volume amp is found in ADC widget but in the capsrc widget instead.
Also minor checks for avoiding possible erros: no connection-select when the pin has a single selection, and add beep verbs only when the 0x1d is used for beep.
Signed-off-by: Takashi Iwai tiwai@suse.de
To be even more sure, I re-synced your branch again and built a new kernel. The patch_realtek.c file being built is here: http://belegdol.fedorapeople.org/patch_realtek.c Fresh alsa-info.sh is here: http://www.alsa-project.org/db/?f=5051b2cb788b1db4273e06e98a78783dd0ec679f
- Confirm the running kernel is what you really built and installed. You can modify the suffix via $CONFIG_LOCALVERSION in .config file. Name it uniquely, rebuild, re-install and reboot. The new suffix should appear in the output of "uname -r".
belegdol4 is the suffix I added: $ uname -r 3.0-0.rc5.git0.1.belegdol4.fc15.x86_64
- Once when these are correct, check /proc/asound/card0/codec#0: the widget NID 0x02 should contain "Speaker Playback Volume" instead of "Headphone Playback Volume" with the latest driver.
Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out Control: name="Headphone Playback Volume", index=0, device=0
Perhaps I need to specify a correct model to enable this code?
Takashi
Julian
participants (2)
-
Julian Sikorski
-
Takashi Iwai