~ubuntu-branches/ubuntu/vivid/oss4/vivid

« back to all changes in this revision

Viewing changes to kernel/drv/oss_hdaudio/hdaudio_vaio_vgn.c

  • Committer: Bazaar Package Importer
  • Author(s): Romain Beauxis, Samuel Thibault, Romain Beauxis, Sebastien NOEL
  • Date: 2011-06-14 10:06:56 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110614100656-cx4oc7u426zn812z
Tags: 4.2-build2004-1
[ Samuel Thibault ]
* debian/control: Add liboss4-salsa2, liboss4-salsa-dev and
  liboss4-salsa-asound2 packages, equivalent to (and will replace) those from
  the oss-libsalsa package (Closes: #589127).
* debian/patches/liboss4-salsa.patch: New patch to rename libsalsa into
  liboss4-salsa to avoid conflicts in the archive for no good reason.
* debian/rules: Make in libOSSlib and libsalsa.
* debian/liboss4-salsa-dev.install, debian/liboss4-salsa2.install,
  debian/liboss4-salsa-asound2.links, debian/liboss4-salsa-dev.links:
  Install liboss4-salsa libraries like was done in the oss-libsalsa package.
* include-alsa: Add a copy of ALSA 1.0.5 headers: Cf ALSA_1.0.* symbols in
  libsalsa, this is the roughly supported version.
* debian/copyright: Update for new include-alsa files.
* alsa.pc: New file for compatibility with libasound-dev.
* debian/control:
  - Add Vcs-Browser and Vcs-Svn fields.
  - Use linux-any instead of the list of Linux archs (Closes: #604679).
  - Make dkms dependency linux-any only.
* debian/patches/hurd_iot.patch: New patch to fix soundcard.h usage in
  libsalsa on hurd-i386.
* debian/patches/libsalsa_fixes.patch: New patch to fix some printf usages
  and ioctl declaration in libsalsa.
* debian/patches/no_EBADE.patch: New patch to cope with hurd-i386 not having
  EBADE.
* debian/patches/CFLAGS.patch: New patch to make oss4 take debian/rules
  CFLAGS into account.
* debian/patches/snd_asoundlib_version.patch: New patch to add
  snd_asoundlib_version().
* debian/patches/generic_srccconf.patch: New patch to fix source
  configuration on unknown archs.

[ Romain Beauxis ]
* Fixed README.Debian to only mention dkms' modules.
* Switch to dpkg-source 3.0 (quilt) format
* Added DM-Upload-Allowed: yes

[ Sebastien NOEL ]
* New upstream release (Closes: #595298, #619272).
* Fix typo in initscript (Closes: #627149).
* debian/control: adjust linux-headers dependencies (Closes: #628879).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 * This file is part of Open Sound System.
 
4
 *
 
5
 * Copyright (C) 4Front Technologies 1996-2008.
 
6
 *
 
7
 * This this source file is released under GPL v2 license (no other versions).
 
8
 * See the COPYING file included in the main directory of this source
 
9
 * distribution for the license terms and conditions.
 
10
 *
 
11
 */
 
12
/* Codec index is 0 */
 
13
/* Codec vendor 0804:73dc */
 
14
/* HD codec revision 1.0 (2.1) (0x00100201) */
 
15
/* Subsystem ID 104d2200 */
 
16
/* Default amplifier caps: in=80050f00, out=80027f7f */
 
17
#include "oss_hdaudio_cfg.h"
 
18
#include "hdaudio.h"
 
19
#include "hdaudio_codec.h"
 
20
#include "hdaudio_dedicated.h"
 
21
 
 
22
int
 
23
hdaudio_vaio_vgn_mixer_init (int dev, hdaudio_mixer_t * mixer, int cad,
 
24
                             int top_group)
 
25
{
 
26
  int ctl = 0;
 
27
 
 
28
  DDB (cmn_err (CE_CONT, "hdaudio_vaio_vgn_mixer_init got called.\n"));
 
29
 
 
30
  HDA_OUTAMP_F (0x05, top_group, "speaker", 90, MIXF_MAINVOL);
 
31
  /* We sync the volume of the headphone DAC to the speaker DAC */
 
32
#if 1
 
33
  HDA_OUTAMP_F (0x02, top_group, "headphone", 90, MIXF_MAINVOL);
 
34
#endif
 
35
 
 
36
 
 
37
  HDA_SETSELECT (0x0f, 0);      /* Int speaker mode */
 
38
  HDA_SETSELECT (0x14, 1);      /* Int mic mode */
 
39
 
 
40
  /* Handle PIN widgets */
 
41
  {
 
42
    int n, group, pin_group;
 
43
 
 
44
    n = 0;
 
45
 
 
46
    HDA_GROUP (pin_group, top_group, "jack");
 
47
 
 
48
    if (HDA_PIN_GROUP (0x0a, group, pin_group, "headphone", n, "jack", 4))      /* Pin widget 0x0a */
 
49
      {
 
50
        /* Src 0x2=pcm */
 
51
        if (HDA_PINSELECT (0x0a, ctl, group, "mode", -1))
 
52
          HDA_CHOICES (ctl, "pcm-out input");
 
53
        HDA_OUTMUTE (0x0a, group, "mute", UNMUTE);
 
54
      }
 
55
 
 
56
    if (HDA_PIN_GROUP (0x0b, group, pin_group, "black", n, "jack", 4))  /* Pin widget 0x0b */
 
57
      {
 
58
        /* Src 0x4=pcm */
 
59
        if (HDA_PINSELECT (0x0b, ctl, group, "mode", -1))
 
60
          HDA_CHOICES (ctl, "pcm-out input");
 
61
        HDA_OUTMUTE (0x0b, group, "mute", UNMUTE);
 
62
 
 
63
        /* Widget 0x04 (pcm) */
 
64
        HDA_OUTAMP (0x04, group, "-", 90);
 
65
      }
 
66
 
 
67
    if (HDA_PIN_GROUP (0x0c, group, pin_group, "black", n, "jack", 4))  /* Pin widget 0x0c */
 
68
      {
 
69
        /* Src 0x3=pcm */
 
70
        if (HDA_PINSELECT (0x0c, ctl, group, "mode", -1))
 
71
          HDA_CHOICES (ctl, "pcm-out input");
 
72
        HDA_OUTMUTE (0x0c, group, "mute", UNMUTE);
 
73
 
 
74
        /* Widget 0x03 (pcm) */
 
75
        HDA_OUTAMP (0x03, group, "-", 90);
 
76
      }
 
77
 
 
78
    if (HDA_PIN_GROUP (0x0d, group, pin_group, "red", n, "jack", 4))    /* Pin widget 0x0d */
 
79
      {
 
80
        /* Src 0x2=pcm */
 
81
        if (HDA_PINSELECT (0x0d, ctl, group, "mode", -1))
 
82
          HDA_CHOICES (ctl, "pcm-out input");
 
83
        HDA_OUTMUTE (0x0d, group, "mute", UNMUTE);
 
84
      }
 
85
 
 
86
    if (HDA_PIN_GROUP (0x0e, group, pin_group, "black", n, "jack", 4))  /* Pin widget 0x0e */
 
87
      {
 
88
        if (HDA_PINSELECT (0x0e, ctl, group, "mode", -1))
 
89
          HDA_CHOICES (ctl, "input");
 
90
      }
 
91
  }
 
92
  /* Handle ADC widgets */
 
93
  {
 
94
    int n, group, rec_group;
 
95
 
 
96
    n = 0;
 
97
 
 
98
    HDA_GROUP (rec_group, top_group, "record");
 
99
 
 
100
    if (HDA_ADC_GROUP (0x06, group, rec_group, "rec1", n, "record", 4)) /* ADC widget 0x06 */
 
101
      {
 
102
        /* Src 0x7=rec */
 
103
 
 
104
        /* Widget 0x07 (rec) */
 
105
        /* Src 0xe=black */
 
106
        HDA_INAMP_F (0x07, 0, group, "black", 80, MIXF_RECVOL); /* From widget 0x0e */
 
107
      }
 
108
 
 
109
    if (HDA_ADC_GROUP (0x08, group, rec_group, "rec", n, "record", 8))  /* ADC widget 0x08 */
 
110
      {
 
111
        /* Src 0x9=rec */
 
112
 
 
113
        /* Widget 0x09 (rec) */
 
114
        /* Src 0x15=rec */
 
115
        HDA_INAMP_F (0x09, 0, group, "rec", 80, MIXF_RECVOL);   /* From widget 0x15 */
 
116
 
 
117
        /* Widget 0x15 (rec) */
 
118
        /* Src 0xa=black */
 
119
        /* Src 0xd=red */
 
120
        /* Src 0x14=int-mic */
 
121
        /* Src 0x2=pcm */
 
122
        if (HDA_SELECT (0x15, "src", ctl, group, -1))
 
123
          {
 
124
            HDA_CHOICES (ctl, "headphone mic int-mic pcm");
 
125
          }
 
126
        HDA_OUTAMP (0x15, group, "micboost", 0);
 
127
      }
 
128
 
 
129
    if (HDA_ADC_GROUP (0x12, group, rec_group, "spdifin", n, "record", 4))      /* ADC widget 0x12 */
 
130
      {
 
131
        /* Src 0x13=speaker */
 
132
      }
 
133
  }
 
134
  /* Handle misc widgets */
 
135
  {
 
136
#if 0
 
137
    if (HDA_MISC_GROUP (0x16, group, misc_group, "beep", n, "misc", 8)) /* Misc widget 0x16 */
 
138
      {
 
139
        HDA_OUTAMP (0x16, group, "-", 90);
 
140
      }
 
141
#endif
 
142
  }
 
143
  return 0;
 
144
}