aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorDaniel J Blueman <daniel.blueman@gmail.com>2010-08-03 06:09:13 -0400
committerTakashi Iwai <tiwai@suse.de>2010-08-03 06:58:01 -0400
commit1b0e372d7b52c9fc96348779015a6db7df7f286e (patch)
tree4c37486c976f983da07c60385add2ed5445b5e12 /sound/pci/hda
parentea87d1c493aba9cf3f645eae0d6d9c0fd44d3189 (diff)
ALSA: hda - Fix beep frequency on IDT 92HD73xx and 92HD71Bxx codecs
Fix HDA beep frequency on IDT 92HD73xx and 92HD71Bxx codecs. These codecs use the standard beep frequency calculation although the datasheet says it's linear frequency. Other IDT/STAC codecs might have the same problem. They should be fixed individually later. Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/patch_sigmatel.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index f1e7babd6920..b8d730c47df1 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -202,6 +202,7 @@ struct sigmatel_spec {
202 unsigned int spdif_mute: 1; 202 unsigned int spdif_mute: 1;
203 unsigned int check_volume_offset:1; 203 unsigned int check_volume_offset:1;
204 unsigned int auto_mic:1; 204 unsigned int auto_mic:1;
205 unsigned int linear_tone_beep:1;
205 206
206 /* gpio lines */ 207 /* gpio lines */
207 unsigned int eapd_mask; 208 unsigned int eapd_mask;
@@ -3802,7 +3803,7 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out
3802 return err; 3803 return err;
3803 if (codec->beep) { 3804 if (codec->beep) {
3804 /* IDT/STAC codecs have linear beep tone parameter */ 3805 /* IDT/STAC codecs have linear beep tone parameter */
3805 codec->beep->linear_tone = 1; 3806 codec->beep->linear_tone = spec->linear_tone_beep;
3806 /* if no beep switch is available, make its own one */ 3807 /* if no beep switch is available, make its own one */
3807 caps = query_amp_caps(codec, nid, HDA_OUTPUT); 3808 caps = query_amp_caps(codec, nid, HDA_OUTPUT);
3808 if (!(caps & AC_AMPCAP_MUTE)) { 3809 if (!(caps & AC_AMPCAP_MUTE)) {
@@ -5005,6 +5006,7 @@ static int patch_stac9200(struct hda_codec *codec)
5005 5006
5006 codec->no_trigger_sense = 1; 5007 codec->no_trigger_sense = 1;
5007 codec->spec = spec; 5008 codec->spec = spec;
5009 spec->linear_tone_beep = 1;
5008 spec->num_pins = ARRAY_SIZE(stac9200_pin_nids); 5010 spec->num_pins = ARRAY_SIZE(stac9200_pin_nids);
5009 spec->pin_nids = stac9200_pin_nids; 5011 spec->pin_nids = stac9200_pin_nids;
5010 spec->board_config = snd_hda_check_board_config(codec, STAC_9200_MODELS, 5012 spec->board_config = snd_hda_check_board_config(codec, STAC_9200_MODELS,
@@ -5068,6 +5070,7 @@ static int patch_stac925x(struct hda_codec *codec)
5068 5070
5069 codec->no_trigger_sense = 1; 5071 codec->no_trigger_sense = 1;
5070 codec->spec = spec; 5072 codec->spec = spec;
5073 spec->linear_tone_beep = 1;
5071 spec->num_pins = ARRAY_SIZE(stac925x_pin_nids); 5074 spec->num_pins = ARRAY_SIZE(stac925x_pin_nids);
5072 spec->pin_nids = stac925x_pin_nids; 5075 spec->pin_nids = stac925x_pin_nids;
5073 5076
@@ -5153,6 +5156,7 @@ static int patch_stac92hd73xx(struct hda_codec *codec)
5153 5156
5154 codec->no_trigger_sense = 1; 5157 codec->no_trigger_sense = 1;
5155 codec->spec = spec; 5158 codec->spec = spec;
5159 spec->linear_tone_beep = 0;
5156 codec->slave_dig_outs = stac92hd73xx_slave_dig_outs; 5160 codec->slave_dig_outs = stac92hd73xx_slave_dig_outs;
5157 spec->num_pins = ARRAY_SIZE(stac92hd73xx_pin_nids); 5161 spec->num_pins = ARRAY_SIZE(stac92hd73xx_pin_nids);
5158 spec->pin_nids = stac92hd73xx_pin_nids; 5162 spec->pin_nids = stac92hd73xx_pin_nids;
@@ -5300,6 +5304,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
5300 5304
5301 codec->no_trigger_sense = 1; 5305 codec->no_trigger_sense = 1;
5302 codec->spec = spec; 5306 codec->spec = spec;
5307 spec->linear_tone_beep = 1;
5303 codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs; 5308 codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs;
5304 spec->digbeep_nid = 0x21; 5309 spec->digbeep_nid = 0x21;
5305 spec->mux_nids = stac92hd83xxx_mux_nids; 5310 spec->mux_nids = stac92hd83xxx_mux_nids;
@@ -5522,6 +5527,7 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
5522 5527
5523 codec->no_trigger_sense = 1; 5528 codec->no_trigger_sense = 1;
5524 codec->spec = spec; 5529 codec->spec = spec;
5530 spec->linear_tone_beep = 0;
5525 codec->patch_ops = stac92xx_patch_ops; 5531 codec->patch_ops = stac92xx_patch_ops;
5526 spec->num_pins = STAC92HD71BXX_NUM_PINS; 5532 spec->num_pins = STAC92HD71BXX_NUM_PINS;
5527 switch (codec->vendor_id) { 5533 switch (codec->vendor_id) {
@@ -5779,6 +5785,7 @@ static int patch_stac922x(struct hda_codec *codec)
5779 5785
5780 codec->no_trigger_sense = 1; 5786 codec->no_trigger_sense = 1;
5781 codec->spec = spec; 5787 codec->spec = spec;
5788 spec->linear_tone_beep = 1;
5782 spec->num_pins = ARRAY_SIZE(stac922x_pin_nids); 5789 spec->num_pins = ARRAY_SIZE(stac922x_pin_nids);
5783 spec->pin_nids = stac922x_pin_nids; 5790 spec->pin_nids = stac922x_pin_nids;
5784 spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS, 5791 spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS,
@@ -5883,6 +5890,7 @@ static int patch_stac927x(struct hda_codec *codec)
5883 5890
5884 codec->no_trigger_sense = 1; 5891 codec->no_trigger_sense = 1;
5885 codec->spec = spec; 5892 codec->spec = spec;
5893 spec->linear_tone_beep = 1;
5886 codec->slave_dig_outs = stac927x_slave_dig_outs; 5894 codec->slave_dig_outs = stac927x_slave_dig_outs;
5887 spec->num_pins = ARRAY_SIZE(stac927x_pin_nids); 5895 spec->num_pins = ARRAY_SIZE(stac927x_pin_nids);
5888 spec->pin_nids = stac927x_pin_nids; 5896 spec->pin_nids = stac927x_pin_nids;
@@ -6018,6 +6026,7 @@ static int patch_stac9205(struct hda_codec *codec)
6018 6026
6019 codec->no_trigger_sense = 1; 6027 codec->no_trigger_sense = 1;
6020 codec->spec = spec; 6028 codec->spec = spec;
6029 spec->linear_tone_beep = 1;
6021 spec->num_pins = ARRAY_SIZE(stac9205_pin_nids); 6030 spec->num_pins = ARRAY_SIZE(stac9205_pin_nids);
6022 spec->pin_nids = stac9205_pin_nids; 6031 spec->pin_nids = stac9205_pin_nids;
6023 spec->board_config = snd_hda_check_board_config(codec, STAC_9205_MODELS, 6032 spec->board_config = snd_hda_check_board_config(codec, STAC_9205_MODELS,
@@ -6174,6 +6183,7 @@ static int patch_stac9872(struct hda_codec *codec)
6174 return -ENOMEM; 6183 return -ENOMEM;
6175 codec->no_trigger_sense = 1; 6184 codec->no_trigger_sense = 1;
6176 codec->spec = spec; 6185 codec->spec = spec;
6186 spec->linear_tone_beep = 1;
6177 spec->num_pins = ARRAY_SIZE(stac9872_pin_nids); 6187 spec->num_pins = ARRAY_SIZE(stac9872_pin_nids);
6178 spec->pin_nids = stac9872_pin_nids; 6188 spec->pin_nids = stac9872_pin_nids;
6179 6189