Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Julian Sikorski <belegdol@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Subject: Re: model needed for Clevo P150HM (Realtek ALC892)
Date: Sat, 25 Jun 2011 13:31:16 +0200	[thread overview]
Message-ID: <4E05C704.4080806@gmail.com> (raw)
In-Reply-To: <4E05C1B1.50302@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5131 bytes --]

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

[-- Attachment #2: amixer.txt --]
[-- Type: text/plain, Size: 3863 bytes --]

Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 64 [100%] [0.00dB] [on]
  Front Right: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Speaker',0
  Capabilities: pswitch penum
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [on]
  Front Right: Playback [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 64 [100%] [0.00dB] [on]
  Front Right: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Mic Boost',0
  Capabilities: volume penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 3 [100%] [30.00dB]
  Front Right: 3 [100%] [30.00dB]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 46 [100%] [30.00dB] [on]
  Front Right: Capture 46 [100%] [30.00dB] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 16 [35%] [0.00dB] [off]
  Front Right: Capture 16 [35%] [0.00dB] [off]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
Simple mixer control 'Channel Mode',0
  Capabilities: enum
  Items: '2ch' '4ch' '6ch'
  Item0: '2ch'
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Mic' 'Internal Mic' 'Line'
  Item0: 'Internal Mic'
Simple mixer control 'Input Source',1
  Capabilities: cenum
  Items: 'Mic' 'Internal Mic' 'Line'
  Item0: 'Mic'
Simple mixer control 'Internal Mic',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Internal Mic Boost',0
  Capabilities: volume penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2011-06-25 11:31 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-23  6:36 model needed for Clevo P150HM (Realtek ALC892) Julian Sikorski
2011-06-23 12:41 ` Takashi Iwai
2011-06-23 16:40   ` Julian Sikorski
2011-06-24  8:34     ` Takashi Iwai
2011-06-24  9:12       ` Takashi Iwai
2011-06-24 11:25         ` Julian Sikorski
2011-06-25  7:11           ` Takashi Iwai
2011-06-25  9:22             ` Julian Sikorski
2011-06-25 11:08             ` Julian Sikorski
2011-06-25 11:31               ` Julian Sikorski [this message]
2011-06-25 12:01                 ` Julian Sikorski
2011-06-27  6:04                   ` Takashi Iwai
2011-06-27  6:21                     ` Julian Sikorski
2011-06-27  9:19                       ` Takashi Iwai
2011-06-27 12:32                         ` Takashi Iwai
2011-06-27 12:42                           ` Julian Sikorski
2011-06-27 12:46                             ` Takashi Iwai
2011-06-27 12:55                               ` Julian Sikorski
2011-06-27 16:12                                 ` Takashi Iwai
2011-06-27 20:08                           ` Julian Sikorski
2011-06-28  7:12                             ` Takashi Iwai
2011-06-28  8:03                               ` Julian Sikorski
2011-06-28  9:05                                 ` Takashi Iwai
2011-06-28 10:36                                   ` Julian Sikorski
2011-06-28 12:40                                     ` Takashi Iwai
2011-06-29 17:36                               ` Julian Sikorski
2011-06-29 18:16                                 ` Julian Sikorski
2011-06-29 19:29                                   ` Julian Sikorski
2011-06-30  5:26                                     ` Takashi Iwai
2011-06-30  6:33                                       ` Julian Sikorski
     [not found]                                       ` <4E0C17F2.5070704@gmail.com>
2011-06-30  6:54                                         ` Takashi Iwai
2011-06-30 17:00                                           ` Julian Sikorski
2011-06-30 17:41                                             ` Takashi Iwai
2011-06-30 18:09                                               ` Julian Sikorski
2011-06-30 19:28                                                 ` Takashi Iwai
2011-06-30 20:16                                                   ` Julian Sikorski
2011-07-01  5:21                                                     ` Takashi Iwai
2011-07-01  6:14                                                       ` Julian Sikorski
2011-07-01  6:24                                                         ` Takashi Iwai
2011-07-01  6:27                                                           ` Julian Sikorski
2011-07-01  7:07                                                             ` Julian Sikorski
2011-07-01  7:14                                                               ` Takashi Iwai
2011-07-01 11:18                                                                 ` Julian Sikorski
2011-07-01 22:09                                                                 ` Julian Sikorski
2011-07-01 22:37                                                                   ` Julian Sikorski
2011-07-04 20:47                                                                     ` Julian Sikorski
2011-07-05  8:16                                                           ` Julian Sikorski
2011-07-01  7:32                                                       ` Takashi Iwai
2011-07-01 18:57                                                         ` Julian Sikorski
2011-07-01 19:25                                                           ` Takashi Iwai
2011-07-01 19:35                                                             ` Julian Sikorski
2011-07-03 11:22                                                       ` Julian Sikorski
2011-07-04 22:50                                                       ` Julian Sikorski
2011-07-05  1:31                                                         ` Raymond Yau
2011-07-05  7:45                                                           ` Julian Sikorski
2011-07-17 11:55                                                           ` Julian Sikorski
2011-07-17 12:17                                                             ` Julian Sikorski
2011-07-18  7:35                                                               ` Takashi Iwai
2011-07-18  8:52                                                                 ` Takashi Iwai
2011-07-18 11:15                                                                   ` Julian Sikorski
2011-07-18 11:18                                                                     ` Julian Sikorski
2011-07-18 11:19                                                                     ` Takashi Iwai
2011-07-18 11:42                                                                       ` Julian Sikorski
2011-07-18 12:16                                                                         ` Takashi Iwai
2011-07-18 12:42                                                                           ` Julian Sikorski
2011-07-18 13:23                                                                             ` Takashi Iwai
2011-07-18 13:36                                                                               ` Julian Sikorski
2011-07-05  5:32                                                         ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2011-06-23  6:40 Julian Sikorski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E05C704.4080806@gmail.com \
    --to=belegdol@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox