mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Daniel J Blueman <daniel.blueman@gmail.com>
Cc: Shérab <Sebastien.Hinderer@ens-lyon.org>,
	"Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: PC Beeps not working with HDA Intel module
Date: Tue, 03 Aug 2010 12:59:39 +0200	[thread overview]
Message-ID: <s5h4ofcm06c.wl%tiwai@suse.de> (raw)
In-Reply-To: <AANLkTinC9cKet9-OSo1teWnJ_3HzvqYTsUPKPn_95nhm@mail.gmail.com>

At Tue, 3 Aug 2010 11:09:13 +0100,
Daniel J Blueman wrote:
> 
> On 3 August 2010 10:02, Daniel J Blueman <daniel.blueman@gmail.com> wrote:
> > On 3 August 2010 09:17, Shérab <Sebastien.Hinderer@ens-lyon.org> wrote:
> >> Dear Daniel and Takashi,
> >>
> >> First of all many thanks to both of you for your so prompt and so
> >> efficient reply ! Quite impressive.
> >>
> >> Daniel J Blueman (2010/08/02 22:41 +0100):
> >>> Testing with value 27 (ie 48000/4*27~=440), we hear the expected tone:
> >>> $ sudo ./hda-verb /dev/snd/hwC0D0 0x1c SET_BEEP_CONTROL 27
> >>> (of course, your beep widget may not be 0x1c)
> >>
> >> I don't know and don't even know what beep widget means, I'm sorry.
> >> If you can explain and also tell me where to find this hda-verb program
> >> you are using, I am willing to test if that's your wish.
> >
> > hda-verb is at:
> > http://ftp1.kernel.org/pub/linux/kernel/people/tiwai/misc/hda-verb/hda-verb-0.3.tar.bz2
> >
> > From your alsa-info.sh, your beep widget (ie device) is at 0x26.
> >
> >>> The problem is the assumption in patch_sigmatel.c:stac92xx_parse_auto_config():
> >>
> >> [...]
> >>
> >> So is there anything more I can/should do now ?
> >
> > Nothing further, as we know the source of the issue.
> 
> Ok, this patch works for me; I've modified it with the ground-truth we
> have (thus there are likely other codecs to fix up later). Shérab, can
> you test from your end?
> 
> Fix HDA beep frequency on IDT 92HD73xx and 92HD71Bxx codecs.
> 
> Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>

FWIW, I applied this now to sound git tree.


thanks,

Takashi


