]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'topic/hda' into for-next
authorTakashi Iwai <tiwai@suse.de>
Tue, 3 Aug 2010 10:58:15 +0000 (12:58 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 3 Aug 2010 10:58:15 +0000 (12:58 +0200)
1  2 
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.h

index 4d5abbd0f427a1be8d47caa8b1f647d06cd1a2ed,bd8d7a63d7fe94a84e647b44794a660d19a1256d..a170aac9c0486d94b2fe8687464a2a9fdfe7eaf6
@@@ -733,17 -733,15 +733,17 @@@ static void /*__devinit*/ setup_fg_node
        total_nodes = snd_hda_get_sub_nodes(codec, AC_NODE_ROOT, &nid);
        for (i = 0; i < total_nodes; i++, nid++) {
                function_id = snd_hda_param_read(codec, nid,
 -                                              AC_PAR_FUNCTION_TYPE) & 0xff;
 -              switch (function_id) {
 +                                              AC_PAR_FUNCTION_TYPE);
 +              switch (function_id & 0xff) {
                case AC_GRP_AUDIO_FUNCTION:
                        codec->afg = nid;
 -                      codec->function_id = function_id;
 +                      codec->afg_function_id = function_id & 0xff;
 +                      codec->afg_unsol = (function_id >> 8) & 1;
                        break;
                case AC_GRP_MODEM_FUNCTION:
                        codec->mfg = nid;
 -                      codec->function_id = function_id;
 +                      codec->mfg_function_id = function_id & 0xff;
 +                      codec->mfg_unsol = (function_id >> 8) & 1;
                        break;
                default:
                        break;
@@@ -3053,7 -3051,8 +3053,8 @@@ static struct hda_rate_tbl rate_bits[] 
  unsigned int snd_hda_calc_stream_format(unsigned int rate,
                                        unsigned int channels,
                                        unsigned int format,
-                                       unsigned int maxbps)
+                                       unsigned int maxbps,
+                                       unsigned short spdif_ctls)
  {
        int i;
        unsigned int val = 0;
                return 0;
        }
  
+       if (spdif_ctls & AC_DIG1_NONAUDIO)
+               val |= 0x8000;
        return val;
  }
  EXPORT_SYMBOL_HDA(snd_hda_calc_stream_format);
index a115c0c5ea5f95c6ae209d85b2f9b35b55d77c88,48b33671e7277a7aa4e53681563dc2a3f72d18d7..bbec06d8f53937fa289ad589406faed34ed9825d
@@@ -364,6 -364,9 +364,9 @@@ enum 
  #define AC_DIG2_CC                    (0x7f<<0)
  
  /* Pin widget control - 8bit */
+ #define AC_PINCTL_EPT                 (0x3<<0)
+ #define AC_PINCTL_EPT_NATIVE          0
+ #define AC_PINCTL_EPT_HBR             3
  #define AC_PINCTL_VREFEN              (0x7<<0)
  #define AC_PINCTL_VREF_HIZ            0       /* Hi-Z */
  #define AC_PINCTL_VREF_50             1       /* 50% */
@@@ -760,10 -763,7 +763,10 @@@ struct hda_codec 
        hda_nid_t mfg;  /* MFG node id */
  
        /* ids */
 -      u32 function_id;
 +      u8 afg_function_id;
 +      u8 mfg_function_id;
 +      u8 afg_unsol;
 +      u8 mfg_unsol;
        u32 vendor_id;
        u32 subsystem_id;
        u32 revision_id;
@@@ -931,7 -931,8 +934,8 @@@ void snd_hda_codec_cleanup_stream(struc
  unsigned int snd_hda_calc_stream_format(unsigned int rate,
                                        unsigned int channels,
                                        unsigned int format,
-                                       unsigned int maxbps);
+                                       unsigned int maxbps,
+                                       unsigned short spdif_ctls);
  int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid,
                                unsigned int format);