@@ -243,7 +243,7 @@ static int get_channel_allocation_order(int ca)
243243 return i ;
244244}
245245
246- void snd_print_channel_allocation (int spk_alloc , char * buf , int buflen )
246+ void snd_hdac_print_channel_allocation (int spk_alloc , char * buf , int buflen )
247247{
248248 int i , j ;
249249
@@ -254,7 +254,7 @@ void snd_print_channel_allocation(int spk_alloc, char *buf, int buflen)
254254 }
255255 buf [j ] = '\0' ; /* necessary when j == 0 */
256256}
257- EXPORT_SYMBOL_GPL (snd_print_channel_allocation );
257+ EXPORT_SYMBOL_GPL (snd_hdac_print_channel_allocation );
258258
259259/*
260260 * The transformation takes two steps:
@@ -312,7 +312,7 @@ static int hdmi_channel_allocation_spk_alloc_blk(struct hdac_device *codec,
312312 }
313313 }
314314
315- snd_print_channel_allocation (spk_alloc , buf , sizeof (buf ));
315+ snd_hdac_print_channel_allocation (spk_alloc , buf , sizeof (buf ));
316316 dev_dbg (& codec -> dev , "HDMI: select CA 0x%x for %d-channel allocation: %s\n" ,
317317 ca , channels , buf );
318318
@@ -412,7 +412,7 @@ static struct channel_map_table map_tables[] = {
412412};
413413
414414/* from ALSA API channel position to speaker bit mask */
415- int to_spk_mask (unsigned char c )
415+ int snd_hdac_chmap_to_spk_mask (unsigned char c )
416416{
417417 struct channel_map_table * t = map_tables ;
418418
@@ -422,12 +422,12 @@ int to_spk_mask(unsigned char c)
422422 }
423423 return 0 ;
424424}
425- EXPORT_SYMBOL_GPL (to_spk_mask );
425+ EXPORT_SYMBOL_GPL (snd_hdac_chmap_to_spk_mask );
426426
427427/* from ALSA API channel position to CEA slot */
428428static int to_cea_slot (int ordered_ca , unsigned char pos )
429429{
430- int mask = to_spk_mask (pos );
430+ int mask = snd_hdac_chmap_to_spk_mask (pos );
431431 int i ;
432432
433433 if (mask ) {
@@ -441,7 +441,7 @@ static int to_cea_slot(int ordered_ca, unsigned char pos)
441441}
442442
443443/* from speaker bit mask to ALSA API channel position */
444- int spk_to_chmap (int spk )
444+ int snd_hdac_spk_to_chmap (int spk )
445445{
446446 struct channel_map_table * t = map_tables ;
447447
@@ -451,14 +451,14 @@ int spk_to_chmap(int spk)
451451 }
452452 return 0 ;
453453}
454- EXPORT_SYMBOL_GPL (spk_to_chmap );
454+ EXPORT_SYMBOL_GPL (snd_hdac_spk_to_chmap );
455455
456456/* from CEA slot to ALSA API channel position */
457457static int from_cea_slot (int ordered_ca , unsigned char slot )
458458{
459459 int mask = channel_allocations [ordered_ca ].speakers [7 - slot ];
460460
461- return spk_to_chmap (mask );
461+ return snd_hdac_spk_to_chmap (mask );
462462}
463463
464464/* get the CA index corresponding to the given ALSA API channel map */
@@ -467,7 +467,7 @@ static int hdmi_manual_channel_allocation(int chs, unsigned char *map)
467467 int i , spks = 0 , spk_mask = 0 ;
468468
469469 for (i = 0 ; i < chs ; i ++ ) {
470- int mask = to_spk_mask (map [i ]);
470+ int mask = snd_hdac_chmap_to_spk_mask (map [i ]);
471471
472472 if (mask ) {
473473 spk_mask |= mask ;
@@ -530,7 +530,7 @@ static void hdmi_setup_fake_chmap(unsigned char *map, int ca)
530530 }
531531}
532532
533- void hdmi_setup_channel_mapping (struct hdac_chmap * chmap ,
533+ void snd_hdac_setup_channel_mapping (struct hdac_chmap * chmap ,
534534 hda_nid_t pin_nid , bool non_pcm , int ca ,
535535 int channels , unsigned char * map ,
536536 bool chmap_set )
@@ -545,23 +545,23 @@ void hdmi_setup_channel_mapping(struct hdac_chmap *chmap,
545545
546546 hdmi_debug_channel_mapping (chmap , pin_nid );
547547}
548- EXPORT_SYMBOL_GPL (hdmi_setup_channel_mapping );
548+ EXPORT_SYMBOL_GPL (snd_hdac_setup_channel_mapping );
549549
550- int hdmi_get_active_channels (int ca )
550+ int snd_hdac_get_active_channels (int ca )
551551{
552552 int ordered_ca = get_channel_allocation_order (ca );
553553
554554 return channel_allocations [ordered_ca ].channels ;
555555}
556- EXPORT_SYMBOL_GPL (hdmi_get_active_channels );
556+ EXPORT_SYMBOL_GPL (snd_hdac_get_active_channels );
557557
558- struct hdac_cea_channel_speaker_allocation * hdmi_get_ch_alloc_from_ca (int ca )
558+ struct hdac_cea_channel_speaker_allocation * snd_hdac_get_ch_alloc_from_ca (int ca )
559559{
560560 return & channel_allocations [get_channel_allocation_order (ca )];
561561}
562- EXPORT_SYMBOL_GPL (hdmi_get_ch_alloc_from_ca );
562+ EXPORT_SYMBOL_GPL (snd_hdac_get_ch_alloc_from_ca );
563563
564- int hdmi_channel_allocation (struct hdac_device * hdac , int spk_alloc ,
564+ int snd_hdac_channel_allocation (struct hdac_device * hdac , int spk_alloc ,
565565 int channels , bool chmap_set , bool non_pcm , unsigned char * map )
566566{
567567 int ca ;
@@ -577,7 +577,7 @@ int hdmi_channel_allocation(struct hdac_device *hdac, int spk_alloc,
577577
578578 return ca ;
579579}
580- EXPORT_SYMBOL_GPL (hdmi_channel_allocation );
580+ EXPORT_SYMBOL_GPL (snd_hdac_channel_allocation );
581581
582582/*
583583 * ALSA API channel-map control callbacks
@@ -619,7 +619,7 @@ static void hdmi_cea_alloc_to_tlv_chmap(struct hdac_chmap *hchmap,
619619 if (!spk )
620620 continue ;
621621
622- chmap [count ++ ] = spk_to_chmap (spk );
622+ chmap [count ++ ] = snd_hdac_spk_to_chmap (spk );
623623 }
624624
625625 WARN_ON (count != channels );
0 commit comments