aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/rme9652
diff options
context:
space:
mode:
authorAdrian Knoth <adi@drcomp.erfurt.thur.de>2013-07-05 05:28:02 -0400
committerTakashi Iwai <tiwai@suse.de>2013-07-05 08:51:06 -0400
commit3de9db264cef4bc984f928e08cccf36304f30d0a (patch)
tree88221ce267a0456294580eb74be2dbd7f60e20fb /sound/pci/rme9652
parent42f4c12dcf46cbca8b7bb17610c0cb7ffbd7ab2e (diff)
ALSA: hdspm - Add support for AEBs on RME AIO
AIO cards allow to use AEB (Analogue Expansion Boards) to add four input and/or output channels. This patch adds the necessary code to detect and enable the additional I/O channels. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/rme9652')
-rw-r--r--sound/pci/rme9652/hdspm.c54
1 files changed, 37 insertions, 17 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index 778fc23105fa..ad416365dc68 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -648,7 +648,8 @@ static char *texts_ports_aio_in_ss[] = {
648 "AES.L", "AES.R", 648 "AES.L", "AES.R",
649 "SPDIF.L", "SPDIF.R", 649 "SPDIF.L", "SPDIF.R",
650 "ADAT.1", "ADAT.2", "ADAT.3", "ADAT.4", "ADAT.5", "ADAT.6", 650 "ADAT.1", "ADAT.2", "ADAT.3", "ADAT.4", "ADAT.5", "ADAT.6",
651 "ADAT.7", "ADAT.8" 651 "ADAT.7", "ADAT.8",
652 "AEB.1", "AEB.2", "AEB.3", "AEB.4"
652}; 653};
653 654
654static char *texts_ports_aio_out_ss[] = { 655static char *texts_ports_aio_out_ss[] = {
@@ -657,14 +658,16 @@ static char *texts_ports_aio_out_ss[] = {
657 "SPDIF.L", "SPDIF.R", 658 "SPDIF.L", "SPDIF.R",
658 "ADAT.1", "ADAT.2", "ADAT.3", "ADAT.4", "ADAT.5", "ADAT.6", 659 "ADAT.1", "ADAT.2", "ADAT.3", "ADAT.4", "ADAT.5", "ADAT.6",
659 "ADAT.7", "ADAT.8", 660 "ADAT.7", "ADAT.8",
660 "Phone.L", "Phone.R" 661 "Phone.L", "Phone.R",
662 "AEB.1", "AEB.2", "AEB.3", "AEB.4"
661}; 663};
662 664
663static char *texts_ports_aio_in_ds[] = { 665static char *texts_ports_aio_in_ds[] = {
664 "Analogue.L", "Analogue.R", 666 "Analogue.L", "Analogue.R",
665 "AES.L", "AES.R", 667 "AES.L", "AES.R",
666 "SPDIF.L", "SPDIF.R", 668 "SPDIF.L", "SPDIF.R",
667 "ADAT.1", "ADAT.2", "ADAT.3", "ADAT.4" 669 "ADAT.1", "ADAT.2", "ADAT.3", "ADAT.4",
670 "AEB.1", "AEB.2", "AEB.3", "AEB.4"
668}; 671};
669 672
670static char *texts_ports_aio_out_ds[] = { 673static char *texts_ports_aio_out_ds[] = {
@@ -672,14 +675,16 @@ static char *texts_ports_aio_out_ds[] = {
672 "AES.L", "AES.R", 675 "AES.L", "AES.R",
673 "SPDIF.L", "SPDIF.R", 676 "SPDIF.L", "SPDIF.R",
674 "ADAT.1", "ADAT.2", "ADAT.3", "ADAT.4", 677 "ADAT.1", "ADAT.2", "ADAT.3", "ADAT.4",
675 "Phone.L", "Phone.R" 678 "Phone.L", "Phone.R",
679 "AEB.1", "AEB.2", "AEB.3", "AEB.4"
676}; 680};
677 681
678static char *texts_ports_aio_in_qs[] = { 682static char *texts_ports_aio_in_qs[] = {
679 "Analogue.L", "Analogue.R", 683 "Analogue.L", "Analogue.R",
680 "AES.L", "AES.R", 684 "AES.L", "AES.R",
681 "SPDIF.L", "SPDIF.R", 685 "SPDIF.L", "SPDIF.R",
682 "ADAT.1", "ADAT.2", "ADAT.3", "ADAT.4" 686 "ADAT.1", "ADAT.2", "ADAT.3", "ADAT.4",
687 "AEB.1", "AEB.2", "AEB.3", "AEB.4"
683}; 688};
684 689
685static char *texts_ports_aio_out_qs[] = { 690static char *texts_ports_aio_out_qs[] = {
@@ -687,7 +692,8 @@ static char *texts_ports_aio_out_qs[] = {
687 "AES.L", "AES.R", 692 "AES.L", "AES.R",
688 "SPDIF.L", "SPDIF.R", 693 "SPDIF.L", "SPDIF.R",
689 "ADAT.1", "ADAT.2", "ADAT.3", "ADAT.4", 694 "ADAT.1", "ADAT.2", "ADAT.3", "ADAT.4",
690 "Phone.L", "Phone.R" 695 "Phone.L", "Phone.R",
696 "AEB.1", "AEB.2", "AEB.3", "AEB.4"
691}; 697};
692 698
693static char *texts_ports_aes32[] = { 699static char *texts_ports_aes32[] = {
@@ -764,8 +770,8 @@ static char channel_map_aio_in_ss[HDSPM_MAX_CHANNELS] = {
764 8, 9, /* aes in, */ 770 8, 9, /* aes in, */
765 10, 11, /* spdif in */ 771 10, 11, /* spdif in */
766 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT in */ 772 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT in */
767 -1, -1, 773 2, 3, 4, 5, /* AEB */
768 -1, -1, -1, -1, -1, -1, -1, -1, 774 -1, -1, -1, -1, -1, -1,
769 -1, -1, -1, -1, -1, -1, -1, -1, 775 -1, -1, -1, -1, -1, -1, -1, -1,
770 -1, -1, -1, -1, -1, -1, -1, -1, 776 -1, -1, -1, -1, -1, -1, -1, -1,
771 -1, -1, -1, -1, -1, -1, -1, -1, 777 -1, -1, -1, -1, -1, -1, -1, -1,
@@ -779,7 +785,8 @@ static char channel_map_aio_out_ss[HDSPM_MAX_CHANNELS] = {
779 10, 11, /* spdif out */ 785 10, 11, /* spdif out */
780 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT out */ 786 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT out */
781 6, 7, /* phone out */ 787 6, 7, /* phone out */
782 -1, -1, -1, -1, -1, -1, -1, -1, 788 2, 3, 4, 5, /* AEB */
789 -1, -1, -1, -1,
783 -1, -1, -1, -1, -1, -1, -1, -1, 790 -1, -1, -1, -1, -1, -1, -1, -1,
784 -1, -1, -1, -1, -1, -1, -1, -1, 791 -1, -1, -1, -1, -1, -1, -1, -1,
785 -1, -1, -1, -1, -1, -1, -1, -1, 792 -1, -1, -1, -1, -1, -1, -1, -1,
@@ -792,7 +799,8 @@ static char channel_map_aio_in_ds[HDSPM_MAX_CHANNELS] = {
792 8, 9, /* aes in */ 799 8, 9, /* aes in */
793 10, 11, /* spdif in */ 800 10, 11, /* spdif in */
794 12, 14, 16, 18, /* adat in */ 801 12, 14, 16, 18, /* adat in */
795 -1, -1, -1, -1, -1, -1, 802 2, 3, 4, 5, /* AEB */
803 -1, -1,
796 -1, -1, -1, -1, -1, -1, -1, -1, 804 -1, -1, -1, -1, -1, -1, -1, -1,
797 -1, -1, -1, -1, -1, -1, -1, -1, 805 -1, -1, -1, -1, -1, -1, -1, -1,
798 -1, -1, -1, -1, -1, -1, -1, -1, 806 -1, -1, -1, -1, -1, -1, -1, -1,
@@ -807,7 +815,7 @@ static char channel_map_aio_out_ds[HDSPM_MAX_CHANNELS] = {
807 10, 11, /* spdif out */ 815 10, 11, /* spdif out */
808 12, 14, 16, 18, /* adat out */ 816 12, 14, 16, 18, /* adat out */
809 6, 7, /* phone out */ 817 6, 7, /* phone out */
810 -1, -1, -1, -1, 818 2, 3, 4, 5, /* AEB */
811 -1, -1, -1, -1, -1, -1, -1, -1, 819 -1, -1, -1, -1, -1, -1, -1, -1,
812 -1, -1, -1, -1, -1, -1, -1, -1, 820 -1, -1, -1, -1, -1, -1, -1, -1,
813 -1, -1, -1, -1, -1, -1, -1, -1, 821 -1, -1, -1, -1, -1, -1, -1, -1,
@@ -821,7 +829,8 @@ static char channel_map_aio_in_qs[HDSPM_MAX_CHANNELS] = {
821 8, 9, /* aes in */ 829 8, 9, /* aes in */
822 10, 11, /* spdif in */ 830 10, 11, /* spdif in */
823 12, 16, /* adat in */ 831 12, 16, /* adat in */
824 -1, -1, -1, -1, -1, -1, -1, -1, 832 2, 3, 4, 5, /* AEB */
833 -1, -1, -1, -1,
825 -1, -1, -1, -1, -1, -1, -1, -1, 834 -1, -1, -1, -1, -1, -1, -1, -1,
826 -1, -1, -1, -1, -1, -1, -1, -1, 835 -1, -1, -1, -1, -1, -1, -1, -1,
827 -1, -1, -1, -1, -1, -1, -1, -1, 836 -1, -1, -1, -1, -1, -1, -1, -1,
@@ -836,7 +845,8 @@ static char channel_map_aio_out_qs[HDSPM_MAX_CHANNELS] = {
836 10, 11, /* spdif out */ 845 10, 11, /* spdif out */
837 12, 16, /* adat out */ 846 12, 16, /* adat out */
838 6, 7, /* phone out */ 847 6, 7, /* phone out */
839 -1, -1, -1, -1, -1, -1, 848 2, 3, 4, 5, /* AEB */
849 -1, -1,
840 -1, -1, -1, -1, -1, -1, -1, -1, 850 -1, -1, -1, -1, -1, -1, -1, -1,
841 -1, -1, -1, -1, -1, -1, -1, -1, 851 -1, -1, -1, -1, -1, -1, -1, -1,
842 -1, -1, -1, -1, -1, -1, -1, -1, 852 -1, -1, -1, -1, -1, -1, -1, -1,
@@ -6602,10 +6612,6 @@ static int snd_hdspm_create(struct snd_card *card,
6602 break; 6612 break;
6603 6613
6604 case AIO: 6614 case AIO:
6605 if (0 == (hdspm_read(hdspm, HDSPM_statusRegister2) & HDSPM_s2_AEBI_D)) {
6606 snd_printk(KERN_INFO "HDSPM: AEB input board found, but not supported\n");
6607 }
6608
6609 hdspm->ss_in_channels = AIO_IN_SS_CHANNELS; 6615 hdspm->ss_in_channels = AIO_IN_SS_CHANNELS;
6610 hdspm->ds_in_channels = AIO_IN_DS_CHANNELS; 6616 hdspm->ds_in_channels = AIO_IN_DS_CHANNELS;
6611 hdspm->qs_in_channels = AIO_IN_QS_CHANNELS; 6617 hdspm->qs_in_channels = AIO_IN_QS_CHANNELS;
@@ -6613,6 +6619,20 @@ static int snd_hdspm_create(struct snd_card *card,
6613 hdspm->ds_out_channels = AIO_OUT_DS_CHANNELS; 6619 hdspm->ds_out_channels = AIO_OUT_DS_CHANNELS;
6614 hdspm->qs_out_channels = AIO_OUT_QS_CHANNELS; 6620 hdspm->qs_out_channels = AIO_OUT_QS_CHANNELS;
6615 6621
6622 if (0 == (hdspm_read(hdspm, HDSPM_statusRegister2) & HDSPM_s2_AEBI_D)) {
6623 snd_printk(KERN_INFO "HDSPM: AEB input board found\n");
6624 hdspm->ss_in_channels += 4;
6625 hdspm->ds_in_channels += 4;
6626 hdspm->qs_in_channels += 4;
6627 }
6628
6629 if (0 == (hdspm_read(hdspm, HDSPM_statusRegister2) & HDSPM_s2_AEBO_D)) {
6630 snd_printk(KERN_INFO "HDSPM: AEB output board found\n");
6631 hdspm->ss_out_channels += 4;
6632 hdspm->ds_out_channels += 4;
6633 hdspm->qs_out_channels += 4;
6634 }
6635
6616 hdspm->channel_map_out_ss = channel_map_aio_out_ss; 6636 hdspm->channel_map_out_ss = channel_map_aio_out_ss;
6617 hdspm->channel_map_out_ds = channel_map_aio_out_ds; 6637 hdspm->channel_map_out_ds = channel_map_aio_out_ds;
6618 hdspm->channel_map_out_qs = channel_map_aio_out_qs; 6638 hdspm->channel_map_out_qs = channel_map_aio_out_qs;