> 
> diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
> index f1e7bab..b8d730c 100644
> --- a/sound/pci/hda/patch_sigmatel.c
> +++ b/sound/pci/hda/patch_sigmatel.c
> @@ -202,6 +202,7 @@ struct sigmatel_spec {
>  	unsigned int spdif_mute: 1;
>  	unsigned int check_volume_offset:1;
>  	unsigned int auto_mic:1;
> +	unsigned int linear_tone_beep:1;
> 
>  	/* gpio lines */
>  	unsigned int eapd_mask;
> @@ -3802,7 +3803,7 @@ static int stac92xx_parse_auto_config(struct
> hda_codec *codec, hda_nid_t dig_out
>  			return err;
>  		if (codec->beep) {
>  			/* IDT/STAC codecs have linear beep tone parameter */
> -			codec->beep->linear_tone = 1;
> +			codec->beep->linear_tone = spec->linear_tone_beep;
>  			/* if no beep switch is available, make its own one */
>  			caps = query_amp_caps(codec, nid, HDA_OUTPUT);
>  			if (!(caps & AC_AMPCAP_MUTE)) {
> @@ -5005,6 +5006,7 @@ static int patch_stac9200(struct hda_codec *codec)
> 
>  	codec->no_trigger_sense = 1;
>  	codec->spec = spec;
> +	spec->linear_tone_beep = 1;
>  	spec->num_pins = ARRAY_SIZE(stac9200_pin_nids);
>  	spec->pin_nids = stac9200_pin_nids;
>  	spec->board_config = snd_hda_check_board_config(codec, STAC_9200_MODELS,
> @@ -5068,6 +5070,7 @@ static int patch_stac925x(struct hda_codec *codec)
> 
>  	codec->no_trigger_sense = 1;
>  	codec->spec = spec;
> +	spec->linear_tone_beep = 1;
>  	spec->num_pins = ARRAY_SIZE(stac925x_pin_nids);
>  	spec->pin_nids = stac925x_pin_nids;
> 
> @@ -5153,6 +5156,7 @@ static int patch_stac92hd73xx(struct hda_codec *codec)
> 
>  	codec->no_trigger_sense = 1;
>  	codec->spec = spec;
> +	spec->linear_tone_beep = 0;
>  	codec->slave_dig_outs = stac92hd73xx_slave_dig_outs;
>  	spec->num_pins = ARRAY_SIZE(stac92hd73xx_pin_nids);
>  	spec->pin_nids = stac92hd73xx_pin_nids;
> @@ -5300,6 +5304,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
> 
>  	codec->no_trigger_sense = 1;
>  	codec->spec = spec;
> +	spec->linear_tone_beep = 1;
>  	codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs;
>  	spec->digbeep_nid = 0x21;
>  	spec->mux_nids = stac92hd83xxx_mux_nids;
> @@ -5522,6 +5527,7 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
> 
>  	codec->no_trigger_sense = 1;
>  	codec->spec = spec;
> +	spec->linear_tone_beep = 0;
>  	codec->patch_ops = stac92xx_patch_ops;
>  	spec->num_pins = STAC92HD71BXX_NUM_PINS;
>  	switch (codec->vendor_id) {
> @@ -5779,6 +5785,7 @@ static int patch_stac922x(struct hda_codec *codec)
> 
>  	codec->no_trigger_sense = 1;
>  	codec->spec = spec;
> +	spec->linear_tone_beep = 1;
>  	spec->num_pins = ARRAY_SIZE(stac922x_pin_nids);
>  	spec->pin_nids = stac922x_pin_nids;
>  	spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS,
> @@ -5883,6 +5890,7 @@ static int patch_stac927x(struct hda_codec *codec)
> 
>  	codec->no_trigger_sense = 1;
>  	codec->spec = spec;
> +	spec->linear_tone_beep = 1;
>  	codec->slave_dig_outs = stac927x_slave_dig_outs;
>  	spec->num_pins = ARRAY_SIZE(stac927x_pin_nids);
>  	spec->pin_nids = stac927x_pin_nids;
> @@ -6018,6 +6026,7 @@ static int patch_stac9205(struct hda_codec *codec)
> 
>  	codec->no_trigger_sense = 1;
>  	codec->spec = spec;
> +	spec->linear_tone_beep = 1;
>  	spec->num_pins = ARRAY_SIZE(stac9205_pin_nids);
>  	spec->pin_nids = stac9205_pin_nids;
>  	spec->board_config = snd_hda_check_board_config(codec, STAC_9205_MODELS,
> @@ -6174,6 +6183,7 @@ static int patch_stac9872(struct hda_codec *codec)
>  		return -ENOMEM;
>  	codec->no_trigger_sense = 1;
>  	codec->spec = spec;
> +	spec->linear_tone_beep = 1;
>  	spec->num_pins = ARRAY_SIZE(stac9872_pin_nids);
>  	spec->pin_nids = stac9872_pin_nids;
> 
> -- 
> Daniel J Blueman
> 

  reply	other threads:[~2010-08-03 10:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-05 11:20 Daniel J Blueman
2010-08-02 18:14 ` Shérab
2010-08-02 21:41   ` Daniel J Blueman
2010-08-02 21:44     ` Takashi Iwai
2010-08-03  8:17     ` Shérab
2010-08-03  9:02       ` Daniel J Blueman
2010-08-03 10:09         ` Daniel J Blueman
2010-08-03 10:59           ` Takashi Iwai [this message]
2010-08-03 11:42             ` Shérab
2010-08-03 11:40           ` Shérab
  -- strict thread matches above, loose matches on Subject: below --
2010-06-26 11:25 Shérab
2010-07-05  6:11 ` Takashi Iwai

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=s5h4ofcm06c.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=Sebastien.Hinderer@ens-lyon.org \
    --cc=daniel.blueman@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®