aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/asihpi/hpi.h23
-rw-r--r--sound/pci/asihpi/hpi6205.c59
-rw-r--r--sound/pci/asihpi/hpi_internal.h17
-rw-r--r--sound/pci/asihpi/hpicmn.h1
-rw-r--r--sound/pci/asihpi/hpidspcd.h2
-rw-r--r--sound/pci/asihpi/hpimsgx.c2
6 files changed, 80 insertions, 24 deletions
diff --git a/sound/pci/asihpi/hpi.h b/sound/pci/asihpi/hpi.h
index 212a016d857b..bef90d44361e 100644
--- a/sound/pci/asihpi/hpi.h
+++ b/sound/pci/asihpi/hpi.h
@@ -957,8 +957,7 @@ enum HPI_ERROR_CODES {
957 /** Reserved for OEMs. */ 957 /** Reserved for OEMs. */
958 HPI_ERROR_RESERVED_1 = 290, 958 HPI_ERROR_RESERVED_1 = 290,
959 959
960 /* HPI_ERROR_INVALID_STREAM = 300, 960 /* HPI_ERROR_INVALID_STREAM = 300 use HPI_ERROR_INVALID_OBJ_INDEX */
961 use HPI_ERROR_INVALID_OBJ_INDEX */
962 /** Invalid compression format. */ 961 /** Invalid compression format. */
963 HPI_ERROR_INVALID_FORMAT = 301, 962 HPI_ERROR_INVALID_FORMAT = 301,
964 /** Invalid format samplerate */ 963 /** Invalid format samplerate */
@@ -969,12 +968,8 @@ enum HPI_ERROR_CODES {
969 HPI_ERROR_INVALID_BITRATE = 304, 968 HPI_ERROR_INVALID_BITRATE = 304,
970 /** Invalid datasize used for stream read/write. */ 969 /** Invalid datasize used for stream read/write. */
971 HPI_ERROR_INVALID_DATASIZE = 305, 970 HPI_ERROR_INVALID_DATASIZE = 305,
972 /* Stream buffer is full during stream write. 971 /* HPI_ERROR_BUFFER_FULL = 306 use HPI_ERROR_INVALID_DATASIZE */
973 HPI_ERROR_BUFFER_FULL = 306, 972 /* HPI_ERROR_BUFFER_EMPTY = 307 use HPI_ERROR_INVALID_DATASIZE */
974 Stream buffer is empty during stream read.
975 HPI_ERROR_BUFFER_EMPTY = 307,
976 Use HPI_ERROR_INVALID_DATASIZE
977 */
978 /** Null data pointer used for stream read/write. */ 973 /** Null data pointer used for stream read/write. */
979 HPI_ERROR_INVALID_DATA_POINTER = 308, 974 HPI_ERROR_INVALID_DATA_POINTER = 308,
980 /** Packet ordering error for stream read/write. */ 975 /** Packet ordering error for stream read/write. */
@@ -1098,16 +1093,16 @@ struct hpi_anc_frame {
1098*/ 1093*/
1099struct hpi_async_event { 1094struct hpi_async_event {
1100 u16 event_type; /**< type of event. \sa async_event */ 1095 u16 event_type; /**< type of event. \sa async_event */
1101 u16 sequence; /**< Sequence number, allows lost event detection */ 1096 u16 sequence; /**< Sequence number, allows lost event detection */
1102 u32 state; /**< New state */ 1097 u32 state; /**< New state */
1103 u32 h_object; /**< handle to the object returning the event. */ 1098 u32 h_object; /**< handle to the object returning the event. */
1104 union { 1099 union {
1105 struct { 1100 struct {
1106 u16 index; /**< GPIO bit index. */ 1101 u16 index; /**< GPIO bit index. */
1107 } gpio; 1102 } gpio;
1108 struct { 1103 struct {
1109 u16 node_index; /**< what node is the control on ? */ 1104 u16 node_index; /**< what node is the control on ? */
1110 u16 node_type; /**< what type of node is the control on ? */ 1105 u16 node_type; /**< what type of node is the control on ? */
1111 } control; 1106 } control;
1112 } u; 1107 } u;
1113}; 1108};
@@ -1635,8 +1630,8 @@ u16 hpi_cobranet_get_static_ip_address(u32 h_control, u32 *pdw_ip_address);
1635 1630
1636u16 hpi_cobranet_set_static_ip_address(u32 h_control, u32 dw_ip_address); 1631u16 hpi_cobranet_set_static_ip_address(u32 h_control, u32 dw_ip_address);
1637 1632
1638u16 hpi_cobranet_get_macaddress(u32 h_control, u32 *pmAC_MS_bs, 1633u16 hpi_cobranet_get_macaddress(u32 h_control, u32 *p_mac_msbs,
1639 u32 *pmAC_LS_bs); 1634 u32 *p_mac_lsbs);
1640 1635
1641/*************************/ 1636/*************************/
1642/* Tone Detector control */ 1637/* Tone Detector control */
diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c
index cbf79a99156c..eefe459ac160 100644
--- a/sound/pci/asihpi/hpi6205.c
+++ b/sound/pci/asihpi/hpi6205.c
@@ -752,6 +752,9 @@ static void delete_adapter_obj(struct hpi_adapter_obj *pao)
752} 752}
753 753
754/*****************************************************************************/ 754/*****************************************************************************/
755/* Adapter functions */
756
757/*****************************************************************************/
755/* OutStream Host buffer functions */ 758/* OutStream Host buffer functions */
756 759
757/** Allocate or attach buffer for busmastering 760/** Allocate or attach buffer for busmastering
@@ -1781,12 +1784,66 @@ static u16 boot_loader_config_emif(struct hpi_adapter_obj *pao, int dsp_index)
1781 BAR1 via BootLoader_WriteMem32) */ 1784 BAR1 via BootLoader_WriteMem32) */
1782 boot_loader_write_mem32(pao, dsp_index, C6713_EMIF_GCTL, 1785 boot_loader_write_mem32(pao, dsp_index, C6713_EMIF_GCTL,
1783 0x000034A8); 1786 0x000034A8);
1787
1788 /* EMIF CE0 setup - 2Mx32 Sync DRAM
1789 31..28 Wr setup
1790 27..22 Wr strobe
1791 21..20 Wr hold
1792 19..16 Rd setup
1793 15..14 -
1794 13..8 Rd strobe
1795 7..4 MTYPE 0011 Sync DRAM 32bits
1796 3 Wr hold MSB
1797 2..0 Rd hold
1798 */
1784 boot_loader_write_mem32(pao, dsp_index, C6713_EMIF_CE0, 1799 boot_loader_write_mem32(pao, dsp_index, C6713_EMIF_CE0,
1785 0x00000030); 1800 0x00000030);
1801
1802 /* EMIF SDRAM Extension
1803 0x00
1804 31-21 0000b 0000b 000b
1805 20 WR2RD = 2cycles-1 = 1b
1806
1807 19-18 WR2DEAC = 3cycle-1 = 10b
1808 17 WR2WR = 2cycle-1 = 1b
1809 16-15 R2WDQM = 4cycle-1 = 11b
1810 14-12 RD2WR = 6cycles-1 = 101b
1811
1812 11-10 RD2DEAC = 4cycle-1 = 11b
1813 9 RD2RD = 2cycle-1 = 1b
1814 8-7 THZP = 3cycle-1 = 10b
1815 6-5 TWR = 2cycle-1 = 01b (tWR = 17ns)
1816 4 TRRD = 2cycle = 0b (tRRD = 14ns)
1817 3-1 TRAS = 5cycle-1 = 100b (Tras=42ns)
1818 1 CAS latency = 3cyc = 1b
1819 (for Micron 2M32-7 operating at 100MHz)
1820 */
1786 boot_loader_write_mem32(pao, dsp_index, C6713_EMIF_SDRAMEXT, 1821 boot_loader_write_mem32(pao, dsp_index, C6713_EMIF_SDRAMEXT,
1787 0x001BDF29); 1822 0x001BDF29);
1823
1824 /* EMIF SDRAM control - set up for a 2Mx32 SDRAM (512x32x4 bank)
1825 31 - 0b -
1826 30 SDBSZ 1b 4 bank
1827 29..28 SDRSZ 00b 11 row address pins
1828
1829 27..26 SDCSZ 01b 8 column address pins
1830 25 RFEN 1b refersh enabled
1831 24 INIT 1b init SDRAM!
1832
1833 23..20 TRCD 0001b (Trcd/Tcyc)-1 = (20/10)-1 = 1
1834
1835 19..16 TRP 0001b (Trp/Tcyc)-1 = (20/10)-1 = 1
1836
1837 15..12 TRC 0110b (Trc/Tcyc)-1 = (70/10)-1 = 6
1838
1839 11..0 - 0000b 0000b 0000b
1840 */
1788 boot_loader_write_mem32(pao, dsp_index, C6713_EMIF_SDRAMCTL, 1841 boot_loader_write_mem32(pao, dsp_index, C6713_EMIF_SDRAMCTL,
1789 0x47117000); 1842 0x47116000);
1843
1844 /* SDRAM refresh timing
1845 Need 4,096 refresh cycles every 64ms = 15.625us = 1562cycles of 100MHz = 0x61A
1846 */
1790 boot_loader_write_mem32(pao, dsp_index, 1847 boot_loader_write_mem32(pao, dsp_index,
1791 C6713_EMIF_SDRAMTIMING, 0x00000410); 1848 C6713_EMIF_SDRAMTIMING, 0x00000410);
1792 1849
diff --git a/sound/pci/asihpi/hpi_internal.h b/sound/pci/asihpi/hpi_internal.h
index a99aa9abe3da..9f003a47fd7a 100644
--- a/sound/pci/asihpi/hpi_internal.h
+++ b/sound/pci/asihpi/hpi_internal.h
@@ -553,12 +553,10 @@ struct hpi_resource {
553/** Format info used inside struct hpi_message 553/** Format info used inside struct hpi_message
554 Not the same as public API struct hpi_format */ 554 Not the same as public API struct hpi_format */
555struct hpi_msg_format { 555struct hpi_msg_format {
556 u32 sample_rate; 556 u32 sample_rate; /**< 11025, 32000, 44100 etc. */
557 /**< 11025, 32000, 44100 ... */ 557 u32 bit_rate; /**< for MPEG */
558 u32 bit_rate; /**< for MPEG */ 558 u32 attributes; /**< stereo/joint_stereo/mono */
559 u32 attributes; 559 u16 channels; /**< 1,2..., (or ancillary mode or idle bit */
560 /**< Stereo/JointStereo/Mono */
561 u16 channels; /**< 1,2..., (or ancillary mode or idle bit */
562 u16 format; /**< HPI_FORMAT_PCM16, _MPEG etc. see \ref HPI_FORMATS. */ 560 u16 format; /**< HPI_FORMAT_PCM16, _MPEG etc. see \ref HPI_FORMATS. */
563}; 561};
564 562
@@ -593,7 +591,7 @@ struct hpi_data_compat32 {
593struct hpi_buffer { 591struct hpi_buffer {
594 /** placehoder for backward compatability (see dwBufferSize) */ 592 /** placehoder for backward compatability (see dwBufferSize) */
595 struct hpi_msg_format reserved; 593 struct hpi_msg_format reserved;
596 u32 command; /**< HPI_BUFFER_CMD_xxx*/ 594 u32 command; /**< HPI_BUFFER_CMD_xxx*/
597 u32 pci_address; /**< PCI physical address of buffer for DSP DMA */ 595 u32 pci_address; /**< PCI physical address of buffer for DSP DMA */
598 u32 buffer_size; /**< must line up with data_size of HPI_DATA*/ 596 u32 buffer_size; /**< must line up with data_size of HPI_DATA*/
599}; 597};
@@ -1125,6 +1123,11 @@ struct hpi_message {
1125 sizeof(struct hpi_message_header) + sizeof(struct hpi_async_msg) \ 1123 sizeof(struct hpi_message_header) + sizeof(struct hpi_async_msg) \
1126} 1124}
1127 1125
1126/*
1127Note that the wSpecificError error field should be inspected and potentially
1128reported whenever HPI_ERROR_DSP_COMMUNICATION or HPI_ERROR_DSP_BOOTLOAD is
1129returned in wError.
1130*/
1128struct hpi_response_header { 1131struct hpi_response_header {
1129 u16 size; 1132 u16 size;
1130 u8 type; /* HPI_TYPE_RESPONSE */ 1133 u8 type; /* HPI_TYPE_RESPONSE */
diff --git a/sound/pci/asihpi/hpicmn.h b/sound/pci/asihpi/hpicmn.h
index 6db1e0ba4728..590f0b69e655 100644
--- a/sound/pci/asihpi/hpicmn.h
+++ b/sound/pci/asihpi/hpicmn.h
@@ -45,6 +45,7 @@ struct hpi_control_cache {
45}; 45};
46 46
47struct hpi_adapter_obj *hpi_find_adapter(u16 adapter_index); 47struct hpi_adapter_obj *hpi_find_adapter(u16 adapter_index);
48
48u16 hpi_add_adapter(struct hpi_adapter_obj *pao); 49u16 hpi_add_adapter(struct hpi_adapter_obj *pao);
49 50
50void hpi_delete_adapter(struct hpi_adapter_obj *pao); 51void hpi_delete_adapter(struct hpi_adapter_obj *pao);
diff --git a/sound/pci/asihpi/hpidspcd.h b/sound/pci/asihpi/hpidspcd.h
index d7c240398225..65f0ca732704 100644
--- a/sound/pci/asihpi/hpidspcd.h
+++ b/sound/pci/asihpi/hpidspcd.h
@@ -87,7 +87,7 @@ void hpi_dsp_code_rewind(struct dsp_code *ps_dsp_code);
87*/ 87*/
88short hpi_dsp_code_read_word(struct dsp_code *ps_dsp_code, 88short hpi_dsp_code_read_word(struct dsp_code *ps_dsp_code,
89 /**< DSP code descriptor */ 89 /**< DSP code descriptor */
90 u32 *pword /**< where to store the read word */ 90 u32 *pword /**< Where to store the read word */
91 ); 91 );
92 92
93/** Get a block of dsp code into an internal buffer, and provide a pointer to 93/** Get a block of dsp code into an internal buffer, and provide a pointer to
diff --git a/sound/pci/asihpi/hpimsgx.c b/sound/pci/asihpi/hpimsgx.c
index b4e7d9a19472..bcbdf30a6aa0 100644
--- a/sound/pci/asihpi/hpimsgx.c
+++ b/sound/pci/asihpi/hpimsgx.c
@@ -230,7 +230,7 @@ static void subsys_message(struct hpi_message *phm, struct hpi_response *phr,
230 230
231 break; 231 break;
232 default: 232 default:
233 /* Must explicitly send subsys messages to individual backends */ 233 /* Must explicitly handle every subsys message in this switch */
234 hpi_init_response(phr, HPI_OBJ_SUBSYSTEM, phm->function, 234 hpi_init_response(phr, HPI_OBJ_SUBSYSTEM, phm->function,
235 HPI_ERROR_INVALID_FUNC); 235 HPI_ERROR_INVALID_FUNC);
236 break; 236 break;